ALIYUN::VPC::VpnGateway is used to call the CreateVpnGateway operation to create a VPN gateway.

Syntax

{
  "Type": "ALIYUN::VPC::VpnGateway",
  "Properties": {
    "VpcId": String,
    "Description": String,
    "EnableIpsec": Boolean,
    "AutoPay": Boolean,
    "Period": Integer,
    "EnableSsl": Boolean,
    "Bandwidth": Integer,
    "InstanceChargeType": String,
    "SslConnections": Integer,
    "Name": String
  }
}

Properties

Name Type Required Editable Description Validity
VpcId String Yes No The ID of the VPC to which the VPN gateway belongs. None.
Description String No Yes The description of the VPN gateway. The description must be 2 to 256 characters in length. It must start with a letter and cannot start with http:// or https://. None.
EnableIpsec Boolean No No Specifies whether to enable the IPsec-VPN feature. The IPsec-VPN feature provides site-to-site connections. You can create an IPsec tunnel to connect an on-premises data center to a VPC, or to connect two VPCs. Valid values: true and false. Default value: true. A value of true specifies to enable the IPsec-VPN feature. A value of false specifies to disable the IPsec-VPN feature. None.
AutoPay Boolean No No Specifies whether to automatically pay the bill for the VPN gateway. Valid values: true and false. Default value: false. A value of true specifies to automatically pay the bill for the VPN gateway. A value of false specifies not to automatically pay the bill for the VPN gateway.
Period Integer No No The validity period of subscription. This parameter is required when InstanceChargeType is set to PREPAY. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.
EnableSsl Boolean No No Specifies whether to enable the SSL-VPN feature. SSL-VPN provides point-to-site VPN connections. You do not need to configure the customer gateway. You can directly access the VPN through the terminal. Valid values: true and false. A value of true specifies to enable the SSL-VPN feature. A value of false specifies to disable the SSL-VPN feature. None.
Bandwidth Integer Yes No The bandwidth of the VPN gateway. Unit: Mbit/s. Valid values: 5, 10, 20, 50, and 100.
InstanceChargeType String No No The billing method of the VPN gateway. Set the value to PREPAY.
SslConnections Integer No No The maximum number of clients allowed to connect simultaneously. None.
Name String No Yes The name of the VPN gateway. The default value is the ID of the VPN gateway. The name must be 2 to 100 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://. None.

Response parameters

Fn::GetAtt

  • OrderId: the ID of the order.
  • VpnGatewayId: the ID of the VPN gateway.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "VpnGateway": {
      "Type": "ALIYUN::VPC::VpnGateway",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "Description": {
          "Ref": "Description"
        },
        "EnableIpsec": {
          "Ref": "EnableIpsec"
        },
        "Period": {
          "Ref": "Period"
        },
        "EnableSsl": {
          "Ref": "EnableSsl"
        },
        "Bandwidth": {
          "Ref": "Bandwidth"
        },
        "AutoPay": {
          "Ref": "AutoPay"
        },
        "InstanceChargeType": {
          "Ref": "InstanceChargeType"
        },
        "Name": {
          "Ref": "Name"
        },
        "SslConnections": {
          "Ref": "SslConnections"
        }
      }
    }
  },
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "VPC ID to which the VPN gateway belongs."
    },
    "Description": {
      "MinLength": 2,
      "Type": "String",
      "Description": "Description of the VPN gateway.\nThe length is 2-256 characters and must start with a letter or Chinese, but cannot start with http:// or https://.",
      "MaxLength": 256
    },
    "EnableIpsec": {
      "Default": true,
      "Type": "Boolean",
      "Description": "Whether to enable IPsec-VPN. The IPsec-VPN feature provides a site-to-site connection. You can securely connect your local data center network to a private network or two proprietary networks by creating an IPsec tunnel. Value:\nTrue (default): Enables the IPsec-VPN feature.\nFalse: The IPsec-VPN function is not enabled.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Period": {
      "Type": "Number",
      "Description": "Purchase time, value: 1~9|12|24|36.\nWhen the value of the InstanceChargeType parameter is PREPAY, this parameter is mandatory.",
      "AllowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        12,
        24,
        36
      ]
    },
    "EnableSsl": {
      "Default": false,
      "Type": "Boolean",
      "Description": "Enable the SSL-VPN function. Provide point-to-site VPN connection, no need to configure customer gateway, terminal directly access. Value:\nTrue: Enable SSL-VPN.\nFalse (default): Does not enable SSL-VPN.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Bandwidth": {
      "Type": "Number",
      "Description": "The public network bandwidth of the VPN gateway, in Mbps.\nValue: 5|10|20|50|100.",
      "AllowedValues": [
        5,
        10,
        20,
        50,
        100
      ]
    },
    "AutoPay": {
      "Default": false,
      "Type": "Boolean",
      "Description": "Whether to automatically pay the bill of the VPN gateway, the value:\nTrue: Automatically pays the bill for the VPN gateway.\nFalse (default): Does not automatically pay the bill for the VPN gateway.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "InstanceChargeType": {
      "Default": "PREPAY",
      "Type": "String",
      "Description": "Accounting type of the VPN gateway, the value is:\nPREPAY: Prepaid.",
      "AllowedValues": [
        "PREPAY"
      ]
    },
    "Name": {
      "MinLength": 2,
      "Type": "String",
      "Description": "Name of the VPN gateway. The default value is the ID of the VPN gateway.\nThe length is 2~100 English or Chinese characters. It must start with a large or small letter or Chinese. It can contain numbers, underscores (_) and dashes (-). It cannot start with http:// or https://.",
      "MaxLength": 100
    },
    "SslConnections": {
      "Type": "Number",
      "Description": "The maximum number of clients allowed to connect at the same time."
    }
  },
  "Outputs": {
    "OrderId": {
      "Description": "The order ID.",
      "Value": {
        "Fn::GetAtt": [
          "VpnGateway",
          "OrderId"
        ]
      }
    },
    "VpnGatewayId": {
      "Description": "ID of the VPN gateway.",
      "Value": {
        "Fn::GetAtt": [
          "VpnGateway",
          "VpnGatewayId"
        ]
      }
    }
  }
}