Description
Type of issue
Code doesn't work
Feedback
I tried executing this command:
az afd rule create --resource-group xxxxxx --profile-name xxxxxxx --rule-set-name xxxxxxx --name xxxxxx --order 1 --match-processing-behavior Continue --match-variable RequestUri --operator BeginsWith --match-values 'xxxxxxxx' --negate-condition false --action-name RouteConfigurationOverride --cache-behavior OverrideAlways --cache-duration '365.23:59:59' --enable-compression true --query-string-caching-behavior IgnoreQueryString --origin-group '/subscriptions/xxxxxxx/resourcegroups/rg-ledger-germanywest-prod/providers/Microsoft.Cdn/profiles/frontdoor-xxxxxxx/origingroups/xxxxxxx' --forwarding-protocol MatchRequest
According to the docs, --cache-duration is in the valid format ([d.]hh:mm:ss)
Still, the following error is printed:
InvalidArgumentValue: --cache-duration: Unable to parse: '365.23:59:59'. Expected format: Format: time (hh:mm:ss.xxxxxx)
Page URL
https://learn.microsoft.com/en-us/cli/azure/afd/rule?view=azure-cli-latest
Content source URL
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/afd/rule.yml
Author
Document Id
d4e72781-eadc-1f91-46cc-f8f40bb0d7ae
Activity
ManoharLakkoju-MSFT commentedon Sep 24, 2024
@umuel8462
Thanks for your feedback! We will investigate and update as appropriate.
dbradish-microsoft commentedon Sep 24, 2024
@umuel8462, the
invalid argument
error is often due to quoting, an escape character or spacing. Read more about the causes and possible remediations for this error in the Azure CLI troubleshooting guide.Can you kindly answer two questions?
--debug
parameter, and send me the output. This will help me to understand how your environment (aka scripting language) is parsing the Azure CLI command.In the interim, I've opened a GitHub issue for the ML engineering team. You can see that here: Github issue 29970.
dennisjnnh commentedon Sep 26, 2024
Hi @dbradish-microsoft,
I am running the CLI in Bash on my mac.
here is the output with the --debug parameter:
dbradish-microsoft commentedon Oct 9, 2024
Hello, @umuel8462 , I've heard back from the engineering team, and the correct format for the
--cache-duration
ishh:mm:ss.xxxxxx
. Because of your feedback, the documentation has been updated in PR 29977, and the correction will be seen in the next Azure CLI release. Thank you for helping to make Azure CLI reference content more accurate.