All Products
Search
Document Center

VPN Gateway:CreateVpnConnection

Last Updated:Nov 13, 2024

Creates an IPsec-VPN connection.

Operation description

  • If the VPN gateway supports the dual-tunnel mode, you can specify the following parameters in addition to the required parameters when you call CreateVpnConnection:

    ClientToken, Name, EffectImmediately, AutoConfigRoute, Tags array, TunnelOptionsSpecification array, and EnableTunnelsBgp.

    For more information about the regions and zones that support the dual-tunnel mode, see IPsec-VPN connections support the dual-tunnel mode.

  • If the VPN gateway supports only the dual-tunnel mode, you can specify the following parameters in addition to the required parameters when you call CreateVpnConnection:

    ClientToken, CustomerGatewayId, Name, EffectImmediately, IkeConfig, IpsecConfig, HealthCheckConfig, AutoConfigRoute, EnableDpd, EnableNatTraversal, BgpConfig, RemoteCaCertificate, and Tags array.

  • CreateVpnConnection is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call DescribeVpnGateway to query the status of the task.

    • If the VPN gateway is in the updating state, the IPsec-VPN connection is being created.
    • If the VPN gateway is in the active state, the IPsec-VPN connection is created.
  • You cannot call CreateVpnConnection to create multiple IPsec-VPN connections associated with a VPN gateway at the same time.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:CreateVpnConnectioncreate
  • CustomerGateway
    acs:vpc:{#regionId}:{#accountId}:customergateway/{#CustomerGatewayId}
  • VpnConnection
    acs:vpc:{#regionId}:{#accountId}:vpnconnection/*
  • VpnGateway
    acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the IPsec-VPN connection is created. You can call the DescribeRegions operation to query the most recent region list.

cn-shanghai
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
02fb3da4-130e-11e9-8e44-001****
CustomerGatewayIdstringNo

When you create an IPsec-VPN connection in single-tunnel mode, this parameter is required.

The ID of the customer gateway.

cgw-p0w2jemrcj5u61un8****
VpnGatewayIdstringYes

The ID of the VPN gateway.

vpn-bp1q8bgx4xnkm****
NamestringNo

The name of the IPsec-VPN connection.

The name must be 1 to 100 characters in length and cannot start with http:// or https://.

IPsec
LocalSubnetstringYes

The CIDR block of the virtual private cloud (VPC) that needs to communicate with the on-premises database. The CIDR block is used in Phase 2 negotiations.

Separate multiple CIDR blocks with commas (,). Example: 192.168.1.0/24,192.168.2.0/24.

The following routing modes are supported:

  • If you set LocalSubnet and RemoteSubnet to 0.0.0.0/0, the routing mode of the IPsec-VPN connection is set to Destination Routing Mode.
  • If you set LocalSubnet and RemoteSubnet to specific CIDR blocks, the routing mode of the IPsec-VPN connection is set to Protected Data Flows.
10.10.1.0/24,10.10.2.0/24
RemoteSubnetstringYes

The CIDR block of the on-premises database that needs to communicate with the VPC. The CIDR block is used in Phase 2 negotiations.

Separate multiple CIDR blocks with commas (,). Example: 192.168.3.0/24,192.168.4.0/24.

The following routing modes are supported:

  • If you set LocalSubnet and RemoteSubnet to 0.0.0.0/0, the routing mode of the IPsec-VPN connection is set to Destination Routing Mode.
  • If you set LocalSubnet and RemoteSubnet to specific CIDR blocks, the routing mode of the IPsec-VPN connection is set to Protected Data Flows.
10.10.3.0/24,10.10.4.0/24
EffectImmediatelybooleanNo

Specifies whether to immediately start IPsec negotiations. Valid values:

  • true: immediately starts IPsec negotiations.
  • false (default): starts IPsec negotiations when inbound traffic is detected.
false
IkeConfigstringNo

This parameter is supported if you create an IPsec-VPN connection in single-tunnel mode.

The configurations of Phase 1 negotiations:

  • IkeConfig.Psk: the pre-shared key that is used for identity authentication between the VPN gateway and the on-premises data center.

    • The key must be 1 to 100 characters in length and can contain digits, letters, and the following special characters: ~!\`@#$%^&*()_-+={}[]|;:',.<>/?

    • If you do not specify a pre-shared key, the system randomly generates a 16-bit string as the pre-shared key. You can call the DescribeVpnConnection operation to query the pre-shared key that is automatically generated by the system.

      **

      Note The pre-shared key of the IPsec-VPN connection must be the same as the authentication key of the on-premises data center. Otherwise, connections between the on-premises data center and the VPN gateway cannot be established.

  • IkeConfig.IkeVersion: the version of the Internet Key Exchange (IKE) protocol. Valid values: ikev1 and ikev2. Default value: ikev1.

    Compared with IKEv1, IKEv2 simplifies the security association (SA) negotiation process and provides better support for scenarios with multiple CIDR blocks.

  • IkeConfig.IkeMode: the negotiation mode of IKE. Valid values: main and aggressive. Default value: main.

    • main: This mode offers higher security during negotiations.
    • aggressive: This mode supports faster negotiations and a higher success rate.
  • IkeConfig.IkeEncAlg: the encryption algorithm that is used in Phase 1 negotiations.

    Valid values: aes, aes192, aes256, des, and 3des. Default value: aes.

  • IkeConfig.IkeAuthAlg: the authentication algorithm that is used in Phase 1 negotiations.

    Valid values: md5, sha1, sha256, sha384, and sha512. Default value: md5.

  • IkeConfig.IkePfs: the Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Valid values: group1, group2, group5, and group14. Default value: group2.

  • IkeConfig.IkeLifetime: the SA lifetime as a result of Phase 1 negotiations. Unit: seconds. Valid values: 0 to 86400. Default value: 86400.

  • IkeConfig.LocalId: the identifier of the VPN gateway. It can contain at most 100 characters. The default value is the IP address of the VPN gateway.

  • IkeConfig.RemoteId: the identifier of the customer gateway. It can contain at most 100 characters. The default value is the IP address of the customer gateway.

{"Psk":"1234****","IkeVersion":"ikev1","IkeMode":"main","IkeEncAlg":"aes","IkeAuthAlg":"sha1","IkePfs":"group2","IkeLifetime":86400,"LocalId":"47.XX.XX.1","RemoteId":"47.XX.XX.2"}
IpsecConfigstringNo

This parameter is available if you create an IPsec-VPN connection in single-tunnel mode.

The configurations of Phase 2 negotiations:

  • IpsecConfig.IpsecEncAlg: the encryption algorithm that is used in Phase 2 negotiations.

    Valid values: aes, aes192, aes256, des, and 3des. Default value: aes.

  • IpsecConfig. IpsecAuthAlg: the authentication algorithm that is used in Phase 2 negotiations.

    Valid values: md5, sha1, sha256, sha384, and sha512. Default value: md5.

  • IpsecConfig. IpsecPfs: the DH key exchange algorithm that is used in Phase 2 negotiations. Valid values: disabled, group1, group2, group5, and group14. Default value: group2.

  • IpsecConfig. IpsecLifetime: the SA lifetime that is determined by Phase 2 negotiations. Unit: seconds. Valid values: 0 to 86400. Default value: 86400.

{"IpsecEncAlg":"aes","IpsecAuthAlg":"sha1","IpsecPfs":"group2","IpsecLifetime":86400}
HealthCheckConfigstringNo

This parameter is available if you create an IPsec-VPN connection in single-tunnel mode.

The health check configuration:

  • HealthCheckConfig.enable: specifies whether to enable health checks. Valid values: true and false. Default value: false.
  • HealthCheckConfig.dip: the destination IP address configured for health checks.
  • HealthCheckConfig.sip: the source IP address that is used for health checks.
  • HealthCheckConfig.interval: the time interval of health check retries. Unit: seconds. Default value: 3.
  • HealthCheckConfig.retry: the maximum number of health check retries. Default value: 3.
{"enable":"true","dip":"192.168.10.1","sip":"10.10.1.1","interval":"3","retry":"3"}
AutoConfigRoutebooleanNo

Specifies whether to automatically configure routes. Valid values:

  • true (default)
  • false
true
EnableDpdbooleanNo

This parameter is available if you create an IPsec-VPN connection in single-tunnel mode.

Specifies whether to enable the dead peer detection (DPD) feature. Valid values:

  • true (default) The initiator of the IPsec-VPN connection sends DPD packets to verify the existence and availability of the peer. If no feedback is received from the peer within a specified period of time, the connection fails. ISAKMP SAs and IPsec SAs are deleted. The IPsec tunnel is also deleted.
  • false
true
EnableNatTraversalbooleanNo

This parameter is available if you create an IPsec-VPN connection in single-tunnel mode.

Specifies whether to enable NAT traversal. Valid values:

  • true (default) After NAT traversal is enabled, the initiator does not check the UDP ports during IKE negotiations and can automatically discover NAT gateway devices along the VPN tunnel.
  • false
true
BgpConfigstringNo

This parameter is supported when you create an IPsec-VPN connection in single-tunnel mode.

BGP configuration:

  • BgpConfig.EnableBgp: specifies whether to enable BGP. Valid values: true and false (default).

  • BgpConfig.LocalAsn: the autonomous system number (ASN) on the Alibaba Cloud side. Valid values: 1 to 4294967295. Default value: 45104.

    You can enter a value in two segments separated by a period (.). Each segment is 16 bits in length. Enter the number in each segment in decimal format.

    For example, if you enter 123.456, the ASN is 8061384. The ASN is calculated by using the following formula: 123 × 65536 + 456 = 8061384.

  • BgpConfig.TunnelCidr: The CIDR block of the IPsec tunnel. The CIDR block must belong to 169.254.0.0/16 and the subnet mask is 30 bits in length.

    Note The CIDR block of the IPsec tunnel for each IPsec-VPN connection on a VPN gateway must be unique.
  • LocalBgpIp: the BGP address on the Alibaba Cloud side. It must be an IP address that falls within the CIDR block of the IPsec tunnel.

Note
  • Before you add BGP configurations, we recommend that you learn about how BGP works and the limits. For more information, see VPN Gateway supports BGP dynamic routing.
  • We recommend that you use private ASN to establish BGP connections to Alibaba Cloud. Refer to the relevant documentation for the private ASN range.
  • {"EnableBgp":"true","LocalAsn":"45104","TunnelCidr":"169.254.11.0/30","LocalBgpIp":"169.254.11.1"}
    RemoteCaCertificatestringNo

    This parameter is available if you create an IPsec-VPN connection in single-tunnel mode.

    The certificate authority (CA) certificate. If the VPN gateway is of the ShangMi (SM) type, you need to configure a CA certificate for the peer gateway device.

    • If an SM VPN gateway is used to create the IPsec-VPN connection, this parameter is required.
    • If a standard VPN gateway is used to create the IPsec-VPN connection, leave this parameter empty.
    -----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----
    Tagsarray<object>No

    The tag value.

    The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

    Each tag key corresponds to one tag value. You can specify up to 20 tag values in each call.

    objectNo

    The tag value.

    KeystringNo

    The tag key. The tag key cannot be an empty string.

    It can be at most 64 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

    You can specify at most 20 tag keys in each call.

    TagKey
    ValuestringNo

    The tag value.

    The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

    Each tag key corresponds to one tag value. You can specify at most 20 tag values in each call.

    TagValue
    TunnelOptionsSpecificationarray<object>No

    The tunnel configurations.

    • You can specify parameters in the TunnelOptionsSpecification array when you create an IPsec-VPN connection in dual tunnel mode.
    • When you create an IPsec-VPN connection in dual tunnel mode, you must add configurations of the active and standby tunnels for the IPsec-VPN connection. Each IPsec-VPN connection supports only one active tunnel and one standby tunnel.
    objectNo

    The tunnel configurations.

    CustomerGatewayIdstringNo

    The ID of the customer gateway that is associated with the tunnel.

    Note
  • This parameter is required when you create an IPsec-VPN connection in dual-tunnel mode.
  • You can specify parameters in the TunnelOptionsSpecification array when you create an IPsec-VPN connection in dual tunnel mode.
  • When you create an IPsec-VPN connection in dual tunnel mode, you must add configurations of the active and standby tunnels for the IPsec-VPN connection. Each IPsec-VPN connection supports only one active tunnel and one standby tunnel.
  • cgw-p0wy363lucf1uyae8****
    EnableDpdbooleanNo

    Specifies whether to enable the Dead Peer Detection (DPD) feature for the tunnel. Valid values:

    • true (default): enables DPD. The initiator of the IPsec-VPN connection sends DPD packets to check the existence and availability of the peer. If no feedback is received from the peer within the specified period of time, the connection fails. In this case, ISAKMP SA and IPsec SA are deleted. The security tunnel is also deleted.
    • false: disables DPD. The initiator of the IPsec-VPN connection does not send DPD packets.
    true
    EnableNatTraversalbooleanNo

    Specifies whether to enable NAT traversal for the tunnel. Valid values:

    • true (default): enables NAT traversal. After NAT traversal is enabled, the initiator does not check the UDP ports during IKE negotiations and can automatically discover NAT gateway devices along the IPsec-VPN tunnel.
    • false: disables NAT traversal.
    true
    RemoteCaCertificatestringNo

    If the VPN gateway uses an SM certificate, you need to configure the CA certificate used by the IPsec peer.

    • If the VPN gateway uses an SM certificate, this parameter is required.
    • If the VPN gateway does not use an SM certificate, leave this parameter empty.
    -----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----
    RolestringNo

    The role of the tunnel. Valid values: Valid values:

    • master: The tunnel is an active tunnel.
    • slave: The tunnel is a standby tunnel.
    master
    TunnelBgpConfigobjectNo

    The Border Gateway Protocol (BGP) configurations of the tunnel.

    LocalAsnlongNo

    The autonomous system number (ASN) of the tunnel on the Alibaba Cloud side. Valid values: 1 to 4294967295. Default value: 45104.

    Note
  • If you set EnableTunnelsBgp to true, you must set this parameter.
  • Before you add BGP configurations, we recommend that you learn about how BGP dynamic routing works and the limits. For more information, see VPN Gateway supports BGP dynamic routing.
  • We recommend that you use a private ASN to establish BGP connections to Alibaba Cloud. For information about the range of private ASNs, see the relevant documentation.
  • 65530
    LocalBgpIpstringNo

    The BGP IP address of the tunnel on the Alibaba Cloud side. The address is an IP address that falls within the BGP CIDR block.

    169.254.10.1
    TunnelCidrstringNo

    The BGP CIDR block of the tunnel. The CIDR block must fall within the 169.254.0.0/16 range. The subnet mask of the CIDR block must be 30 bits in length.

    Note The BGP CIDR block of each tunnel must be unique on a VPN gateway.
    169.254.10.0/30
    TunnelIkeConfigobjectNo

    The configurations of Phase 1 negotiations.

    IkeAuthAlgstringNo

    The authentication algorithm that is used in Phase 1 negotiations.

    Valid values: md5, sha1, sha256, sha384, and sha512. Default value: md5.

    md5
    IkeEncAlgstringNo

    The encryption algorithm that is used in Phase 1 negotiations.

    Valid values: aes, aes192, aes256, des, and 3des. Default value: aes.

    aes
    IkeLifetimelongNo

    The SA lifetime as a result of Phase 1 negotiations. Unit: seconds.

    Valid values: 0 to 86400. Default value: 86400.

    86400
    IkeModestringNo

    The negotiation mode of IKE. Valid values: main and aggressive. Default value: main.

    • main: This mode offers higher security during negotiations.
    • aggressive: This mode supports faster negotiations and a higher success rate.
    main
    IkePfsstringNo

    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    Valid values: group1, group2, group5, and group14.

    group2
    IkeVersionstringNo

    The version of the IKE protocol. Valid values: ikev1 and ikev2. Default value: ikev1.

    Compared with IKEv1, IKEv2 simplifies the SA negotiation process and provides better support for scenarios with multiple CIDR blocks.

    ikev1
    LocalIdstringNo

    The identifier of the tunnel on the Alibaba Cloud side, which is used in Phase 1 negotiations. It can contain at most 100 characters. The default value is the IP address of the tunnel.

    LocalId supports fully qualified domain names (FQDNs). If you use an FQDN, we recommend that you set the negotiation mode to aggressive.

    47.21.XX.XX
    PskstringNo

    The pre-shared key that is used for identity authentication between the tunnel and the tunnel peer.

    • The key must be 1 to 100 characters in length and can contain digits, letters, and the following special characters: ~!\`@#$%^&*()_-+={}[]|;:',.<>/?
    • If you do not specify a pre-shared key, the system randomly generates a 16-bit string as the pre-shared key. You can call the DescribeVpnConnection operation to query the pre-shared key that is automatically generated by the system.
    Note The tunnel and the tunnel peer must use the same pre-shared key. Otherwise, the tunnel cannot be established.
    123456****
    RemoteIdstringNo

    The identifier of the tunnel peer, which is used in Phase 1 negotiations. It can contain at most 100 characters. The default value is the IP address of the customer gateway that is associated with the tunnel.

    RemoteId supports FQDNs. If you use an FQDN, we recommend that you set the negotiation mode to aggressive.

    47.42.XX.XX
    TunnelIpsecConfigobjectNo

    The configurations of Phase 2 negotiations.

    IpsecAuthAlgstringNo

    The authentication algorithm that is used in Phase 2 negotiations.

    Valid values: md5, sha1, sha256, sha384, and sha512. Default value: md5.

    md5
    IpsecEncAlgstringNo

    The encryption algorithm that is used in Phase 2 negotiations.

    Valid values: aes, aes192, aes256, des, and 3des. Default value: aes.

    aes
    IpsecLifetimelongNo

    The SA lifetime as a result of Phase 2 negotiations. Unit: seconds.

    Valid values: 0 to 86400. Default value: 86400.

    86400
    IpsecPfsstringNo

    The Diffie-Hellman key exchange algorithm that is used in Phase 2 negotiations. Default value: group2.

    Valid values: disabled, group1, group2, group5, and group14.

    group2
    EnableTunnelsBgpbooleanNo

    This parameter is available if you create an IPsec-VPN connection in dual-tunnel mode.

    Specifies whether to enable the BGP feature for the tunnel. Valid values: true and false. Default value: false.

    true

    Response parameters

    ParameterTypeDescriptionExample
    object

    The returned data.

    RequestIdstring

    The request ID.

    082AD562-B8DB-4BB2-861F-DA1FCA01FD76
    VpnConnectionIdstring

    The ID of the IPsec-VPN connection.

    vco-bp15oes1py4i6****
    Namestring

    The name of the IPsec-VPN connection.

    test
    CreateTimelong

    The timestamp generated when the IPsec-VPN connection was established. Unit: milliseconds.

    This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

    1544666102000

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "082AD562-B8DB-4BB2-861F-DA1FCA01FD76",
      "VpnConnectionId": "vco-bp15oes1py4i6****",
      "Name": "test",
      "CreateTime": 1544666102000
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400Resource.QuotaFullThe quota of resource is fullThe resource quota is exhausted.
    400InvalidVpnConnection.AlreadyExistsVpn connection already exists.Vpn connection already exists.
    400VpnGateway.ConfiguringThe specified service is configuring.The service is being configured. Try again later.
    400VpnGateway.FinancialLockedThe specified service is financial locked.The service is suspended due to overdue payments. Top up your account first.
    400VpnGateway.IpsecVpnDisabledThe vpn gateway does not enable IPSec VPN.The IPsec-VPN feature is not enabled for the VPN gateway.
    400VpnRouteEntry.AlreadyExistsThe specified route entry is already exist.The route already exists.
    400VpnRouteEntry.ConflictThe specified route entry has conflict.Route conflicts exist.
    400NotSupportVpnConnectionParameter.IpsecPfsThe specified vpn connection ipsec Ipsec Pfs is not support.The PFS parameter set for the IPsec-VPN connection is not supported.
    400NotSupportVpnConnectionParameter.IpsecAuthAlgThe specified vpn connection ipsec Auth Alg is not support.The authentication algorithm specified for the IPsec-VPN connection is not supported.
    400VpnRouteEntry.ConflictSSLThe specified route entry has conflict with SSL client.The route conflicts with the SSL client.
    400VpnRouteEntry.BackupRouteValidate backup route entry failed.Active/standby routes failed authentication.
    400VpnRouteEntry.InvalidWeightInvalid route entry weight value.The weight specified for the route is invalid.
    400InvalidParameter.VpnConnectionNameThe specified vpn connection name is invalid.The VPN connection name does not meet the requirements.
    400OperationUnsupported.SetDPDCurrent version of the VPN does not support setting DPD.The VPN gateway version does not support DPD.
    400OperationUnsupported.SetNatTraversalCurrent version of the VPN does not support setting NAT traversal.The VPN gateway version does not support NAT traversal.
    400QuotaExceeded.PolicyBasedRouteThe maximum number of policy-based routes is exceeded. Existing routes: %s. Routes to be created: %s. Maximum routes: %s.The quota of policy-based routes is reached. Existing routes: %s. Routes to be created: %s. Quota: %s.
    400MissingParameter.TunnelCidrThe parameter TunnelCidr is mandatory when BGP is enabled.You must specify the tunnel CIDR block when you enable BGP.
    400OperationUnsupported.EnableBgpCurrent version of the VPN does not support enable BGP.The current version of the VPN gateway does not support BGP.
    400MissingParam.CustomerGatewayAsnAsn of customer gateway is mandatory when BGP is enabled.The ASN of the customer gateway cannot be empty when you enable BGP.
    400IllegalParam.LocalAsnThe specified LocalAsn is invalid.The local ASN is invalid.
    400IllegalParam.BgpConfigThe specified BgpConfig is invalid.The BGP configuration is invalid.
    400IllegalParam.EnableBgpVPN connection must enable BGP when VPN gateway has enabled BGP.The error message returned because the VPN connection must use BGP if BGP is enabled for the VPN gateway.
    400IllegalParam.TunnelCidrThe specified TunnelCidr is invalid.The TunnelCidr parameter is set to an invalid value.
    400InvalidLocalBgpIp.MalformedThe specified LocalBgpIp is malformed.The local BGP IP address is in an abnormal state.
    400IllegalParam.LocalBgpIpThe specified LocalBgpIp is invalid.The local BGP IP address is invalid.
    400IllegalParam.LocalSubnetThe specified "LocalSubnet" (%s) is invalid.The specified "LocalSubnet" (%s) is invalid.
    400IllegalParam.RemoteSubnetThe specified "RemoteSubnet" (%s) is invalid.The specified "RemoteSubnet" (%s) is invalid.
    400OperationFailed.MissCertificateThe VPN gateway has not associated any certificates.The error message returned because the VPN gateway is not associated with a certificate.
    400MissingParam.RemoteIdThe remote ID is mandatory when creating national standard VPN connection.The error message returned because the peer ID is not specified. You must specify the peer ID when you create a VPN connection encrypted by SM.
    400OperationFailed.CenLevelNotSupportWhen the VPC to which the VPN gateway belongs is attached to a FULL-mode CEN, the VPN gateway cannot enable BGP.When the VPC to which the VPN gateway belongs is attached to a FULL-mode CEN, the VPN gateway cannot enable BGP.
    400CustomerGateway.ConflictRouteEntryThe specified customer gateway has conflict with route entry.The customer gateway conflicts with the current routes.
    400VpnTask.CONFLICTVpn task has conflict.The VPN operation conflicts. Try again later.
    400Forbidden.TagKey.DuplicatedThe specified tag key already exists.The tag resources are duplicate.
    400SizeLimitExceeded.TagNumThe maximum number of tags is exceeded.The number of tags has reached the upper limit.
    400InvalidParameter.TagValueThe specified parameter TagValue is invalid.The error message returned because the specified tag value is invalid.
    400InvalidParameter.TagKeyThe specified parameter TagKey is invalid.The error message returned because the specified tag key is invalid.
    400Duplicated.TagKeyThe specified parameter TagKey is duplicated.The error message returned because the specified tag key already exists.
    400InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error occurred.
    400InvalidTunnelCidr.MalformedThe specified TunnelCidr is malformed.The specified tunnel CIDR block is invalid.
    400VpnConnectionParamInvalid.SameVpnAndCgwDifferentIkeConfigsIPSec connections associated with the same user gateway and VPN gateway should have the same pre-shared key and IKE configuration.The pre-shared key and IKE parameters must be the same for IPsec-VPN connections that are associated with the same VPN gateway and customer gateway.
    400VpnConnectionParamInvalid.SameVpnAndCgwTrafficSelectorOverlapTraffic selectors of IPSec connections associated with the same user gateway and VPN gateway should not overlap.The protected data flows of IPsec-VPN connections that are associated with the same VPN gateway and customer gateway cannot overlap.
    400CustomerGateway.ConflictVpnIpThe customer gateway associated with the IPSec connection should not have the same IP address as the VPN gateway.The customer gateway and VPN gateway of an IPsec-VPN connection cannot use the same IP address.
    400VpnGateway.IPsecServerAndVpnConnectionConflictThe IPSec connection and IPSec server cannot be configured on the same VPN gateway at the same time.You cannot configure an IPsec server and an IPsec-VPN connection at the same time for one VPN gateway.
    400InvalidSslVpnServerCertId.NotFoundThe parameter is incorrect. The corresponding SSL VPN server certificate cannot be found.The parameter is incorrect. The corresponding SSL VPN server certificate cannot be found.
    400MissingParameter.TunnelOptionsSpecificationThe required parameters are missing when creating a tunnel for dual-tunnel VPN.The required parameters are missing when creating a tunnel for dual-tunnel VPN.
    400CreateDbrRoutesQuotaFull.QuotaFullThe number of created destination routes exceeds the quota limit.The number of created destination routes exceeds the quota limit.
    400CreatePbrRoutesQuotaFull.QuotaFullThe number of policy routes exceeds the quota limit.The number of policy routes exceeds the quota limit.
    400CreateVpnConnectionsQuotaFull.QuotaFullThe number of VPN connections exceeds the quota limit.The number of VPN connections exceeds the quota limit.
    400Resource.QuotaFullThe resources you are operating have reached the upper limit of the quota. Please increase the quota or use other solutions to avoid it according to the VPN operation document.The resources you are operating have reached the upper limit of the quota. Please refer to the VPN operation document to increase the quota or use other schemes to avoid it.
    403Forbbiden.SubUserUser not authorized to operate on the specified resource as your account is created by another user.You are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.
    403ForbiddenUser not authorized to operate on the specified resource.You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
    404InvalidCustomerGatewayInstanceId.NotFoundThe specified customer gateway instance id does not exist.The specified customer gateway does not exist. Check whether the ID of the customer gateway is correct.
    404InvalidVpnGatewayInstanceId.NotFoundThe specified vpn gateway instance id does not exist.The specified VPN gateway does not exist. Check whether the specified VPN gateway is valid.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-01-04The Error code has changedView Change Details
    2023-10-19API Description Update. The API operation is not deprecated.. The Error code has changedView Change Details
    2023-08-21The Error code has changedView Change Details
    2023-08-02The Error code has changedView Change Details
    2023-06-30The Error code has changed. The request parameters of the API has changedView Change Details
    2023-05-04The Error code has changedView Change Details