Routes - Update
Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}?api-version=2023-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Name of the endpoint under the profile which is unique globally. |
profile
|
path | True |
string |
Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. |
resource
|
path | True |
string |
Name of the Resource group within the Azure subscription. Regex pattern: |
route
|
path | True |
string |
Name of the routing rule. |
subscription
|
path | True |
string |
Azure Subscription ID. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. Current version is 2023-05-01. |
Request Body
Name | Type | Description |
---|---|---|
properties.cacheConfiguration |
The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. |
|
properties.customDomains |
Domains referenced by this endpoint. |
|
properties.enabledState |
Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' |
|
properties.forwardingProtocol |
Protocol this rule will use when forwarding traffic to backends. |
|
properties.httpsRedirect |
Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. |
|
properties.linkToDefaultDomain |
whether this route will be linked to the default endpoint domain. |
|
properties.originGroup |
A reference to the origin group. |
|
properties.originPath |
string |
A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. |
properties.patternsToMatch |
string[] |
The route patterns of the rule. |
properties.ruleSets |
rule sets referenced by this endpoint. |
|
properties.supportedProtocols |
List of supported protocols for this route. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
202 Accepted |
Accepted. The request has been accepted for processing and the operation will complete asynchronously. Headers location: string |
|
Other Status Codes |
Azure Front Door error response describing why the operation failed |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Routes_Update
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdEndpoints/endpoint1/routes/route1?api-version=2023-05-01
{
"properties": {
"customDomains": [
{
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"
}
],
"originGroup": {
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"
},
"originPath": null,
"ruleSets": [
{
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"
}
],
"supportedProtocols": [
"Https",
"Http"
],
"patternsToMatch": [
"/*"
],
"cacheConfiguration": {
"compressionSettings": {
"contentTypesToCompress": [
"text/html",
"application/octet-stream"
],
"isCompressionEnabled": true
},
"queryStringCachingBehavior": "IgnoreQueryString"
},
"forwardingProtocol": "MatchRequest",
"linkToDefaultDomain": "Enabled",
"httpsRedirect": "Enabled",
"enabledState": "Enabled"
}
}
Sample Response
{
"name": "route1",
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1",
"type": "Microsoft.Cdn/profiles/afdendpoints/routes",
"properties": {
"customDomains": [
{
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"
}
],
"originGroup": {
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"
},
"originPath": null,
"ruleSets": [
{
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"
}
],
"supportedProtocols": [
"Https",
"Http"
],
"patternsToMatch": [
"/*"
],
"cacheConfiguration": {
"compressionSettings": {
"contentTypesToCompress": [
"text/html",
"application/octet-stream"
],
"isCompressionEnabled": true
},
"queryStringCachingBehavior": "IgnoreQueryString",
"queryParameters": null
},
"forwardingProtocol": "MatchRequest",
"linkToDefaultDomain": "Enabled",
"httpsRedirect": "Enabled",
"enabledState": "Enabled",
"provisioningState": "Succeeded",
"deploymentStatus": "NotStarted"
}
}
azure-asyncoperation: https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2023-05-01
{
"name": "route1",
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1",
"type": "Microsoft.Cdn/profiles/afdendpoints/routes",
"properties": {
"customDomains": [
{
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"
}
],
"originGroup": {
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"
},
"originPath": null,
"ruleSets": [
{
"id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"
}
],
"supportedProtocols": [
"Https",
"Http"
],
"patternsToMatch": [
"/*"
],
"cacheConfiguration": {
"compressionSettings": {
"contentTypesToCompress": [
"text/html",
"application/octet-stream"
],
"isCompressionEnabled": true
},
"queryStringCachingBehavior": "IgnoreQueryString",
"queryParameters": null
},
"forwardingProtocol": "MatchRequest",
"linkToDefaultDomain": "Enabled",
"httpsRedirect": "Enabled",
"enabledState": "Enabled",
"provisioningState": "Updating",
"deploymentStatus": "NotStarted"
}
}
Definitions
Name | Description |
---|---|
Activated |
Reference to another resource along with its state. |
AFDEndpoint |
Supported protocols for the customer's endpoint. |
Afd |
Error response |
Afd |
Provisioning status |
afd |
Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. |
Afd |
Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. |
Compression |
settings for compression. |
Deployment |
|
Enabled |
Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' |
Error |
The resource management error additional info. |
Error |
The error detail. |
Forwarding |
Protocol this rule will use when forwarding traffic to backends. |
https |
Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. |
Identity |
The type of identity that creates/modifies resources |
Link |
whether this route will be linked to the default endpoint domain. |
Resource |
Reference to another resource. |
Route |
Friendly Routes name mapping to the any Routes or secret related information. |
Route |
The domain JSON object required for domain creation or update. |
System |
Read only system data |
ActivatedResourceReference
Reference to another resource along with its state.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
isActive |
boolean |
Whether the resource is active or inactive |
AFDEndpointProtocols
Supported protocols for the customer's endpoint.
Name | Type | Description |
---|---|---|
Http |
string |
|
Https |
string |
AfdErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
AfdProvisioningState
Provisioning status
Name | Type | Description |
---|---|---|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |
afdQueryStringCachingBehavior
Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
Name | Type | Description |
---|---|---|
IgnoreQueryString |
string |
|
IgnoreSpecifiedQueryStrings |
string |
|
IncludeSpecifiedQueryStrings |
string |
|
UseQueryString |
string |
AfdRouteCacheConfiguration
Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.
Name | Type | Description |
---|---|---|
compressionSettings |
compression settings. |
|
queryParameters |
string |
query parameters to include or exclude (comma separated). |
queryStringCachingBehavior |
Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. |
CompressionSettings
settings for compression.
Name | Type | Description |
---|---|---|
contentTypesToCompress |
string[] |
List of content types on which compression applies. The value should be a valid MIME type. |
isCompressionEnabled |
boolean |
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. |
DeploymentStatus
Name | Type | Description |
---|---|---|
Failed |
string |
|
InProgress |
string |
|
NotStarted |
string |
|
Succeeded |
string |
EnabledState
Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ForwardingProtocol
Protocol this rule will use when forwarding traffic to backends.
Name | Type | Description |
---|---|---|
HttpOnly |
string |
|
HttpsOnly |
string |
|
MatchRequest |
string |
httpsRedirect
Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
IdentityType
The type of identity that creates/modifies resources
Name | Type | Description |
---|---|---|
application |
string |
|
key |
string |
|
managedIdentity |
string |
|
user |
string |
LinkToDefaultDomain
whether this route will be linked to the default endpoint domain.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
ResourceReference
Reference to another resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
Route
Friendly Routes name mapping to the any Routes or secret related information.
Name | Type | Default Value | Description |
---|---|---|---|
id |
string |
Resource ID. |
|
name |
string |
Resource name. |
|
properties.cacheConfiguration |
The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. |
||
properties.customDomains |
Domains referenced by this endpoint. |
||
properties.deploymentStatus | |||
properties.enabledState |
Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' |
||
properties.endpointName |
string |
The name of the endpoint which holds the route. |
|
properties.forwardingProtocol | MatchRequest |
Protocol this rule will use when forwarding traffic to backends. |
|
properties.httpsRedirect | Disabled |
Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. |
|
properties.linkToDefaultDomain | Disabled |
whether this route will be linked to the default endpoint domain. |
|
properties.originGroup |
A reference to the origin group. |
||
properties.originPath |
string |
A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. |
|
properties.patternsToMatch |
string[] |
The route patterns of the rule. |
|
properties.provisioningState |
Provisioning status |
||
properties.ruleSets |
rule sets referenced by this endpoint. |
||
properties.supportedProtocols | [ "Http", "Https" ] |
List of supported protocols for this route. |
|
systemData |
Read only system data |
||
type |
string |
Resource type. |
RouteUpdateParameters
The domain JSON object required for domain creation or update.
Name | Type | Default Value | Description |
---|---|---|---|
properties.cacheConfiguration |
The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. |
||
properties.customDomains |
Domains referenced by this endpoint. |
||
properties.enabledState |
Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' |
||
properties.endpointName |
string |
The name of the endpoint which holds the route. |
|
properties.forwardingProtocol | MatchRequest |
Protocol this rule will use when forwarding traffic to backends. |
|
properties.httpsRedirect | Disabled |
Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. |
|
properties.linkToDefaultDomain | Disabled |
whether this route will be linked to the default endpoint domain. |
|
properties.originGroup |
A reference to the origin group. |
||
properties.originPath |
string |
A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. |
|
properties.patternsToMatch |
string[] |
The route patterns of the rule. |
|
properties.ruleSets |
rule sets referenced by this endpoint. |
||
properties.supportedProtocols | [ "Http", "Https" ] |
List of supported protocols for this route. |
SystemData
Read only system data
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC) |
createdBy |
string |
An identifier for the identity that created the resource |
createdByType |
The type of identity that created the resource |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
An identifier for the identity that last modified the resource |
lastModifiedByType |
The type of identity that last modified the resource |