แชร์ผ่าน


az network vhub route-map

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

Manage route map.

Commands

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

Create a route map.

az network vhub route-map create --name
                                 --resource-group
                                 --vhub-name
                                 [--inbound-connection]
                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--outbound-connections]
                                 [--rules]

Examples

Create route map

az network vhub route-map create -n route-map-name -g rg --vhub-name vhub-name

Required Parameters

--name --route-map-name -n

The name of the RouteMap.

--resource-group -g

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

--vhub-name

The name of the VirtualHub containing the RouteMap.

Optional Parameters

--inbound-connection

List of connections which have this RoutMap associated for inbound traffic. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--no-wait

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

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

List of connections which have this RoutMap associated for outbound traffic. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--rules

List of RouteMap rules to be applied. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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 route-map delete

Delete a route map.

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

Examples

Delete route map

az network vhub route-map delete -n route-map-name -g rg --vhub-name vhub-name

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 --route-map-name -n

The name of the RouteMap.

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

--vhub-name

The name of the VirtualHub containing the RouteMap.

--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 route-map get-inbound-routes

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

az network vhub route-map get-inbound-routes [--connection-type]
                                             [--ids]
                                             [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                             [--resource-group]
                                             [--resource-uri]
                                             [--subscription]
                                             [--vhub-name]

Examples

Get inbound routes

az network vhub route-map get-inbound-routes -g rg --vhub-name vhub-name --connection-type ExpressRouteConnection --resource-uri /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1

Optional Parameters

--connection-type

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

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

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

--resource-uri

The connection resource whose inbound routes are being requested.

--subscription

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

--vhub-name

The name of the VirtualHub.

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 route-map get-outbound-routes

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

az network vhub route-map get-outbound-routes [--connection-type]
                                              [--ids]
                                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                              [--resource-group]
                                              [--resource-uri]
                                              [--subscription]
                                              [--vhub-name]

Examples

Get outbound routes

az network vhub route-map get-outbound-routes -g rg --vhub-name vhub-name --connection-type ExpressRouteConnection --resource-uri /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1

Optional Parameters

--connection-type

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

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

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

--resource-uri

The connection resource whose outbound routes are being requested.

--subscription

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

--vhub-name

The name of the VirtualHub.

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

List routem maps by resource group.

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

Examples

List route maps by resource group

az network vhub route-map list -g rg --vhub-name 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

The name of the VirtualHub containing the RouteMap.

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

Show the details of a route map.

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

Examples

Sho a route map

az network vhub route-map show -n route-map-name -g rg --vhub-name vhub-name

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 --route-map-name -n

The name of the RouteMap.

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

--vhub-name

The name of the VirtualHub containing the RouteMap.

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

Update a route map.

az network vhub route-map update [--add]
                                 [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--ids]
                                 [--inbound-connection]
                                 [--name]
                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--outbound-connections]
                                 [--remove]
                                 [--resource-group]
                                 [--rules]
                                 [--set]
                                 [--subscription]
                                 [--vhub-name]

Examples

Update route map

az network vhub route-map update -n route-map-name -g rg --vhub-name vhub-name --rules "[{name:rule1,matchCriteria:[{matchCondition:Contains,routePrefix:[10.0.0.0/8]}],actions:[{type:Add,parameters:[{asPath:[22334]}]}]}]"

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

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

--inbound-connection

List of connections which have this RoutMap associated for inbound traffic. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--name --route-map-name -n

The name of the RouteMap.

--no-wait

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

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

List of connections which have this RoutMap associated for outbound traffic. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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

--rules

List of RouteMap rules to be applied. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--set

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

--subscription

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

--vhub-name

The name of the VirtualHub containing the RouteMap.

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 route-map wait

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

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

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 --route-map-name -n

The name of the RouteMap.

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

The name of the VirtualHub containing the RouteMap.

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.