全部产品
Search
文档中心

资源编排:DATASOURCE::VPC::CustomerGateway

更新时间:Nov 27, 2024

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

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

CustomerGatewayId

String

用户网关的实例ID。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • Description:用户网关的描述信息。

  • CustomerGatewayId:用户网关的实例ID。

  • CreateTime:创建用户网关的时间戳。单位:毫秒。

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

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

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

  • CustomerGatewayName:用户网关的名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CustomerGatewayId:
    Description:
      en: The ID of the customer gateway.
    Required: true
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      CustomerGatewayId:
        Ref: CustomerGatewayId
    Type: DATASOURCE::VPC::CustomerGateway
Outputs:
  Asn:
    Description: Asn.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Asn
  AuthKey:
    Description: The authentication key of the local data center gateway device BGP
      routing protocol.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - AuthKey
  CreateTime:
    Description: The time when the customer gateway was created.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CreateTime
  CustomerGatewayId:
    Description: The ID of the customer gateway.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CustomerGatewayId
  CustomerGatewayName:
    Description: The name of the customer gateway.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CustomerGatewayName
  Description:
    Description: The description of the customer gateway.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Description
  IpAddress:
    Description: The IP address of the customer gateway.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - IpAddress
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CustomerGatewayId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the customer gateway."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::CustomerGateway",
      "Properties": {
        "CustomerGatewayId": {
          "Ref": "CustomerGatewayId"
        }
      }
    }
  },
  "Outputs": {
    "Description": {
      "Description": "The description of the customer gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "CustomerGatewayId": {
      "Description": "The ID of the customer gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CustomerGatewayId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the customer gateway was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "AuthKey": {
      "Description": "The authentication key of the local data center gateway device BGP routing protocol.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AuthKey"
        ]
      }
    },
    "IpAddress": {
      "Description": "The IP address of the customer gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IpAddress"
        ]
      }
    },
    "Asn": {
      "Description": "Asn.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Asn"
        ]
      }
    },
    "CustomerGatewayName": {
      "Description": "The name of the customer gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CustomerGatewayName"
        ]
      }
    }
  }
}