CmdID

CmdID / az / az cdn / az cdn endpoint / az cdn endpoint rule

az cdn endpoint rule add

Add a delivery rule to a CDN endpoint. Azure CLI extensions reference

3 examples 1 option Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Create a global rule to disable caching.

az cdn endpoint rule add -g group -n endpoint --profile-name profile --order 0 --rule-name global --action-name CacheExpiration --cache-behavior BypassCacheIdentify
-gName of resource group.
-nName of the CDN endpoint.
--rule-nameName of the rule, only required for Microsoft SKU.

Create a rule for http to https redirect.

az cdn endpoint rule add -g group -n endpoint --profile-name profile --order 1 --rule-name "redirect" --match-variable RequestScheme --operator Equal --match-values HTTP --action-name "UrlRedirect" --redirect-protocol Https --redirect-type MovedIdentify
-gName of resource group.
-nName of the CDN endpoint.
--rule-nameName of the rule, only required for Microsoft SKU.

Create a rule to distribute requests with "/test1" in its URL path to origin group with name "origingroup1".

az cdn endpoint rule add -g group -n endpoint --profile-name profile --order 1 --rule-name "origin-group-override" --match-variable UrlPath --operator Contains --match-values /test1 --action-name "OriginGroupOverride" --origin-group origingroup1Identify
-gName of resource group.
-nName of the CDN endpoint.
--rule-nameName of the rule, only required for Microsoft SKU.

Options

1 in the Azure CLI extensions reference
--rule-nameName of the rule, only required for Microsoft SKU.