Share via


az network vhub route-map rule

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

Manage route map rule.

Commands

Name Description Type Status
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 rule add

Add route map rule.

az network vhub route-map rule add --resource-group
                                   --route-map-name
                                   --vhub-name
                                   [--actions]
                                   [--match-criteria]
                                   [--name]
                                   [--next-step {Continue, Terminate, Unknown}]
                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--rule-index]

Examples

Add rule to route map

az network vhub route-map rule add --name rule-name -g rg --route-map-name routemap-name --vhub-name vhub-name --match-criteria "[{matchCondition:Contains,routePrefix:[10.0.0.1/8]}]" --actions "[{type:Add,parameters:[{asPath:[22335]}]}]" --next-step Continue

Required Parameters

--resource-group -g

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

--route-map-name

The name of the RouteMap.

--vhub-name

The name of the VirtualHub containing the RouteMap.

Optional Parameters

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

--actions

List of actions which will be applied on a match. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: RouteMapParameters.properties.rules[] Arguments
--match-criteria

List of matching criterion which will be applied to traffic. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: RouteMapParameters.properties.rules[] Arguments
--name

The unique name for the rule.

Property Value
Parameter group: RouteMapParameters.properties.rules[] Arguments
--next-step

Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.

Property Value
Parameter group: RouteMapParameters.properties.rules[] Arguments
Accepted values: Continue, Terminate, Unknown
--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
--rule-index

The index of the route map rule.

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

Delete route map rule.

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

Examples

Delete rule

az network vhub route-map rule delete -g rg --route-map-name routemap-name --vhub-name vhub-name --rule-index 1

Required Parameters

--resource-group -g

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

--route-map-name

The name of the RouteMap.

--rule-index

The index of the route map rule.

--vhub-name

The name of the VirtualHub containing the RouteMap.

Optional Parameters

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

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

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

List route map rules.

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

Examples

List route map rules

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

--route-map-name

The name of the RouteMap.

--vhub-name

The name of the VirtualHub containing the RouteMap.

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

Show route map rule.

az network vhub route-map rule show --resource-group
                                    --route-map-name
                                    --rule-index
                                    --vhub-name

Examples

Show route map rule

az network vhub route-map rule show -g rg --route-map-name routemap-name --vhub-name vhub-name --rule-index 0

Required Parameters

--resource-group -g

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

--route-map-name

The name of the RouteMap.

--rule-index

The index of the route map rule.

--vhub-name

The name of the VirtualHub containing the RouteMap.

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

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

az network vhub route-map rule wait [--created]
                                    [--custom]
                                    [--deleted]
                                    [--exists]
                                    [--ids]
                                    [--interval]
                                    [--resource-group]
                                    [--route-map-name]
                                    [--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
--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
--route-map-name

The name of the RouteMap.

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

The name of the VirtualHub containing the RouteMap.

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