你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Routes - Get
获取指定订阅、资源组、配置文件和 AzureFrontDoor 终结点下具有指定路由名称的现有路由。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}?api-version=2023-05-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
配置文件下全局唯一的终结点的名称。 |
profile
|
path | True |
string |
资源组中唯一的 Azure Front Door Standard 或 Azure Front Door Premium 配置文件的名称。 |
resource
|
path | True |
string |
Azure 订阅中的资源组的名称。 Regex pattern: |
route
|
path | True |
string |
路由规则的名称。 |
subscription
|
path | True |
string |
Azure 订阅 ID。 |
api-version
|
query | True |
string |
要与客户端请求一起使用的 API 的版本。 当前版本为 2023-05-01。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
确定 |
|
Other Status Codes |
描述操作失败原因的 Azure Front Door 错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Routes_Get
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdEndpoints/endpoint1/routes/route1?api-version=2023-05-01
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"
}
}
定义
名称 | 说明 |
---|---|
Activated |
引用另一个资源及其状态。 |
AFDEndpoint |
客户的终结点支持的协议。 |
Afd |
错误响应 |
Afd |
预配状态 |
afd |
定义 Frontdoor 如何缓存包含查询字符串的请求。 可以在缓存时忽略任何查询字符串、忽略特定的查询字符串、使用唯一 URL 缓存每个请求或缓存特定的查询字符串。 |
Afd |
缓存类型路由的缓存设置。 若要禁用缓存,请不要提供 cacheConfiguration 对象。 |
Compression |
压缩设置。 |
Deployment |
|
Enabled |
是否要启用此规则。 允许的值为“Enabled”或“Disabled” |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Forwarding |
将流量转发到后端时此规则将使用的协议。 |
https |
是否自动将 HTTP 流量重定向到 HTTPS 流量。 请注意,这是设置此规则的简单方法,这将是执行的第一个规则。 |
Identity |
创建/修改资源的标识类型 |
Link |
此路由是否将链接到默认终结点域。 |
Resource |
对另一个资源的引用。 |
Route |
友好路由名称映射到任何路由或机密相关信息。 |
System |
只读系统数据 |
ActivatedResourceReference
引用另一个资源及其状态。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
isActive |
boolean |
资源是活动资源还是非活动资源 |
AFDEndpointProtocols
客户的终结点支持的协议。
名称 | 类型 | 说明 |
---|---|---|
Http |
string |
|
Https |
string |
AfdErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
AfdProvisioningState
预配状态
名称 | 类型 | 说明 |
---|---|---|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |
afdQueryStringCachingBehavior
定义 Frontdoor 如何缓存包含查询字符串的请求。 可以在缓存时忽略任何查询字符串、忽略特定的查询字符串、使用唯一 URL 缓存每个请求或缓存特定的查询字符串。
名称 | 类型 | 说明 |
---|---|---|
IgnoreQueryString |
string |
|
IgnoreSpecifiedQueryStrings |
string |
|
IncludeSpecifiedQueryStrings |
string |
|
UseQueryString |
string |
AfdRouteCacheConfiguration
缓存类型路由的缓存设置。 若要禁用缓存,请不要提供 cacheConfiguration 对象。
名称 | 类型 | 说明 |
---|---|---|
compressionSettings |
压缩设置。 |
|
queryParameters |
string |
用于包含或排除 (逗号分隔) 的查询参数。 |
queryStringCachingBehavior |
定义 Frontdoor 如何缓存包含查询字符串的请求。 可以在缓存时忽略任何查询字符串、忽略特定的查询字符串、使用唯一 URL 缓存每个请求或缓存特定的查询字符串。 |
CompressionSettings
压缩设置。
名称 | 类型 | 说明 |
---|---|---|
contentTypesToCompress |
string[] |
应用压缩的内容类型列表。 该值应为有效的 MIME 类型。 |
isCompressionEnabled |
boolean |
指示是否在 AzureFrontDoor 上启用内容压缩。 默认值为 false。 如果启用了压缩,当用户请求压缩版本时,内容将作为压缩内容提供。 当请求的内容小于 1 字节或大于 1 MB 时,不会在 AzureFrontDoor 上压缩内容。 |
DeploymentStatus
名称 | 类型 | 说明 |
---|---|---|
Failed |
string |
|
InProgress |
string |
|
NotStarted |
string |
|
Succeeded |
string |
EnabledState
是否要启用此规则。 允许的值为“Enabled”或“Disabled”
名称 | 类型 | 说明 |
---|---|---|
Disabled |
string |
|
Enabled |
string |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ForwardingProtocol
将流量转发到后端时此规则将使用的协议。
名称 | 类型 | 说明 |
---|---|---|
HttpOnly |
string |
|
HttpsOnly |
string |
|
MatchRequest |
string |
httpsRedirect
是否自动将 HTTP 流量重定向到 HTTPS 流量。 请注意,这是设置此规则的简单方法,这将是执行的第一个规则。
名称 | 类型 | 说明 |
---|---|---|
Disabled |
string |
|
Enabled |
string |
IdentityType
创建/修改资源的标识类型
名称 | 类型 | 说明 |
---|---|---|
application |
string |
|
key |
string |
|
managedIdentity |
string |
|
user |
string |
LinkToDefaultDomain
此路由是否将链接到默认终结点域。
名称 | 类型 | 说明 |
---|---|---|
Disabled |
string |
|
Enabled |
string |
ResourceReference
对另一个资源的引用。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
Route
友好路由名称映射到任何路由或机密相关信息。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
id |
string |
资源 ID。 |
|
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 |
只读系统数据 |
||
type |
string |
资源类型。 |
SystemData
只读系统数据
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string |
资源的创建时间戳 (UTC) |
createdBy |
string |
创建资源的标识的标识符 |
createdByType |
创建资源的标识类型 |
|
lastModifiedAt |
string |
资源上次修改的时间戳 (UTC) |
lastModifiedBy |
string |
上次修改资源的标识的标识符 |
lastModifiedByType |
上次修改资源的标识类型 |