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