az network vhub connection

Manage virtual hub VNet connections.

Commands

az network vhub connection create

Create a virtual hub VNet connection.

az network vhub connection delete

Delete a virtual hub VNet connection.

az network vhub connection list

List virtual hub VNet connections.

az network vhub connection show

Get the details of a virtual hub VNet connection.

az network vhub connection wait

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

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]
                                  [--internet-security {false, true}]
                                  [--labels]
                                  [--next-hop]
                                  [--no-wait]
                                  [--propagated]
                                  [--remote-vnet-transit {false, true}]
                                  [--route-name]
                                  [--use-hub-vnet-gateways {false, true}]

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

--address-prefixes

Space-separated list of all address prefixes.

--associated --associated-route-table

The resource id of route table associated with this routing configuration.

--internet-security

Enable internet security and default is enabled.

accepted values: false, true
default value: 1
--labels

Space-separated list of labels for propagated route tables.

--next-hop

The ip address of the next hop.

--no-wait

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

--propagated --propagated-route-tables

Space-separated list of resource id of propagated route tables.

--remote-vnet-transit

Enable hub to remote VNet transit.

accepted values: false, true
--route-name

The name of the Static Route that is unique within a Vnet Route.

--use-hub-vnet-gateways

Allow remote VNet to use hub's VNet gateways.

accepted values: false, true

az network vhub connection delete

Delete a virtual hub VNet connection.

az network vhub connection delete --name
                                  --resource-group
                                  --vhub-name
                                  [--no-wait]
                                  [--yes]

Examples

Delete a virtual hub VNet connection.

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

Required Parameters

--name -n

Name of the connection.

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

--no-wait

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

--yes -y

Do not prompt for confirmation.

az network vhub connection list

List virtual hub VNet connections.

az network vhub connection list --resource-group
                                --vhub-name

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.

az network vhub connection show

Get the details of a virtual hub VNet connection.

az network vhub connection show --name
                                --resource-group
                                --vhub-name

Examples

Get the details of a virtual hub VNet connection.

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

Required Parameters

--name -n

Name of the connection.

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

az network vhub connection wait

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

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

Required Parameters

--name -n

Name of the connection.

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

--created

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

--custom

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

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.