שתף באמצעות


az network vhub

Note

This reference is part of the virtual-wan extension for the Azure CLI (version 2.55.0 or higher). The extension will automatically install the first time you run an az network vhub command. Learn more about extensions.

Manage virtual hubs.

Commands

Name Description Type Status
az network vhub bgpconnection

Manage virtual hub bgpconnections.

Extension GA
az network vhub bgpconnection create

Create a virtual hub bgpconnection.

Extension GA
az network vhub bgpconnection delete

Delete a virtual hub bgpconnection.

Extension GA
az network vhub bgpconnection list

List virtual hub bgpconnections.

Extension GA
az network vhub bgpconnection show

Get the details of a virtual hub bgpconnection.

Extension GA
az network vhub bgpconnection update

Update settings of a virtual hub bgpconnection.

Extension GA
az network vhub bgpconnection wait

Place the CLI in a waiting state until a condition of virtual hub bgpconnection is met.

Extension GA
az network vhub connection

Manage virtual hub VNet connections.

Extension GA
az network vhub connection create

Create a virtual hub VNet connection.

Extension GA
az network vhub connection delete

Delete a virtual hub VNet connection.

Extension GA
az network vhub connection list

List virtual hub VNet connections.

Extension GA
az network vhub connection show

Get the details of a virtual hub VNet connection.

Extension GA
az network vhub connection update

Update settings of a virtual hub connection.

Extension GA
az network vhub connection wait

Place the CLI in a waiting state until a condition is met.

Extension GA
az network vhub create

Create a virtual hub.

Extension GA
az network vhub delete

Delete a virtual hub.

Extension GA
az network vhub get-effective-routes

Get the effective routes configured for the Virtual Hub resource or the specified resource.

Extension GA
az network vhub list

List virtual hubs.

Extension GA
az network vhub route

Manage entries in the virtual hub route table.

Extension Deprecated
az network vhub route-map

Manage route map.

Extension GA
az network vhub route-map create

Create a route map.

Extension GA
az network vhub route-map delete

Delete a route map.

Extension GA
az network vhub route-map get-inbound-routes

Get the inbound routes configured for the Virtual Hub on a particular connection.

Extension GA
az network vhub route-map get-outbound-routes

Get the outbound routes configured for the Virtual Hub on a particular connection.

Extension GA
az network vhub route-map list

List routem maps by resource group.

Extension GA
az network vhub route-map rule

Manage route map rule.

Extension GA
az network vhub route-map rule add

Add route map rule.

Extension GA
az network vhub route-map rule delete

Delete route map rule.

Extension GA
az network vhub route-map rule list

List route map rules.

Extension GA
az network vhub route-map rule show

Show route map rule.

Extension GA
az network vhub route-map rule wait

Place the CLI in a waiting state until a condition is met.

Extension GA
az network vhub route-map show

Show the details of a route map.

Extension GA
az network vhub route-map update

Update a route map.

Extension GA
az network vhub route-map wait

Place the CLI in a waiting state until a condition is met.

Extension GA
az network vhub route-table

Manage route table in the virtual hub.

Extension GA
az network vhub route-table create

Create a route table in the virtual hub.

Extension GA
az network vhub route-table delete

Delete a route table in the virtual hub.

Extension GA
az network vhub route-table list

List all route tables in the virtual hub.

Extension GA
az network vhub route-table route

Manage routes of route table in the virtual hub.

Extension GA
az network vhub route-table route add

Add a route into route table of the virtual hub.

Extension GA
az network vhub route-table route list

List routes in the virtual hub route table.

Extension GA
az network vhub route-table route remove

Remove a route from route table of the virtual hub.

Extension GA
az network vhub route-table show

Show a route table in the virtual hub.

Extension GA
az network vhub route-table update

Update a route table in the virtual hub.

Extension GA
az network vhub route-table wait

Place the CLI in a waiting state until a condition of the vhub route-table is met.

Extension GA
az network vhub route add

Add a route to the virtual hub route table.

Extension Deprecated
az network vhub route list

List routes in the virtual hub route table.

Extension Deprecated
az network vhub route remove

Remove a route from the virtual hub route table.

Extension Deprecated
az network vhub route reset

Reset virtual hub route when the route state is failed.

Extension Deprecated
az network vhub routing-intent

Manage routing intent in the virtual hub.

Extension Preview
az network vhub routing-intent create

Create a routing intent in the virtual hub.

Extension Preview
az network vhub routing-intent delete

Delete a routing intent in the virtual hub.

Extension Preview
az network vhub routing-intent list

Retrieve the details of all routing intent resources of the virtual hub.

Extension Preview
az network vhub routing-intent show

Retrieve the details of a routing intent.

Extension Preview
az network vhub routing-intent update

