Todos los productos
Search
Centro de documentos

Resource Orchestration Service:ALIYUN::VPC::VpnGateway

Última actualización: Sep 07, 2026

El recurso ALIYUN::VPC::VpnGateway crea una puerta de enlace VPN.

Sintaxis

{
  "Type": "ALIYUN::VPC::VpnGateway",
  "Properties": {
    "VpcId": String,
    "VSwitchId": String,
    "Description": String,
    "EnableIpsec": Boolean,
    "AutoPay": Boolean,
    "Period": Integer,
    "EnableSsl": Boolean,
    "Bandwidth": Integer,
    "InstanceChargeType": String,
    "SslConnections": Integer,
    "Name": String,
    "Tags": List,
    "VpnType": String,
    "NetworkType": String,
    "DisasterRecoveryVSwitchId": String,
    "ResourceGroupId": String
  }
}

Propiedades

Parámetro

Tipo

Obligatorio

Actualizaciones permitidas

Descripción

Restricciones

VpcId

String

Sí

No

ID de la VPC de la puerta de enlace VPN.

Ninguna.

VSwitchId

String

No

No

ID del vSwitch asociado a la puerta de enlace VPN.

Ninguna.

Description

String

No

Sí

Descripción de la puerta de enlace VPN.

La descripción debe tener entre 2 y 256 caracteres y comenzar con una letra o un carácter chino. No debe iniciar con http:// ni con https://.

EnableIpsec

Boolean

No

No

Indica si se habilita la función IPsec-VPN.

Valores válidos:

  • true (predeterminado)

  • false

IPsec-VPN proporciona conexiones de sitio a sitio. Puede crear un túnel IPsec para conectar de forma segura un centro de datos local a una VPC o para conectar dos VPC.

AutoPay

Boolean

No

No

Indica si se habilita el pago automático para la suscripción.

Valores válidos:

  • true (predeterminado): habilita el pago automático.

  • false: deshabilita el pago automático.

Period

Integer

No

No

Duración de la suscripción.

Valores válidos:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

  • 24

  • 36

Unidad: meses.

Este parámetro es obligatorio cuando InstanceChargeType se establece en PREPAY.

EnableSsl

Boolean

No

No

Indica si se habilita la función SSL-VPN.

Valores válidos:

  • true

  • false (predeterminado)

SSL-VPN proporciona conexiones VPN de punto a sitio. Estas permiten que los clientes se conecten directamente a la puerta de enlace VPN sin configurar una puerta de enlace de cliente.

Bandwidth

Integer

Sí

No

Ancho de banda público de la puerta de enlace VPN.

Valores válidos:

  • 5

  • 10

  • 20

  • 50

  • 100

Unidad: Mbit/s.

InstanceChargeType

String

No

No

Método de facturación de la puerta de enlace VPN.

El valor debe ser PREPAY, que indica el método de facturación por suscripción.

SslConnections

Integer

No

No

Número máximo de conexiones simultáneas de clientes SSL-VPN.

Ninguna.

ResourceGroupId

String

No

Sí

ID del resource group.

Ninguna.

Name

String

No

Sí

Nombre de la puerta de enlace VPN.

El nombre debe tener entre 2 y 100 caracteres. Debe comenzar con una letra o un carácter chino, y puede contener letras, caracteres chinos, dígitos, guiones bajos (_) y guiones (-). No puede iniciar con http:// ni con https://.

Si no especifica este parámetro, el sistema utiliza el ID de la puerta de enlace VPN como su nombre.

Tags

List

No

Sí

Etiquetas que se agregan a la puerta de enlace VPN.

Puede agregar hasta 20 etiquetas.

Para obtener más información, consulte la sección Tag properties.

VpnType

String

No

No

Tipo de la puerta de enlace VPN.

Valores válidos:

  • Normal (predeterminado): una puerta de enlace VPN estándar.

  • NationalStandard: una puerta de enlace VPN compatible con el cifrado nacional.

NetworkType

String

No

No

Tipo de red de la puerta de enlace VPN.

Valores válidos:

  • public (predeterminado): crea una puerta de enlace VPN pública.

  • private: crea una puerta de enlace VPN privada.

