Share via


az network vhub connection

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 connection command. Learn more about extensions.

Manage virtual hub VNet connections.

Commands

Name Description Type Status
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 connection create

Create a virtual hub VNet connection.

az network vhub connection create --name
                                  --remote-vnet
                                  --resource-group
                                  --vhub-name
                                  [--address-prefixes]
                                  [--associated --associated-route-table]
                                  [--associated-inbound-routemap]
                                  [--associated-outbound-routemap]
                                  [--internet-security {0, 1, f, false, n, no, t, true, y, yes}]
                                  [--labels]
                                  [--next-hop]
                                  [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                  [--propagated --propagated-route-tables]
                                  [--remote-vnet-transit {0, 1, f, false, n, no, t, true, y, yes}]
                                  [--route-name]
                                  [--use-hub-vnet-gateways {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Create a virtual hub VNet connection without routing configuration.

az network vhub connection create -n MyConnection --vhub-name MyHub -g MyRG --remote-vnet MyVNet

Create a virtual hub VNet connection with routing configuration.

az network vhub connection create -n MyConnection --vhub-name MyHub -g MyRG --remote-vnet MyVNet --associated-route-table /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/RouteTable1 --propagated-route-tables /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/RouteTable1 /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/RouteTable2 --labels label1 label2 --route-name route1 --next-hop 70.0.0.2 --address-prefixes 10.80.0.0/16 10.90.0.0/16

Required Parameters

--name -n

Name of the connection.

--remote-vnet

Name of ID of the remote VNet to connect to.

--resource-group -g

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

--vhub-name

Name of the virtual hub.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--address-prefixes
Preview

Space-separated list of all address prefixes. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Routing Configuration Arguments
--associated --associated-route-table
Preview

Resource ID of route table associated with this routing configuration.

Property Value
Parameter group: Routing Configuration Arguments
--associated-inbound-routemap

Resource URI of inbound routemap for this connection's routing configuration.

Property Value
Parameter group: Routing Configuration Arguments
--associated-outbound-routemap

Resource URI of outbound routemap for this connection's routing configuration.

Property Value
Parameter group: Routing Configuration Arguments
--internet-security

Enable internet security and default is enabled.

Property Value
Default value: True
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--labels
Preview

Space-separated list of labels for propagated route tables. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Routing Configuration Arguments
--next-hop
Preview

IP address of the next hop.

Property Value
Parameter group: Routing Configuration Arguments
--no-wait

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

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--propagated --propagated-route-tables
Preview

Space-separated list of resource ID of propagated route tables. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Routing Configuration Arguments
--remote-vnet-transit

Deprecated: Enable hub to remote VNet transit.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--route-name
Preview

Name of the static route that is unique within a VNet route.

Property Value
Parameter group: Routing Configuration Arguments
--use-hub-vnet-gateways

Deprecated: Allow remote VNet to use hub's VNet gateways.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az network vhub connection delete

Delete a virtual hub VNet connection.

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

Examples

Delete a virtual hub VNet connection.

az network vhub connection delete -n MyConnection --vhub-name MyHub -g MyRG

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the connection.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
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>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vhub-name

Name of the virtual hub.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az network vhub connection list

List virtual hub VNet connections.

az network vhub connection list --resource-group
                                --vhub-name
                                [--max-items]
                                [--next-token]

Examples

List VNet connections in a given virtual hub.

az network vhub connection list --vhub-name MyHub -g MyRG

Required Parameters

--resource-group -g

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

--vhub-name

Name of the virtual hub.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az network vhub connection show

Get the details of a virtual hub VNet connection.

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

Examples

Get the details of a virtual hub VNet connection.

az network vhub connection show -n MyConnection --vhub-name MyHub -g MyRG

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the connection.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vhub-name

Name of the virtual hub.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az network vhub connection update

Update settings of a virtual hub connection.

az network vhub connection update [--add]
                                  [--associated --associated-route-table]
                                  [--associated-inbound-routemap]
                                  [--associated-outbound-routemap]
                                  [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                  [--ids]
                                  [--labels]
                                  [--name]
                                  [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                  [--propagated --propagated-route-tables]
                                  [--remove]
                                  [--resource-group]
                                  [--set]
                                  [--subscription]
                                  [--vhub-name]

Examples

Add labels for propagated route tables under routing configuration.

az network vhub connection update -n MyConnection --vhub-name MyHub -g MyRG --labels Newlabel1 Newlabel2

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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>.

Property Value
Parameter group: Generic Update Arguments
--associated --associated-route-table
Preview

Resource ID of route table associated with this routing configuration.

Property Value
Parameter group: Routing Configuration Arguments
--associated-inbound-routemap

Resource URI of inbound routemap for this connection's routing configuration.

Property Value
Parameter group: Routing Configuration Arguments
--associated-outbound-routemap

Resource URI of outbound routemap for this connection's routing configuration.

Property Value
Parameter group: Routing Configuration Arguments
--force-string

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

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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.

Property Value
Parameter group: Resource Id Arguments
--labels
Preview

Space-separated list of labels for propagated route tables. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Routing Configuration Arguments
--name -n

Name of the connection.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--propagated --propagated-route-tables
Preview

Space-separated list of resource ID of propagated route tables. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Routing Configuration Arguments
--remove

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

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vhub-name

Name of the virtual hub.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az network vhub connection wait

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

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

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

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--name -n

Name of the connection.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--vhub-name

Name of the virtual hub.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False