DATASOURCE::APIG::Route

DATASOURCE::APIG::Route类型用于查询路由详情。

语法

{
  "Type": "DATASOURCE::APIG::Route",
  "Properties": {
    "HttpApiId": String,
    "RouteId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

HttpApiId

String

HTTP API ID。

RouteId

String

路由 ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

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"
        ]
      }
    }
  }
}