Skip to content

az-network-application-gateway-waf-policy-custom-rule-create : matchConditions should not be optional and must be not empty #30043

Description

@yanivsag

Describe the bug

according to https://learn.microsoft.com/en-us/cli/azure/network/application-gateway/waf-policy/custom-rule?view=azure-cli-latest&tryIt=true&source=docs#az-network-application-gateway-waf-policy-custom-rule-create

the matchConditions parameter is optional and can contain an empty list while it is not.

Related command

az network application-gateway waf-policy custom-rule create

Errors

not providing match conditions will result in validation error

Issue script & Debug output

az network application-gateway waf-policy custom-rule create --action Allow --name test --policy-name test --priority 100 --resource-group AZFW-SME-RG --rule-type MatchRule

(ApplicationGatewayFirewallCustomRuleInvalidPriority) Custom Rule 'test' does not have a match condition defined in context 'properties.customRules[0]'.
Code: ApplicationGatewayFirewallCustomRuleNoMatchConditionNotSupported
Message: Custom Rule 'test' does not have a match condition defined in context 'properties.customRules[0]'.

Expected behavior

the command itself is OK, the problem is with the help hint and documentation

Environment Summary

$ az version
{
"azure-cli": "2.65.0",
"azure-cli-core": "2.65.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"ai-examples": "0.2.5",
"ml": "2.30.1",
"ssh": "2.0.5"
}
}

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...act-quality-productivity-squadpotential-pruningquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions