Azure / Azure/azure-cli

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

Open
#30,043 1 comment 0 reactions 1 assignee Claimed by @necusjz View on GitHub
act-quality-productivity-squad Auto-Assign Azure CLI Team Network potential-pruning question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.