"az afd rule create" is not working properly

Ramanarajan D 41 Reputation points
2026-08-08T08:19:48.4566667+00:00

Hello,

Recently, the Azure CLI CDN functionality was migrated, starting with CLI version 2.88.0. As a result, some of the parameters previously used in our pipeline are no longer available, causing the pipeline to fail.User's image

When I check the new documentation I got this

User's image

Old code:

az afd rule create \
                --name 'BlobContainer$(ticketID)' \
                --resource-group $(resourceGroupName) \
                --profile-name $(afdProfileName) \
                --action-name 'UrlRewrite' \
                --source-pattern / \
                --destination '/web-com-staticassets/' \
                --preserve-unmatched-path true \
                --rule-set-name 'staticassetsstorage$(ticketID)'

Now the options are moved inside --actions parameter. But it is not working . Please check the below screenshot.
User's image

Direct link of Azure CLI az afd rule documentation: https://learn.microsoft.com/en-us/cli/azure/afd/rule?view=azure-cli-latest#az-afd-rule-create

What is this Try "??" to show more?

User's image

How can I achieve my original requirement? please refer code block "Old code"

Azure Front Door
Azure Front Door

An Azure service that provides a cloud content delivery network with threat protection.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.