virtual_hubs
Creates, updates, deletes, gets or lists a virtual_hubs resource.
Overview
| Name | virtual_hubs |
| Type | Resource |
| Id | azure.network.virtual_hubs |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
addressPrefix | string | Address-prefix for this VirtualHub. |
allowBranchToBranchTraffic | boolean | Flag to control transit for VirtualRouter hub. |
azureFirewall | object | Reference to another subresource. |
bgpConnections | array | List of references to Bgp Connections. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
expressRouteGateway | object | Reference to another subresource. |
hubRoutingPreference | string | The hubRoutingPreference of this VirtualHub. Known values are: "ExpressRoute", "VpnGateway", and "ASPath". (ExpressRoute, VpnGateway, ASPath) |
ipConfigurations | array | List of references to IpConfigurations. |
kind | string | Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. |
location | string | Resource location. |
p2SVpnGateway | object | Reference to another subresource. |
preferredRoutingGateway | string | The preferred gateway to route on-prem traffic. Known values are: "ExpressRoute", "VpnGateway", and "None". (ExpressRoute, VpnGateway, None) |
provisioningState | string | The provisioning state of the virtual hub resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
routeMaps | array | List of references to RouteMaps. |
routeTable | object | The routeTable associated with this virtual hub. |
routingState | string | The routing state. Known values are: "None", "Provisioned", "Provisioning", and "Failed". (None, Provisioned, Provisioning, Failed) |
securityPartnerProvider | object | Reference to another subresource. |
securityProviderName | string | The Security Provider name. |
sku | string | The sku of this VirtualHub. |
tags | object | Resource tags. |
type | string | Resource type. |
virtualHubRouteTableV2s | array | List of all virtual hub route table v2s associated with this VirtualHub. |
virtualRouterAsn | integer | VirtualRouter ASN. |
virtualRouterAutoScaleConfiguration | object | The VirtualHub Router autoscale configuration. |
virtualRouterIps | array | VirtualRouter IPs. |
virtualWan | object | Reference to another subresource. |
vpnGateway | object | Reference to another subresource. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
addressPrefix | string | Address-prefix for this VirtualHub. |
allowBranchToBranchTraffic | boolean | Flag to control transit for VirtualRouter hub. |
azureFirewall | object | Reference to another subresource. |
bgpConnections | array | List of references to Bgp Connections. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
expressRouteGateway | object | Reference to another subresource. |
hubRoutingPreference | string | The hubRoutingPreference of this VirtualHub. Known values are: "ExpressRoute", "VpnGateway", and "ASPath". (ExpressRoute, VpnGateway, ASPath) |
ipConfigurations | array | List of references to IpConfigurations. |
kind | string | Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. |
location | string | Resource location. |
p2SVpnGateway | object | Reference to another subresource. |
preferredRoutingGateway | string | The preferred gateway to route on-prem traffic. Known values are: "ExpressRoute", "VpnGateway", and "None". (ExpressRoute, VpnGateway, None) |
provisioningState | string | The provisioning state of the virtual hub resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
routeMaps | array | List of references to RouteMaps. |
routeTable | object | The routeTable associated with this virtual hub. |
routingState | string | The routing state. Known values are: "None", "Provisioned", "Provisioning", and "Failed". (None, Provisioned, Provisioning, Failed) |
securityPartnerProvider | object | Reference to another subresource. |
securityProviderName | string | The Security Provider name. |
sku | string | The sku of this VirtualHub. |
tags | object | Resource tags. |
type | string | Resource type. |
virtualHubRouteTableV2s | array | List of all virtual hub route table v2s associated with this VirtualHub. |
virtualRouterAsn | integer | VirtualRouter ASN. |
virtualRouterAutoScaleConfiguration | object | The VirtualHub Router autoscale configuration. |
virtualRouterIps | array | VirtualRouter IPs. |
virtualWan | object | Reference to another subresource. |
vpnGateway | object | Reference to another subresource. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
addressPrefix | string | Address-prefix for this VirtualHub. |
allowBranchToBranchTraffic | boolean | Flag to control transit for VirtualRouter hub. |
azureFirewall | object | Reference to another subresource. |
bgpConnections | array | List of references to Bgp Connections. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
expressRouteGateway | object | Reference to another subresource. |
hubRoutingPreference | string | The hubRoutingPreference of this VirtualHub. Known values are: "ExpressRoute", "VpnGateway", and "ASPath". (ExpressRoute, VpnGateway, ASPath) |
ipConfigurations | array | List of references to IpConfigurations. |
kind | string | Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. |
location | string | Resource location. |
p2SVpnGateway | object | Reference to another subresource. |
preferredRoutingGateway | string | The preferred gateway to route on-prem traffic. Known values are: "ExpressRoute", "VpnGateway", and "None". (ExpressRoute, VpnGateway, None) |
provisioningState | string | The provisioning state of the virtual hub resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
routeMaps | array | List of references to RouteMaps. |
routeTable | object | The routeTable associated with this virtual hub. |
routingState | string | The routing state. Known values are: "None", "Provisioned", "Provisioning", and "Failed". (None, Provisioned, Provisioning, Failed) |
securityPartnerProvider | object | Reference to another subresource. |
securityProviderName | string | The Security Provider name. |
sku | string | The sku of this VirtualHub. |
tags | object | Resource tags. |
type | string | Resource type. |
virtualHubRouteTableV2s | array | List of all virtual hub route table v2s associated with this VirtualHub. |
virtualRouterAsn | integer | VirtualRouter ASN. |
virtualRouterAutoScaleConfiguration | object | The VirtualHub Router autoscale configuration. |
virtualRouterIps | array | VirtualRouter IPs. |
virtualWan | object | Reference to another subresource. |
vpnGateway | object | Reference to another subresource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, virtual_hub_name, subscription_id | Retrieves the details of a VirtualHub. | |
list_by_resource_group | select | resource_group_name, subscription_id | Lists all the VirtualHubs in a resource group. | |
list | select | subscription_id | Lists all the VirtualHubs in a subscription. | |
create_or_update | insert | resource_group_name, virtual_hub_name, subscription_id | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. | |
update_tags | update | resource_group_name, virtual_hub_name, subscription_id | Updates VirtualHub tags. | |
create_or_update | replace | resource_group_name, virtual_hub_name, subscription_id | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. | |
delete | delete | resource_group_name, virtual_hub_name, subscription_id | Deletes a VirtualHub. | |
get_effective_virtual_hub_routes | exec | resource_group_name, virtual_hub_name, subscription_id | Gets the effective routes configured for the Virtual Hub resource or the specified resource . | |
get_inbound_routes | exec | resource_group_name, virtual_hub_name, subscription_id | Gets the inbound routes configured for the Virtual Hub on a particular connection. | |
get_outbound_routes | exec | resource_group_name, virtual_hub_name, subscription_id | Gets the outbound routes configured for the Virtual Hub on a particular connection. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
virtual_hub_name | string | The name of the VirtualHub. Required. |
SELECT examples
- get
- list_by_resource_group
- list
Retrieves the details of a VirtualHub.
SELECT
id,
name,
addressPrefix,
allowBranchToBranchTraffic,
azureFirewall,
bgpConnections,
etag,
expressRouteGateway,
hubRoutingPreference,
ipConfigurations,
kind,
location,
p2SVpnGateway,
preferredRoutingGateway,
provisioningState,
routeMaps,
routeTable,
routingState,
securityPartnerProvider,
securityProviderName,
sku,
tags,
type,
virtualHubRouteTableV2s,
virtualRouterAsn,
virtualRouterAutoScaleConfiguration,
virtualRouterIps,
virtualWan,
vpnGateway
FROM azure.network.virtual_hubs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_hub_name = '{{ virtual_hub_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the VirtualHubs in a resource group.
SELECT
id,
name,
addressPrefix,
allowBranchToBranchTraffic,
azureFirewall,
bgpConnections,
etag,
expressRouteGateway,
hubRoutingPreference,
ipConfigurations,
kind,
location,
p2SVpnGateway,
preferredRoutingGateway,
provisioningState,
routeMaps,
routeTable,
routingState,
securityPartnerProvider,
securityProviderName,
sku,
tags,
type,
virtualHubRouteTableV2s,
virtualRouterAsn,
virtualRouterAutoScaleConfiguration,
virtualRouterIps,
virtualWan,
vpnGateway
FROM azure.network.virtual_hubs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the VirtualHubs in a subscription.
SELECT
id,
name,
addressPrefix,
allowBranchToBranchTraffic,
azureFirewall,
bgpConnections,
etag,
expressRouteGateway,
hubRoutingPreference,
ipConfigurations,
kind,
location,
p2SVpnGateway,
preferredRoutingGateway,
provisioningState,
routeMaps,
routeTable,
routingState,
securityPartnerProvider,
securityProviderName,
sku,
tags,
type,
virtualHubRouteTableV2s,
virtualRouterAsn,
virtualRouterAutoScaleConfiguration,
virtualRouterIps,
virtualWan,
vpnGateway
FROM azure.network.virtual_hubs
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub.
INSERT INTO azure.network.virtual_hubs (
id,
location,
tags,
properties,
resource_group_name,
virtual_hub_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ virtual_hub_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: virtual_hubs
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the virtual_hubs resource.
- name: virtual_hub_name
value: "{{ virtual_hub_name }}"
description: Required parameter for the virtual_hubs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the virtual_hubs resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of the virtual hub.
value:
virtualWan:
id: "{{ id }}"
vpnGateway:
id: "{{ id }}"
p2SVpnGateway:
id: "{{ id }}"
expressRouteGateway:
id: "{{ id }}"
azureFirewall:
id: "{{ id }}"
securityPartnerProvider:
id: "{{ id }}"
addressPrefix: "{{ addressPrefix }}"
routeTable:
routes:
- addressPrefixes: "{{ addressPrefixes }}"
nextHopIpAddress: "{{ nextHopIpAddress }}"
provisioningState: "{{ provisioningState }}"
securityProviderName: "{{ securityProviderName }}"
virtualHubRouteTableV2s:
- id: "{{ id }}"
properties:
routes:
- destinationType: "{{ destinationType }}"
destinations: "{{ destinations }}"
nextHopType: "{{ nextHopType }}"
nextHops: "{{ nextHops }}"
attachedConnections:
- "{{ attachedConnections }}"
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
etag: "{{ etag }}"
sku: "{{ sku }}"
routingState: "{{ routingState }}"
bgpConnections:
- id: "{{ id }}"
ipConfigurations:
- id: "{{ id }}"
routeMaps:
- id: "{{ id }}"
virtualRouterAsn: {{ virtualRouterAsn }}
virtualRouterIps:
- "{{ virtualRouterIps }}"
allowBranchToBranchTraffic: {{ allowBranchToBranchTraffic }}
preferredRoutingGateway: "{{ preferredRoutingGateway }}"
hubRoutingPreference: "{{ hubRoutingPreference }}"
virtualRouterAutoScaleConfiguration:
minCapacity: {{ minCapacity }}
UPDATE examples
- update_tags
Updates VirtualHub tags.
UPDATE azure.network.virtual_hubs
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_hub_name = '{{ virtual_hub_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type;
REPLACE examples
- create_or_update
Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub.
REPLACE azure.network.virtual_hubs
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_hub_name = '{{ virtual_hub_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type;
DELETE examples
- delete
Deletes a VirtualHub.
DELETE FROM azure.network.virtual_hubs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_hub_name = '{{ virtual_hub_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_effective_virtual_hub_routes
- get_inbound_routes
- get_outbound_routes
Gets the effective routes configured for the Virtual Hub resource or the specified resource .
EXEC azure.network.virtual_hubs.get_effective_virtual_hub_routes
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_hub_name='{{ virtual_hub_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"resourceId": "{{ resourceId }}",
"virtualWanResourceType": "{{ virtualWanResourceType }}"
}'
;
Gets the inbound routes configured for the Virtual Hub on a particular connection.
EXEC azure.network.virtual_hubs.get_inbound_routes
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_hub_name='{{ virtual_hub_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"resourceUri": "{{ resourceUri }}",
"connectionType": "{{ connectionType }}"
}'
;
Gets the outbound routes configured for the Virtual Hub on a particular connection.
EXEC azure.network.virtual_hubs.get_outbound_routes
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_hub_name='{{ virtual_hub_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"resourceUri": "{{ resourceUri }}",
"connectionType": "{{ connectionType }}"
}'
;