az-network-application-gateway-waf-policy-custom-rule-create : matchConditions should not be optional and must be not empty #30043
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
Network
az network vnet/lb/nic/dns/etc...
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
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
The text was updated successfully, but these errors were encountered: