az afd route
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage routes under an AFD endpoint.
A route maps your domains and matching URL path patterns to a specific origin group.
Commands
Name | Description | Type | Status |
---|---|---|---|
az afd route create |
Creates a new route within the specified endpoint. |
Core | Preview |
az afd route delete |
Delete an existing route within the specified endpoint. |
Core | Preview |
az afd route list |
List all the routes within the specified endpoint. |
Core | Preview |
az afd route show |
Show route details. |
Core | Preview |
az afd route update |
Update an existing route within the specified endpoint. |
Core | Preview |
az afd route create
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Creates a new route within the specified endpoint.
az afd route create --endpoint-name
--forwarding-protocol {HttpOnly, HttpsOnly, MatchRequest}
--https-redirect {Disabled, Enabled}
--origin-group
--profile-name
--resource-group
--route-name
--supported-protocols {Http, Https}
[--content-types-to-compress]
[--custom-domains]
[--enable-caching {false, true}]
[--enable-compression {false, true}]
[--enabled-state {Disabled, Enabled}]
[--link-to-default-domain {Disabled, Enabled}]
[--origin-path]
[--patterns-to-match]
[--query-parameters]
[--query-string-caching-behavior {IgnoreQueryString, IgnoreSpecifiedQueryStrings, IncludeSpecifiedQueryStrings, UseQueryString}]
[--rule-sets]
Examples
Creates a route to associate the endpoint's default domain with an origin group for all HTTPS requests.
az afd route create -g group --endpoint-name endpoint1 --profile-name profile --route-name route1 --https-redirect Disabled --origin-group og001 --supported-protocols Https --link-to-default-domain Enabled --forwarding-protocol MatchRequest
Creates a route to associate the endpoint's default domain with an origin group for all requests and use the specified rule sets to customize the route behavior.
az afd route create -g group --endpoint-name endpoint1 --profile-name profile --route-name route1 --rule-sets ruleset1 rulseset2 --origin-group og001 --supported-protocols Http Https --link-to-default-domain Enabled --forwarding-protocol MatchRequest --https-redirect Disabled
Creates a route to associate the endpoint's default domain and a custom domain with an origin group for all requests with the specified path patterns and redirect all trafic to use Https.
az afd route create -g group --endpoint-name endpoint1 --profile-name profile --route-name route1 --patterns-to-match /test1/* /tes2/* --origin-group og001 --supported-protocols Http Https --custom-domains cd001 --forwarding-protocol MatchRequest --https-redirect Enabled --link-to-default-domain Enabled
Required Parameters
Name of the endpoint.
Protocol this rule will use when forwarding traffic to backends.
Whether to automatically redirect HTTP traffic to HTTPS traffic.
Name or ID of the origin group to be associated with.
Name of the CDN profile which is unique within the resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the route.
List of supported protocols for this route.
Optional Parameters
List of content types on which compression applies. The value should be a valid MIME type.
Custom domains referenced by this endpoint.
Indicates whether caching is enanbled on that route.
Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
Whether to enable this route.
Whether this route will be linked to the default endpoint domain.
A directory path on the origin that Azure Front Door can use to retrieve content from.
The route patterns of the rule.
Query parameters to include or exclude.
Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.
Collection of ID or name of rule set referenced by the route.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az afd route delete
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete an existing route within the specified endpoint.
az afd route delete [--endpoint-name]
[--ids]
[--profile-name]
[--resource-group]
[--route-name]
[--subscription]
[--yes]
Examples
Delete a route named route1.
az afd route delete -g group --profile-name profile --endpoint-name endpoint1 --route-name route1
Optional Parameters
Name of the endpoint.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the CDN profile which is unique within the resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the route.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az afd route list
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List all the routes within the specified endpoint.
az afd route list --endpoint-name
--profile-name
--resource-group
Examples
List all the routes within the specified endpoint.
az afd route list -g group --profile-name profile --endpoint-name endpoint1
Required Parameters
Name of the endpoint.
Name of the CDN profile which is unique within the resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az afd route show
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show route details.
az afd route show [--endpoint-name]
[--ids]
[--profile-name]
[--resource-group]
[--route-name]
[--subscription]
Examples
show details of the route named route1.
az afd route show -g group --profile-name profile --endpoint-name endpoint1 --route-name route1
Optional Parameters
Name of the endpoint.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the CDN profile which is unique within the resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the route.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az afd route update
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update an existing route within the specified endpoint.
az afd route update [--content-types-to-compress]
[--custom-domains]
[--enable-caching {false, true}]
[--enable-compression {false, true}]
[--enabled-state {Disabled, Enabled}]
[--endpoint-name]
[--forwarding-protocol {HttpOnly, HttpsOnly, MatchRequest}]
[--https-redirect {Disabled, Enabled}]
[--ids]
[--link-to-default-domain {Disabled, Enabled}]
[--origin-group]
[--origin-path]
[--patterns-to-match]
[--profile-name]
[--query-parameters]
[--query-string-caching-behavior {IgnoreQueryString, IgnoreSpecifiedQueryStrings, IncludeSpecifiedQueryStrings, UseQueryString}]
[--resource-group]
[--route-name]
[--rule-sets]
[--subscription]
[--supported-protocols {Http, Https}]
Examples
Update a route to accept both Http and Https requests and redirect all trafic to use Https.
az afd route update -g group --endpoint-name endpoint1 --profile-name profile --route-name route1 --supported-protocols Http Https --https-redirect Enabled
Update a route's rule sets settings to customize the route behavior.
az afd route update -g group --endpoint-name endpoint1 --profile-name profile --route-name route1 --rule-sets ruleset1 rulseset2
Update a route's compression settings to enable compression for the specified content types.
az afd route update -g group --endpoint-name endpoint1 --profile-name profile --route-name route1 --query-string-caching-behavior IgnoreQueryString --enable-compression true --content-types-to-compress text/javascript text/plain
Optional Parameters
List of content types on which compression applies. The value should be a valid MIME type.
Custom domains referenced by this endpoint.
Indicates whether caching is enanbled on that route.
Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
Whether to enable this route.
Name of the endpoint.
Protocol this rule will use when forwarding traffic to backends.
Whether to automatically redirect HTTP traffic to HTTPS traffic.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Whether this route will be linked to the default endpoint domain.
Name or ID of the origin group to be associated with.
A directory path on the origin that Azure Front Door can use to retrieve content from.
The route patterns of the rule.
Name of the CDN profile which is unique within the resource group.
Query parameters to include or exclude.
Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the route.
Collection of ID or name of rule set referenced by the route.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
List of supported protocols for this route.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for