az afd rule condition

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Commands

Name Description Type Status
az afd rule condition add

Update a new delivery rule within the specified rule set.

Core GA
az afd rule condition add (cdn extension)

Update a new delivery rule within the specified rule set.

Extension GA
az afd rule condition list

Get an existing delivery rule within a rule set.

Core GA
az afd rule condition list (cdn extension)

Get an existing delivery rule within a rule set.

Extension GA
az afd rule condition remove

Update a new delivery rule within the specified rule set.

Core GA
az afd rule condition remove (cdn extension)

Update a new delivery rule within the specified rule set.

Extension GA

az afd rule condition add

Update a new delivery rule within the specified rule set.

az afd rule condition add [--acquire-policy-token]
                          [--actions]
                          [--add]
                          [--change-reference]
                          [--conditions]
                          [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                          [--ids]
                          [--match-processing-behavior {Continue, Stop}]
                          [--name --rule-name]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--order]
                          [--profile-name]
                          [--remove]
                          [--resource-group]
                          [--rule-set-name]
                          [--set]
                          [--subscription]

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--actions

A list of actions that are executed when all the conditions of a rule are satisfied. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--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>.

Property Value
Parameter group: Generic Update Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--conditions

A list of conditions that must be matched for the actions to be executed Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--match-processing-behavior

If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.

Property Value
Parameter group: Properties Arguments
Accepted values: Continue, Stop
--name --rule-name -n

Name of the delivery rule which is unique within the endpoint.

Property Value
Parameter group: Resource Id Arguments
--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
--order

The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.

Property Value
Parameter group: Properties Arguments
--profile-name

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Property Value
Parameter group: Resource Id Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--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
--rule-set-name

Name of the rule set under the profile.

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update 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
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

az afd rule condition add (cdn extension)

Update a new delivery rule within the specified rule set.

az afd rule condition add [--acquire-policy-token]
                          [--actions]
                          [--add]
                          [--change-reference]
                          [--conditions]
                          [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                          [--ids]
                          [--match-processing-behavior {Continue, Stop}]
                          [--name --rule-name]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--order]
                          [--profile-name]
                          [--remove]
                          [--resource-group]
                          [--rule-set-name]
                          [--set]
                          [--subscription]

Examples

Rules_Update

az afd rule update --resource-group RG --profile-name profile1 --rule-set-name ruleSet1 --rule-name rule1 --actions "[{name:ModifyResponseHeader,parameters:{headerAction:Overwrite,headerName:X-CDN,typeName:DeliveryRuleHeaderActionParameters,value:MSFT}}]" --conditions "[{name:RequestMethod,parameters:{matchValues:[GET],negateCondition:False,operator:Equal,typeName:DeliveryRuleRequestMethodConditionParameters}}]" --order 1

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--actions

A list of actions that are executed when all the conditions of a rule are satisfied. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--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>.

Property Value
Parameter group: Generic Update Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--conditions

A list of conditions that must be matched for the actions to be executed Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--match-processing-behavior

If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.

Property Value
Parameter group: Properties Arguments
Accepted values: Continue, Stop
--name --rule-name -n

Name of the delivery rule which is unique within the endpoint.

Property Value
Parameter group: Resource Id Arguments
--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
--order

The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.

Property Value
Parameter group: Properties Arguments
--profile-name

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Property Value
Parameter group: Resource Id Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--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
--rule-set-name

Name of the rule set under the profile.

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update 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
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

az afd rule condition list

Get an existing delivery rule within a rule set.

az afd rule condition list [--ids]
                           [--name --rule-name]
                           [--profile-name]
                           [--resource-group]
                           [--rule-set-name]
                           [--subscription]

Examples

show details of the delivery rule with name rule1.

az afd rule show -g group --rule-set-name ruleSetName --profile-name profile --rule-name rule1

Optional Parameters

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

--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
--name --rule-name -n

Name of the delivery rule which is unique within the endpoint.

Property Value
Parameter group: Resource Id Arguments
--profile-name

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Property Value
Parameter group: Resource Id Arguments
--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
--rule-set-name

Name of the rule set under the profile.

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

az afd rule condition list (cdn extension)

Get an existing delivery rule within a rule set.

az afd rule condition list [--ids]
                           [--name --rule-name]
                           [--profile-name]
                           [--resource-group]
                           [--rule-set-name]
                           [--subscription]

Examples

show details of the delivery rule with name rule1.

az afd rule show -g group --rule-set-name ruleSetName --profile-name profile --rule-name rule1

Optional Parameters

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

--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
--name --rule-name -n

Name of the delivery rule which is unique within the endpoint.

Property Value
Parameter group: Resource Id Arguments
--profile-name

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Property Value
Parameter group: Resource Id Arguments
--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
--rule-set-name

Name of the rule set under the profile.

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

az afd rule condition remove

Update a new delivery rule within the specified rule set.

az afd rule condition remove [--acquire-policy-token]
                             [--actions]
                             [--add]
                             [--change-reference]
                             [--conditions]
                             [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                             [--ids]
                             [--match-processing-behavior {Continue, Stop}]
                             [--name --rule-name]
                             [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                             [--order]
                             [--profile-name]
                             [--remove]
                             [--resource-group]
                             [--rule-set-name]
                             [--set]
                             [--subscription]

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--actions

A list of actions that are executed when all the conditions of a rule are satisfied. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--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>.

Property Value
Parameter group: Generic Update Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--conditions

A list of conditions that must be matched for the actions to be executed Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--match-processing-behavior

If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.

Property Value
Parameter group: Properties Arguments
Accepted values: Continue, Stop
--name --rule-name -n

Name of the delivery rule which is unique within the endpoint.

Property Value
Parameter group: Resource Id Arguments
--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
--order

The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.

Property Value
Parameter group: Properties Arguments
--profile-name

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Property Value
Parameter group: Resource Id Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--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
--rule-set-name

Name of the rule set under the profile.

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update 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
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

az afd rule condition remove (cdn extension)

Update a new delivery rule within the specified rule set.

az afd rule condition remove [--acquire-policy-token]
                             [--actions]
                             [--add]
                             [--change-reference]
                             [--conditions]
                             [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                             [--ids]
                             [--match-processing-behavior {Continue, Stop}]
                             [--name --rule-name]
                             [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                             [--order]
                             [--profile-name]
                             [--remove]
                             [--resource-group]
                             [--rule-set-name]
                             [--set]
                             [--subscription]

Examples

Rules_Update

az afd rule update --resource-group RG --profile-name profile1 --rule-set-name ruleSet1 --rule-name rule1 --actions "[{name:ModifyResponseHeader,parameters:{headerAction:Overwrite,headerName:X-CDN,typeName:DeliveryRuleHeaderActionParameters,value:MSFT}}]" --conditions "[{name:RequestMethod,parameters:{matchValues:[GET],negateCondition:False,operator:Equal,typeName:DeliveryRuleRequestMethodConditionParameters}}]" --order 1

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--actions

A list of actions that are executed when all the conditions of a rule are satisfied. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--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>.

Property Value
Parameter group: Generic Update Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--conditions

A list of conditions that must be matched for the actions to be executed Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--match-processing-behavior

If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.

Property Value
Parameter group: Properties Arguments
Accepted values: Continue, Stop
--name --rule-name -n

Name of the delivery rule which is unique within the endpoint.

Property Value
Parameter group: Resource Id Arguments
--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
--order

The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.

Property Value
Parameter group: Properties Arguments
--profile-name

Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.

Property Value
Parameter group: Resource Id Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--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
--rule-set-name

Name of the rule set under the profile.

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update 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
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