az network vhub route-table

Manage route table in the virtual hub.

Commands

az network vhub route-table create

Create a route table in the virtual hub.

az network vhub route-table delete

Delete a route table in the virtual hub.

az network vhub route-table list

List all route tables in the virtual hub.

az network vhub route-table route

Manage routes of route table in the virtual hub.

az network vhub route-table route add

Add a route into route table of the virtual hub.

az network vhub route-table route list

List routes in the virtual hub route table.

az network vhub route-table route remove

Remove a route from route table of the virtual hub.

az network vhub route-table show

Show a route table in the virtual hub.

az network vhub route-table update

Update a route table in the virtual hub.

az network vhub route-table wait

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

az network vhub route-table create

Create a route table in the virtual hub.

az network vhub route-table create --name
                                   --resource-group
                                   --vhub-name
                                   [--connections {All_Branches, All_Vnets}]
                                   [--destination-type {CIDR, ResourceId, Service}]
                                   [--destinations]
                                   [--labels]
                                   [--next-hop]
                                   [--next-hop-type {IPAddress, ResourceId}]
                                   [--next-hops]
                                   [--no-wait]
                                   [--route-name]

Examples

Create a v2 route table in the virtual hub.

az network vhub route-table create -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --connections All_Vnets --destination-type CIDR --destinations "10.4.0.0/16" "10.6.0.0/16" --next-hop-type IPAddress --next-hops "10.0.0.68"

Create a v3 route table in the virtual hub.

az network vhub route-table create -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --route-name MyRoute --destination-type CIDR --destinations "10.4.0.0/16" "10.6.0.0/16" --next-hop-type ResourceId --next-hop /subscriptions/MySub/resourceGroups/MyResourceGroup/providers/Microsoft.Network/azureFirewalls/MyFirewall --labels label1 label2

Required Parameters

--name -n

Name of the virtual hub route table.

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

--connections

List of all connections attached to this route table.

accepted values: All_Branches, All_Vnets
--destination-type

The type of destinations.

accepted values: CIDR, ResourceId, Service
--destinations

Space-separated list of all destinations.

--labels

Space-separated list of all labels associated with this route table.

--next-hop

The resource ID of the next hop.

--next-hop-type

The type of next hop. If --next-hops (v2) is provided, it should be IPAddress; if --next-hop (v3) is provided, it should be ResourceId.

accepted values: IPAddress, ResourceId
--next-hops

Space-separated list of IP address of the next hop. Currently only one next hop is allowed for every route.

--no-wait

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

--route-name

The name of the route.

az network vhub route-table delete

Delete a route table in the virtual hub.

az network vhub route-table delete --name
                                   --resource-group
                                   --vhub-name

Examples

Delete a route table in the virtual hub.

az network vhub route-table delete -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub

Required Parameters

--name -n

Name of the virtual hub route table.

--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 route-table list

List all route tables in the virtual hub.

az network vhub route-table list --resource-group
                                 --vhub-name

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 route-table show

Show a route table in the virtual hub.

az network vhub route-table show --name
                                 --resource-group
                                 --vhub-name

Required Parameters

--name -n

Name of the virtual hub route table.

--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 route-table update

Update a route table in the virtual hub.

az network vhub route-table update --name
                                   --resource-group
                                   --vhub-name
                                   [--connections {All_Branches, All_Vnets}]
                                   [--labels]
                                   [--no-wait]

Examples

Update the connections for a v2 route table in the virtual hub.

az network vhub route-table update -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --connections All_Vnets All_Branches

Update the labels for a v3 route table in the virtual hub.

az network vhub route-table update -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --labels label1 label2

Required Parameters

--name -n

Name of the virtual hub route table.

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

--connections

List of all connections attached to this route table.

accepted values: All_Branches, All_Vnets
--labels

Space-separated list of all labels associated with this route table.

--no-wait

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

az network vhub route-table wait

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

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

Examples

Pause executing next line of CLI script until the route table is successfully provisioned.

az network vhub route-table wait -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --created

Required Parameters

--name -n

Name of the virtual hub route table.

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