How to add/edit rules in Azure CDN Verizon Rules Engine by API or Azure CLI?

Mohamed Benchohra 5 Reputation points
2024-09-10T12:43:54.74+00:00

How to add/edit rules in Azure CDN Verizon Rules Engine by API or Azure CLI?

Azure Content Delivery Network
{count} vote

1 answer

Sort by: Most helpful
  1. Sai Prasanna Sinde 1,265 Reputation points Microsoft Vendor
    2024-09-11T12:49:21.3433333+00:00

    Hi @Mohamed Benchohra,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    Please try the below steps to add/edit rules in Azure CDN Verizon Rules Engine:

    To add or edit rules in Azure CDN Verizon Rules Engine, you can use the Azure CLI or API. The Azure CLI provides a command Az CDN endpoint rule that allows you to add, update, or delete rules.

    1.  To add the rule using Azure CLI, check the below command:
         az cdn endpoint rule add --action-name <action_name> --order <order> --rule-name <rule_name> --cache-behavior <cache_behavior>
      
    2. To edit the rule using Azure CLI, check the command:
         az cdn endpoint rule update --action-name <action_name> --order <order> --rule-name <rule_name> --cache-behavior <cache_behavior>
      

    For your reference: https://learn.microsoft.com/en-us/cli/azure/cdn/endpoint/rule/action?view=azure-cli-latest#az-cdn-endpoint-rule-action-add

    • Ensure you are using the correct rules engine for your needs - the HTTP Large tab is generally used for Azure Blob Storage configurations.
    • Use the Azure CLI commands stated above, replacing placeholders with actual values relevant to your configuration.
    • Once rules have been added or edited, ensure to deploy them. This process may take time to propagate across the system.

    Please try above steps, if you face any issues, please feel free to contact us.

    If the answer is helpful, please click "Accept Answer" and "Upvote it."

    Regards,

    Sai Prasanna.

    0 comments No comments

Your answer

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