DATASOURCE::VPC::CustomerGateways

更新时间:
复制 MD 格式

DATASOURCE::VPC::CustomerGateways类型用于查询用户网关的信息。

语法

{
  "Type": "DATASOURCE::VPC::CustomerGateways",
  "Properties": {
    "CustomerGatewayId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

CustomerGatewayId

String

否

是

用户网关的实例ID。

无

RefreshOptions

String

否

是

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

有效值:

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

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

返回值

Fn::GetAtt

  • CustomerGateways:用户网关的实例详情列表。

  • CustomerGatewayIds:用户网关的实例ID列表。

属性名称

类型

描述

约束

CustomerGatewayIds

List

用户网关的实例ID列表。

无

CustomerGateways

List

用户网关的实例详情列表。

无

CustomerGatewayName

String

用户网关的名称。

无

Description

String

用户网关的描述信息。

无

Asn

Number

本地数据中心网关设备的自治系统号。

无

AuthKey

String

本地数据中心网关设备BGP路由协议的认证密钥。

无

CustomerGatewayId

String

用户网关的实例ID。

无

IpAddress

String

本地数据中心网关设备的公网IP地址。

无

CreateTime

String

创建用户网关的时间戳。

单位:毫秒。

时间戳的格式采用Unix时间戳,表示从格林威治时间1970年01月01日00时00分00秒至创建用户网关时的总时长。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CustomerGatewayId:
    Description: The ID of the customer gateway.
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      CustomerGatewayId:
        Ref: CustomerGatewayId
    Type: DATASOURCE::VPC::CustomerGateways
Outputs:
  CustomerGatewayIds:
    Description: The list of customer gateway IDs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CustomerGatewayIds
  CustomerGateways:
    Description: The list of customer gateways.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CustomerGateways
JSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CustomerGatewayId": {
      "Type": "String",
      "Description": "The ID of the customer gateway."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::CustomerGateways",
      "Properties": {
        "CustomerGatewayId": {
          "Ref": "CustomerGatewayId"
        }
      }
    }
  },
  "Outputs": {
    "CustomerGateways": {
      "Description": "The list of customer gateways.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CustomerGateways"
        ]
      }
    },
    "CustomerGatewayIds": {
      "Description": "The list of customer gateway IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CustomerGatewayIds"
        ]
      }
    }
  }
}