-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Unclear docs and error message for --match-conditions format #29010
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Related command
Is your feature request related to a problem? Please describe.
When reading docs / looking at examples, I was not able to find any relevant information about how
--match-conditionsshould be formatted.When I ran this command I got the error
Failed to parse '--match-conditions' argument: Model 'AAZObjectArg' has no field named 'RemoteAddr'When running
--match-conditionswith??for docs it suggestedvariables [Required] Space-separated list of variables to use when matching. Variable values: RemoteAddr, RequestMethod, QueryString, PostArgs, RequestUri, RequestHeaders, RequestBody, RequestCookies. Try "??" to show more..Documentation on azure-cli docs doesn't present any examples on
--match-conditions.Solution to this was to pass variables as an array of objects, where each key should have one of the values from
RemoteAddr, RequestMethod, QueryString, PostArgs, RequestUri, RequestHeaders, RequestBody, RequestCookie.Correct format:
Describe the solution you'd like
The error message returned did not describe clear enough what the problem was, it suggested the variables key was not correct, but the docs referred to that it should be one of the
RemoteAddr, RequestMethod, QueryString, PostArgs, RequestUri, RequestHeaders, RequestBody, RequestCookie.Describe alternatives you've considered
Including example payloads of --match-conditions.
Additional context