Routes - Get
获取具有指定订阅、资源组、配置文件和 AzureFrontDoor 终结点下指定路由名称的现有路由。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}?api-version=2025-04-15
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
全局唯一的配置文件下的终结点的名称。 |
|
profile
|
path | True |
string minLength: 1maxLength: 260 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ |
在资源组中唯一的 Azure Front Door 标准版或 Azure Front Door Premium 的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
route
|
path | True |
string |
路由规则的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
好的 |
|
| Other Status Codes |
Azure Front Door 错误响应,描述作失败的原因。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Routes_Get
示例请求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdEndpoints/endpoint1/routes/route1?api-version=2025-04-15
示例响应
{
"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"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Activated |
引用另一个资源及其状态。 |
|
AFDEndpoint |
客户终结点支持的协议。 |
|
Afd |
预配状态 |
|
afd |
定义 Frontdoor 如何缓存包含查询字符串的请求。 缓存、忽略特定查询字符串、使用唯一 URL 缓存每个请求或缓存特定查询字符串时,可以忽略任何查询字符串。 |
|
Afd |
缓存类型路由的缓存设置。 若要禁用缓存,请不要提供 cacheConfiguration 对象。 |
|
Compression |
压缩设置。 |
|
created |
创建资源的标识的类型。 |
|
Deployment |
|
|
Enabled |
是否启用此规则的使用。 允许的值为“Enabled”或“Disabled” |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Forwarding |
将流量转发到后端时,此规则将使用协议。 |
|
https |
是否自动将 HTTP 流量重定向到 HTTPS 流量。 请注意,这是设置此规则的一种简单方法,这将是执行的第一个规则。 |
|
Link |
此路由是否将链接到默认终结点域。 |
|
Resource |
对另一个资源的引用。 |
| Route |
友好路由名称映射到任何路由或机密相关信息。 |
|
system |
与创建和上次修改资源相关的元数据。 |
ActivatedResourceReference
引用另一个资源及其状态。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| isActive |
boolean |
资源是活动还是非活动 |
AFDEndpointProtocols
客户终结点支持的协议。
| 值 | 说明 |
|---|---|
| Http | |
| Https |
AfdProvisioningState
预配状态
| 值 | 说明 |
|---|---|
| Succeeded | |
| Failed | |
| Updating | |
| Deleting | |
| Creating |
afdQueryStringCachingBehavior
定义 Frontdoor 如何缓存包含查询字符串的请求。 缓存、忽略特定查询字符串、使用唯一 URL 缓存每个请求或缓存特定查询字符串时,可以忽略任何查询字符串。
| 值 | 说明 |
|---|---|
| IgnoreQueryString | |
| UseQueryString | |
| IgnoreSpecifiedQueryStrings | |
| IncludeSpecifiedQueryStrings |
AfdRouteCacheConfiguration
缓存类型路由的缓存设置。 若要禁用缓存,请不要提供 cacheConfiguration 对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| compressionSettings |
压缩设置。 |
|
| queryParameters |
string |
要包含或排除的查询参数(逗号分隔)。 |
| queryStringCachingBehavior |
定义 Frontdoor 如何缓存包含查询字符串的请求。 缓存、忽略特定查询字符串、使用唯一 URL 缓存每个请求或缓存特定查询字符串时,可以忽略任何查询字符串。 |
CompressionSettings
压缩设置。
| 名称 | 类型 | 说明 |
|---|---|---|
| contentTypesToCompress |
string[] |
要对其应用压缩的内容类型的列表。 该值应为有效的 MIME 类型。 |
| isCompressionEnabled |
boolean |
指示是否在 AzureFrontDoor 上启用内容压缩。 默认值为 false。 如果启用了压缩,则如果用户请求压缩版本,内容将作为压缩。 当请求的内容小于 1 字节或大于 1 MB 时,不会在 AzureFrontDoor 上压缩内容。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DeploymentStatus
| 值 | 说明 |
|---|---|
| NotStarted | |
| InProgress | |
| Succeeded | |
| Failed |
EnabledState
是否启用此规则的使用。 允许的值为“Enabled”或“Disabled”
| 值 | 说明 |
|---|---|
| Enabled | |
| Disabled |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ForwardingProtocol
将流量转发到后端时,此规则将使用协议。
| 值 | 说明 |
|---|---|
| HttpOnly | |
| HttpsOnly | |
| MatchRequest |
httpsRedirect
是否自动将 HTTP 流量重定向到 HTTPS 流量。 请注意,这是设置此规则的一种简单方法,这将是执行的第一个规则。
| 值 | 说明 |
|---|---|
| Enabled | |
| Disabled |
LinkToDefaultDomain
此路由是否将链接到默认终结点域。
| 值 | 说明 |
|---|---|
| Enabled | |
| Disabled |
ResourceReference
对另一个资源的引用。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
Route
友好路由名称映射到任何路由或机密相关信息。
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
|
| name |
string |
资源的名称 |
|
| properties.cacheConfiguration |
此路由的缓存配置。 若要禁用缓存,请不要提供 cacheConfiguration 对象。 |
||
| properties.customDomains |
此终结点引用的域。 |
||
| properties.deploymentStatus | |||
| properties.enabledState |
是否启用此规则的使用。 允许的值为“Enabled”或“Disabled” |
||
| properties.endpointName |
string |
保存路由的终结点的名称。 |
|
| properties.forwardingProtocol | MatchRequest |
将流量转发到后端时,此规则将使用协议。 |
|
| properties.httpsRedirect | Disabled |
是否自动将 HTTP 流量重定向到 HTTPS 流量。 请注意,这是设置此规则的一种简单方法,这将是执行的第一个规则。 |
|
| properties.linkToDefaultDomain | Disabled |
此路由是否将链接到默认终结点域。 |
|
| properties.originGroup |
对源组的引用。 |
||
| properties.originPath |
string |
AzureFrontDoor 可用于从源检索内容的目录路径,例如 contoso.cloudapp.net/originpath。 |
|
| properties.patternsToMatch |
string[] |
规则的路由模式。 |
|
| properties.provisioningState |
预配状态 |
||
| properties.ruleSets |
此终结点引用的规则集。 |
||
| properties.supportedProtocols | [ "Http", "Https" ] |
此路由支持的协议列表。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
||
| type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |