DATASOURCE::APIG::Route类型用于查询路由详情。
语法
{
"Type": "DATASOURCE::APIG::Route",
"Properties": {
"HttpApiId": String,
"RouteId": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
HttpApiId | String | 是 | 是 | HTTP API ID。 | 无 |
RouteId | String | 是 | 是 | 路由 ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
Backend:后端服务。
Description:路由的描述信息。
EnvironmentInfo:环境信息。
RouteName:路由的名称。
DomainInfos:域名信息。
RouteId:路由ID。
Match:路由资源的匹配规则。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RouteId:
Type: String
Description:
en: The ID of route resource.
Required: true
HttpApiId:
Type: String
Description:
en: The ID of the HTTP API.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::APIG::Route
Properties:
RouteId:
Ref: RouteId
HttpApiId:
Ref: HttpApiId
Outputs:
Backend:
Description: backend services.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Backend
Description:
Description: description of route resource.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Description
EnvironmentInfo:
Description: environment information.
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnvironmentInfo
RouteName:
Description: The name of the route.
Value:
Fn::GetAtt:
- ExtensionDataSource
- RouteName
DomainInfos:
Description: domain items.
Value:
Fn::GetAtt:
- ExtensionDataSource
- DomainInfos
RouteId:
Description: The ID of route resource.
Value:
Fn::GetAtt:
- ExtensionDataSource
- RouteId
Match:
Description: the match rule of route resource.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Match
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RouteId": {
"Type": "String",
"Description": {
"en": "The ID of route resource."
},
"Required": true
},
"HttpApiId": {
"Type": "String",
"Description": {
"en": "The ID of the HTTP API."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::APIG::Route",
"Properties": {
"RouteId": {
"Ref": "RouteId"
},
"HttpApiId": {
"Ref": "HttpApiId"
}
}
}
},
"Outputs": {
"Backend": {
"Description": "backend services.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Backend"
]
}
},
"Description": {
"Description": "description of route resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Description"
]
}
},
"EnvironmentInfo": {
"Description": "environment information.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnvironmentInfo"
]
}
},
"RouteName": {
"Description": "The name of the route.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"RouteName"
]
}
},
"DomainInfos": {
"Description": "domain items.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"DomainInfos"
]
}
},
"RouteId": {
"Description": "The ID of route resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"RouteId"
]
}
},
"Match": {
"Description": "the match rule of route resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Match"
]
}
}
}
}
该文章对您有帮助吗?