All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::VPC::CustomerGateway

Last Updated:Dec 26, 2024

DATASOURCE::VPC::CustomerGateway is used to query the information about a customer gateway.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

CustomerGatewayId

String

Yes

Yes

The ID of the customer gateway.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • Description: the description of the customer gateway.

  • CustomerGatewayId: the ID of the customer gateway.

  • CreateTime: the time when the customer gateway was created. Unit: milliseconds.

  • AuthKey: the authentication key of the Border Gateway Protocol (BGP) routing protocol for the gateway device in the data center.

  • IpAddress: the public IP address of the gateway device in the data center.

  • Asn: the autonomous system number (ASN) of the gateway device in the data center.

  • CustomerGatewayName: the name of the customer gateway.

Examples

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