Update a routing intent in the virtual hub.

Extension Preview
az network vhub routing-intent wait

Place the CLI in a waiting state until a condition is met.

Extension Preview
az network vhub show

Get the details of a virtual hub.

Extension GA
az network vhub update

Update settings of a virtual hub.

Extension GA
az network vhub wait

Place the CLI in a waiting state until a condition is met.

Extension GA

az network vhub create

Create a virtual hub.

az network vhub create --name
                       --resource-group
                       [--address-prefix]
                       [--allow-b2b-traffic {0, 1, f, false, n, no, t, true, y, yes}]
                       [--asn]
                       [--auto-scale-config]
                       [--hub-routing-preference {ASPath, ExpressRoute, VpnGateway}]
                       [--location]
                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                       [--sku]
                       [--tags]
                       [--vwan]

Examples

Create a virtual hub.

az network vhub create -g MyRG -n MyVHub --vwan MyVWan --address-prefix 10.0.0.0/24 -l SouthCentralUS --sku Standard

Required Parameters

--name -n

Name of the virtual hub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--address-prefix

CIDR address prefix for the virtual hub.

--allow-b2b-traffic

Flag to control branch-to-branch traffic for VirtualRouter hub.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--asn

VirtualRouter ASN.

--auto-scale-config

The VirtualHub Router autoscale configuration. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--hub-routing-preference

The hub routing preference gateway types.

Accepted values: ASPath, ExpressRoute, VpnGateway
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>. When not specified, the location of the resource group will be used.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--sku

The sku of the VirtualHub. Allowed values: Basic, Standard.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--vwan

Name or ID of the virtual WAN.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network vhub delete

Delete a virtual hub.

az network vhub delete [--ids]
                       [--name]
                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                       [--resource-group]
                       [--subscription]
                       [--yes]

Examples

Delete a virtual hub.

az network vhub delete -n MyVHub -g MyRG

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the virtual hub.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network vhub get-effective-routes

Get the effective routes configured for the Virtual Hub resource or the specified resource.

az network vhub get-effective-routes [--ids]
                                     [--name]
                                     [--no-wait]
                                     [--resource-group]
                                     [--resource-id]
                                     [--resource-type]
                                     [--subscription]

Examples

Get the effective routes configured for route table in the virtual hub.

az network vhub get-effective-routes --resource-type RouteTable --resource-id /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable -g MyRG -n MyHub

Get the effective routes configured for P2S connection in the virtual hub.

az network vhub get-effective-routes --resource-type P2SConnection --resource-id /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/p2sVpnGateways/MyGateway/p2sConnectionConfigurations/MyConnection -g MyRG -n MyHub

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the virtual hub.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-id

The resource whose effective routes are being requested.

--resource-type

The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network vhub list

List virtual hubs.

az network vhub list [--resource-group]

Examples

List virtual hubs.

az network vhub list -g MyRG

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network vhub show

Get the details of a virtual hub.

az network vhub show [--ids]
                     [--name]
                     [--resource-group]
                     [--subscription]

Examples

Get the details of a virtual hub.

az network vhub show -n MyVHub -g MyRG

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the virtual hub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network vhub update

Update settings of a virtual hub.

az network vhub update [--add]
                       [--address-prefix]
                       [--allow-b2b-traffic {0, 1, f, false, n, no, t, true, y, yes}]
                       [--asn]
                       [--auto-scale-config]
                       [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                       [--hub-routing-preference {ASPath, ExpressRoute, VpnGateway}]
                       [--ids]
                       [--name]
                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                       [--remove]
                       [--resource-group]
                       [--set]
                       [--sku]
                       [--subscription]
                       [--tags]
                       [--vwan]

Examples

Update settings of a virtual hub.

az network vhub update -g MyRG -n MyVHub --sku Basic --hub-routing-preference VpnGateway

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--address-prefix

CIDR address prefix for the virtual hub.

--allow-b2b-traffic

Flag to control branch-to-branch traffic for VirtualRouter hub.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--asn

VirtualRouter ASN.

--auto-scale-config

The VirtualHub Router autoscale configuration. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--hub-routing-preference

The hub routing preference gateway types.

Accepted values: ASPath, ExpressRoute, VpnGateway
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the virtual hub.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--sku

The sku of the VirtualHub.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--vwan

Name or ID of the virtual WAN.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az network vhub wait

Place the CLI in a waiting state until a condition is met.

az network vhub wait [--created]
                     [--custom]
                     [--deleted]
                     [--exists]
                     [--ids]
                     [--interval]
                     [--name]
                     [--resource-group]
                     [--subscription]
                     [--timeout]
                     [--updated]

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

Default value: 30
--name -n

Name of the virtual hub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.