DisasterRecoveryVSwitchId

String

No

No

ID del vSwitch secundario asociado a la puerta de enlace VPN.

  • Este parámetro es obligatorio si la región admite el modo de túnel doble para las conexiones IPsec-VPN.

  • Para la recuperación ante desastres entre zonas de una conexión IPsec-VPN, especifique dos vSwitch en distintas zonas de disponibilidad dentro de la VPC asociada a la puerta de enlace VPN.

  • En una región con una sola zona de disponibilidad, no se admite la recuperación ante desastres entre zonas. Para lograr alta disponibilidad, puede especificar dos vSwitch distintos en la misma zona de disponibilidad o bien especificar el mismo vSwitch.

Para obtener información sobre las regiones y zonas de disponibilidad que admiten el modo de túnel doble para las conexiones IPsec-VPN, consulte Upgrade an IPsec-VPN connection to dual-tunnel mode.

Sintaxis de las etiquetas

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Propiedades de las etiquetas

Parámetro

Tipo

Obligatorio

Actualizaciones permitidas

Descripción

Restricciones

Key

String

Sí

No

Clave de la etiqueta.

La clave de la etiqueta puede tener entre 1 y 128 caracteres. No puede iniciar con aliyun ni con acs:, y no puede contener http:// ni https://.

Value

String

No

No

Valor de la etiqueta.

El valor de la etiqueta puede tener entre 0 y 128 caracteres. No puede iniciar con aliyun ni con acs:, y no puede contener http:// ni https://.

Valores devueltos

Fn::GetAtt

  • OrderId: ID del pedido.

  • VpnGatewayId: ID de la puerta de enlace VPN.

  • InternetIp: dirección IP pública de la puerta de enlace VPN.

  • SslMaxConnections: número máximo de conexiones SSL-VPN simultáneas.

  • Spec: ancho de banda máximo de la puerta de enlace VPN.

  • DisasterRecoveryVSwitchId: ID del vSwitch secundario asociado a la puerta de enlace VPN.

  • VpnType: tipo de la puerta de enlace VPN.

  • VpcId: ID de la VPC de la puerta de enlace VPN.

  • SslVpnInternetIp: dirección IP pública de la conexión SSL-VPN.

  • DisasterRecoveryInternetIp: dirección IP pública secundaria asignada a la conexión IPsec-VPN en modo de túnel doble.

  • VSwitchId: ID del vSwitch asociado a la puerta de enlace VPN.

  • Arn: Alibaba Cloud Resource Name (ARN) de la puerta de enlace VPN.

Ejemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
 AutoPay:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Default: true
  Description: 'Specifies whether to automatically pay for the vpn gateway. Valid values:

   True (default): Automatically pays for the vpn gateway.

   False: Does not automatically pay for the vpn gateway.'
  Type: Boolean
 Bandwidth:
  AllowedValues:
  - 5
  - 10
  - 20
  - 50
  - 100
  - 200
  Description: 'The public bandwidth of the vpn gateway, in Mbit/s.

   Valid values: 5, 10, 20, 50, 100, and 200.'
  Type: Number
 Description:
  Description: 'A description of the vpn gateway.

   The description must be 2 to 256 characters long, start with a letter or a Chinese character,
   and must not start with http:// or https://.'
  MaxLength: 256
  MinLength: 2
  Type: String
 EnableIpsec:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Default: true
  Description: 'Specifies whether to enable the IPsec-VPN feature. The IPsec-VPN feature provides
   site-to-site connections. You can create an IPsec tunnel to securely connect your on-premises
   data center to a VPC or to connect two VPCs. Valid values:

   True (default): Enables the IPsec-VPN feature.

   False: Disables the IPsec-VPN feature.'
  Type: Boolean
 EnableSsl:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Default: false
  Description: 'Specifies whether to enable the SSL-VPN feature. This feature provides point-to-site VPN
   connections, which allow clients to connect to the vpn gateway without the need
   to configure a customer gateway. Valid values:

   True: Enables the SSL-VPN feature.

   False (default): Disables the SSL-VPN feature.'
  Type: Boolean
 InstanceChargeType:
  AllowedValues:
  - PREPAY
  - POSTPAY
  Default: PREPAY
  Description: 'The billing method of the vpn gateway. Valid values are:

   PREPAY, POSTPAY'
  Type: String
 Name:
  Description: 'The name of the vpn gateway. If you do not specify this parameter, the ID of the vpn
   gateway is used as its name.

   The name must be 2 to 100 characters in length. It must start with a letter
   or a Chinese character, can contain digits, underscores (_), and hyphens
   (-), and cannot start with http:// or https://.'
  MaxLength: 100
  MinLength: 2
  Type: String
 Period:
  AllowedValues:
  - 1
  - 2
  - 3
  - 4
  - 5
  - 6
  - 7
  - 8
  - 9
  - 12
  - 24
  - 36
  Description: 'The subscription duration, in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

   This parameter is required when InstanceChargeType is set to PREPAY.'
  Type: Number
 SslConnections:
  Description: The maximum number of clients allowed to connect at the same time.
  Type: Number
 Tags:
  Description: The tags to add to the instance. You can add a maximum of 20 tags.
   Each tag consists of a key and a value, and the key is required.
  MaxLength: 20
  Type: Json
 VSwitchId:
  Description: The ID of the VSwitch to which the VPN gateway belongs.
  Type: String
 VpcId:
  Description: The ID of the VPC to which the VPN gateway belongs.
  Type: String
