All Products
Document Center

Virtual Private Cloud:CreateSslVpnServer

Last Updated:Aug 24, 2023

Creates an SSL server.

Operation Description

  • The CreateSslVpnServer operation is asynchronous. After you send the request, the system returns a request ID, but the operation is still being performed in the system background. You can call the DescribeVpnGateway operation to query the status of the associated VPN gateway and determine whether the SSL server is created.

    • If the VPN gateway is in the updating state, the SSL server is being created.
    • If the VPN gateway is in the active state, the SSL server is created.
  • You cannot repeatedly call the CreateSslVpnServer operation for the same VPN gateway within the specified period of time.


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
  • VPNGateway
  • VPNGateway

Request parameters


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

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

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.

The ID of the region where the VPN gateway is created.

You can call the DescribeRegions operation to query the most recent region list.


The ID of the VPN gateway.


The name of the SSL server.

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


The client CIDR block.

The CIDR block that is allocated to the virtual network interface of the client. It is not the CIDR block where the client resides.

When the client accesses the destination network through an SSL-VPN connection, the VPN gateway allocates an IP address from the client CIDR block to the client.

Note This CIDR block cannot conflict with the CIDR block specified by LocalSubnet.

The local CIDR block.

The CIDR block to be accessed by the client through the SSL-VPN connection.

This value can be the CIDR block of a virtual private cloud (VPC), a vSwitch, a data center that is connected to a VPC through an Express Connect circuit, or Object Storage Service (OSS).

The protocol that is used by the SSL server. Valid values:

  • TCP: TCP
  • UDP (default): UDP

The encryption algorithm that is used in the SSL-VPN connection. Valid values:

  • AES-128-CBC (default): AES-128-CBC
  • AES-192-CBC: AES-192-CBC
  • AES-256-CBC: AES-256-CBC
  • none: does not use an encryption algorithm.

The port used by the SSL server. Default value: 1194. The following ports cannot be used:

22, 2222, 22222, 9000, 9001, 9002, 7505, 80, 443, 53, 68, 123, 4510, 4560, 500, and 4500.


Specifies whether to enable data compression. Valid values:

  • true: yes
  • false (default): no

Specifies whether to enable two-factor authentication. Valid values:

  • true: yes
  • false (default): no
Note To enable two-factor authentication, make sure that the VPN gateway was created after 00:00:00 (UTC+8), March 5, 2020. Otherwise, two-factor authentication is not supported.

The ID of the IDaaS instance.


The ID of the region where the IDaaS instance is created.


Response parameters


The ID of the SSL server.


The ID of the request.


The name of the SSL server.



Sample success responses


  "SslVpnServerId": "vss-bp18q7hzj6largv4v****",
  "RequestId": "E98A9651-7098-40C7-8F85-C818D1EBBA85",
  "Name": "test"

Error codes

HTTP status codeError codeError messageDescription
400Resource.QuotaFullThe quota of resource is fullThe resource quota is exhausted.
400InvalidNameThe name is not validThe name format is invalid.
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.SslVpnDisabledThe vpn gateway does not enable SSL VPN.-
400SslVpnServer.AlreadyExistThe SSL VPN server of specified vpn gateway already exists.The specified SSL server already exists on the VPN gateway.
400VpnRouteEntry.ConflictThe specified route entry has conflict.Route conflicts exist.
400IpConflictClient IP pool conflict with local IP range.The client IP pool conflicts with the local IP range.
400IpConflictClient IP pool conflict with other SSL VPN server in the same VPC.The client IP address pool conflicts with SSL servers in the same VPC.
400SslVpnServer.AddRouteErrorAdd route error whose destination is client IP pool, please check vpc route entry and relevant quota.The system failed to add the route that points to the client CIDR block. View the VPC route and quota.
400ClientIpPool.NetmaskInvalidThe netmask length of client IP pool must be greater than or equal to 16 and less than or equal to 29.The subnet mask of the client IP pool must range from 16 to 29.
400ClientIpPool.SubnetInvalidThe specified client IP pool cannot be used.The client CIDR block is unavailable.
400MissingParameter.IDaaSInstanceIdThe input parameter IDaaSInstanceId is mandatory when enable multi-factor authentication.You must set the IDaaSInstanceId parameter when you enable two-factor authentication.
400InvalidIDaaSInstanceId.NotFoundThe specified IDaaSInstanceId does not exist.-
400OperationFailed.CreateIDaaSAppFailed to create authorized app in your IDaaS instance.-
400OperationFailed.GetIDaaSInfoFailed to get secret key from your IDaaS instance.-
400OperationFailed.NoRamPermissionVpn Service has no permission to operate your IDaaS instances.The VPN service does not have the permissions to manage your IDaaS instance.
400OperationUnsupported.NotSupportMultiFactorAuthCurrent version of the VPN does not support multi-factor authentication.-
400QuotaExceeded.VpnRouteEntryThe number of route entries to the VPN gateway in the VPC routing table has reached the quota limit.The number of route entries to the VPN gateway in the VPC routing table has reached the quota limit.
400SystemBusyThe system is busy. Please try again later.The system is busy. Please try again later.
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.
404InvalidRegionId.NotFoundThe specified region is not found during access authentication.The specified area is not found during authentication.
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
2023-05-30The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404