az network vhub route-table route
Manage routes of route table in the virtual hub.
Commands
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 route add
Add a route into route table of the virtual hub.
az network vhub route-table route add --destination-type {CIDR, ResourceId, Service}
--destinations
--name
--next-hop-type {IPAddress, ResourceId}
--resource-group
--vhub-name
[--next-hop]
[--next-hops]
[--no-wait]
[--route-name]
Examples
Add a route with CIDR destination into route table of the virtual hub (route table v2).
az network vhub route-table route add -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --destination-type CIDR --destinations "10.4.0.0/16" "10.6.0.0/16" --next-hop-type IPAddress --next-hops "10.0.0.68"
Add a route with Service destination into route table of the virtual hub (route table v2).
az network vhub route-table route add -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --destination-type Service --destinations Skype Sharepoint --next-hop-type IPAddress --next-hops "10.0.0.68"
Add a route with firewall as next hop into route table of the virtual hub (route table v3).
az network vhub route-table route add -n MyRouteTable -g MyResourceGroup --vhub-name MyVhub --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
Required Parameters
The type of destinations.
Space-separated list of all destinations.
Name of the virtual hub route table.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the virtual hub.
Optional Parameters
The resource ID of the next hop.
Space-separated list of IP address of the next hop. Currently only one next hop is allowed for every route.
Do not wait for the long-running operation to finish.
The name of the route.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network vhub route-table route list
List routes in the virtual hub route table.
az network vhub route-table route list --name
--resource-group
--vhub-name
Required Parameters
Name of the virtual hub route table.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the virtual hub.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network vhub route-table route remove
Remove a route from route table of the virtual hub.
az network vhub route-table route remove --index
--name
--resource-group
--vhub-name
[--no-wait]
Required Parameters
List index of the item (starting with 1).
Name of the virtual hub route table.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the virtual hub.
Optional Parameters
Do not wait for the long-running operation to finish.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.