Resources:
 VpnGateway:
  Properties:
   AutoPay:
    Ref: AutoPay
   Bandwidth:
    Ref: Bandwidth
   Description:
    Ref: Description
   EnableIpsec:
    Ref: EnableIpsec
   EnableSsl:
    Ref: EnableSsl
   InstanceChargeType:
    Ref: InstanceChargeType
   Name:
    Ref: Name
   Period:
    Ref: Period
   SslConnections:
    Ref: SslConnections
   Tags:
    Ref: Tags
   VSwitchId:
    Ref: VSwitchId
   VpcId:
    Ref: VpcId
  Type: ALIYUN::VPC::VpnGateway
Outputs:
 InternetIp:
  Description: The public IP address of the VPN gateway.
  Value:
   Fn::GetAtt:
   - VpnGateway
   - InternetIp
 OrderId:
  Description: The order ID.
  Value:
   Fn::GetAtt:
   - VpnGateway
   - OrderId
 Spec:
  Description: The specification of the VPN gateway.
  Value:
   Fn::GetAtt:
   - VpnGateway
   - Spec
 SslMaxConnections:
  Description: The maximum number of concurrent SSL-VPN connections.
  Value:
   Fn::GetAtt:
   - VpnGateway
   - SslMaxConnections
 VpnGatewayId:
  Description: The ID of the vpn gateway.
  Value:
   Fn::GetAtt:
   - VpnGateway
   - VpnGatewayId
{
 "ROSTemplateFormatVersion": "2015-09-01",
 "Parameters": {
  "EnableIpsec": {
   "Type": "Boolean",
   "Description": "Specifies whether to enable the IPsec-VPN feature. The IPsec-VPN feature provides site-to-site connections. You can create an IPsec tunnel to securely connect your on-premises data center to a VPC or to connect two VPCs. Valid values:\nTrue (default): Enables the IPsec-VPN feature.\nFalse: Disables the IPsec-VPN feature.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ],
   "Default": true
  },
  "EnableSsl": {
   "Type": "Boolean",
   "Description": "Specifies whether to enable the SSL-VPN feature. This feature provides point-to-site VPN connections, which allow clients to connect to the vpn gateway without the need to configure a customer gateway. Valid values:\nTrue: Enables the SSL-VPN feature.\nFalse (default): Disables the SSL-VPN feature.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ],
   "Default": false
  },
  "SslConnections": {
   "Type": "Number",
   "Description": "The maximum number of clients allowed to connect at the same time."
  },
  "Description": {
   "Type": "String",
   "Description": "A description of the vpn gateway.\nThe description must be 2 to 256 characters long, start with a letter or a Chinese character, and must not start with http:// or https://.",
   "MinLength": 2,
   "MaxLength": 256
  },
  "VpcId": {
   "Type": "String",
   "Description": "The ID of the VPC to which the VPN gateway belongs."
  },
  "InstanceChargeType": {
   "Type": "String",
   "Description": "The billing method of the vpn gateway. Valid values are:\nPREPAY, POSTPAY",
   "AllowedValues": [
    "PREPAY",
    "POSTPAY"
   ],
   "Default": "PREPAY"
  },
  "Bandwidth": {
   "Type": "Number",
   "Description": "The public bandwidth of the vpn gateway, in Mbit/s.\nValid values: 5, 10, 20, 50, 100, and 200.",
   "AllowedValues": [
    5,
    10,
    20,
    50,
    100,
    200
   ]
  },
  "VSwitchId": {
   "Type": "String",
   "Description": "The ID of the VSwitch to which the VPN gateway belongs."
  },
  "Period": {
   "Type": "Number",
   "Description": "The subscription duration, in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.\nThis parameter is required when InstanceChargeType is set to PREPAY.",
   "AllowedValues": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    12,
    24,
    36
   ]
  },
  "AutoPay": {
   "Type": "Boolean",
   "Description": "Specifies whether to automatically pay for the vpn gateway. Valid values:\nTrue (default): Automatically pays for the vpn gateway.\nFalse: Does not automatically pay for the vpn gateway.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ],
   "Default": true
  },
  "Tags": {
   "Type": "Json",
   "Description": "The tags to add to the instance. You can add a maximum of 20 tags. Each tag consists of a key and a value, and the key is required.",
   "MaxLength": 20
  },
  "Name": {
   "Type": "String",
   "Description": "The name of the vpn gateway. If you do not specify this parameter, the ID of the vpn gateway is used as its name.\nThe name must be 2 to 100 characters in length. It must start with a letter or a Chinese character, can contain digits, underscores (_), and hyphens (-), and cannot start with http:// or https://.",
   "MinLength": 2,
   "MaxLength": 100
  }
 },
 "Resources": {
  "VpnGateway": {
   "Type": "ALIYUN::VPC::VpnGateway",
   "Properties": {
    "EnableIpsec": {
     "Ref": "EnableIpsec"
    },
    "EnableSsl": {
     "Ref": "EnableSsl"
    },
    "SslConnections": {
     "Ref": "SslConnections"
    },
    "Description": {
     "Ref": "Description"
    },
    "VpcId": {
     "Ref": "VpcId"
    },
    "InstanceChargeType": {
     "Ref": "InstanceChargeType"
    },
    "Bandwidth": {
     "Ref": "Bandwidth"
    },
    "VSwitchId": {
     "Ref": "VSwitchId"
    },
    "Period": {
     "Ref": "Period"
    },
    "AutoPay": {
     "Ref": "AutoPay"
    },
    "Tags": {
     "Ref": "Tags"
    },
    "Name": {
     "Ref": "Name"
    }
   }
  }
 },
 "Outputs": {
  "InternetIp": {
   "Description": "The public IP address of the VPN gateway.",
   "Value": {
    "Fn::GetAtt": [
     "VpnGateway",
     "InternetIp"
    ]
   }
  },
  "VpnGatewayId": {
   "Description": "The ID of the vpn gateway.",
   "Value": {
    "Fn::GetAtt": [
     "VpnGateway",
     "VpnGatewayId"
    ]
   }
  },
  "OrderId": {
   "Description": "The order ID.",
   "Value": {
    "Fn::GetAtt": [
     "VpnGateway",
     "OrderId"
    ]
   }
  },
  "Spec": {
   "Description": "The specification of the VPN gateway.",
   "Value": {
    "Fn::GetAtt": [
     "VpnGateway",
     "Spec"
    ]
   }
  },
  "SslMaxConnections": {
   "Description": "The maximum number of concurrent SSL-VPN connections.",
   "Value": {
    "Fn::GetAtt": [
     "VpnGateway",
     "SslMaxConnections"
    ]
   }
  }
 }
}