ALIYUN::VPC::CustomerGateway

Updated at:

Creates a customer gateway.

Syntax

{
  "Type": "ALIYUN::VPC::CustomerGateway",
  "Properties": {
    "IpAddress": String,
    "Description": String,
    "Name": String,
    "Asn": Integer,
    "ResourceGroupId": String
  }
}

Properties

Parameter

Type

Required

Editable

Description

Constraint

IpAddress

String

Yes

No

IP address of the customer gateway.

None.

Description

String

No

Yes

Description of the customer gateway.

2 to 256 characters. Must start with a letter or Chinese character. Cannot start with http:// or https://.

Name

String

No

Yes

Name of the customer gateway.

2 to 128 characters. Must start with a letter or Chinese character. Can contain digits, periods (.), underscores (_), and hyphens (-). Cannot start with http:// or https://.

Asn

Integer

No

No

ASN of the gateway device in your data center.

A 4-byte number in two-segment decimal format, where a period (.) separates the first 16 bits from the last 16 bits.

Example: 123.456 = 123 × 65536 + 456 = 8061384.

ResourceGroupId

String

No

No

Resource group ID.

None.

Return values

Fn::GetAtt

CustomerGatewayId: The ID of the customer gateway.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  CustomerGateway:
    Type: ALIYUN::VPC::CustomerGateway
    Properties:
      IpAddress:
        Ref: IpAddress
      Description:
        Ref: Description
      Name:
        Ref: Name
Parameters:
  IpAddress:
    Type: String
    Description: The IP address of the customer gateway.
  Description:
    MinLength: 2
    Type: String
    Description: The description of the customer gateway. The value must be 2 to 256 characters in length. It must start with a letter or a Chinese character and cannot start with `http://` or `https://`.
    MaxLength: 256
  Name:
    MinLength: 2
    Type: String
    Description: The name of the customer gateway. The value must be 2 to 128 characters in length. It must start with a letter or a Chinese character and can contain digits, periods (.), underscores (_), and hyphens (-). It cannot start with `http://` or `https://`.
    MaxLength: 128
Outputs:
  CustomerGatewayId:
    Description: The ID of the customer gateway.
    Value:
      Fn::GetAtt:
        - CustomerGateway
        - CustomerGatewayId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "CustomerGateway": {
      "Type": "ALIYUN::VPC::CustomerGateway",
      "Properties": {
        "IpAddress": {
          "Ref": "IpAddress"
        },
        "Description": {
          "Ref": "Description"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Parameters": {
    "IpAddress": {
      "Type": "String",
      "Description": "The IP address of the customer gateway."
    },
    "Description": {
      "MinLength": 2,
      "Type": "String",
      "Description": "The description of the customer gateway. The value must be 2 to 256 characters in length. It must start with a letter or a Chinese character and cannot start with `http://` or `https://`.",
      "MaxLength": 256
    },
    "Name": {
      "MinLength": 2,
      "Type": "String",
      "Description": "The name of the customer gateway. The value must be 2 to 128 characters in length. It must start with a letter or a Chinese character and can contain digits, periods (.), underscores (_), and hyphens (-). It cannot start with `http://` or `https://`.",
      "MaxLength": 128
    }
  },
  "Outputs": {
    "CustomerGatewayId": {
      "Description": "The ID of the customer gateway.",
      "Value": {
        "Fn::GetAtt": [
          "CustomerGateway",
          "CustomerGatewayId"
        ]
      }
    }
  }
}