Creates an SSL server.
Operation description
-
CreateSslVpnServer 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 the DescribeVpnGateway operation to query the status of the task.
- 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 within the specified period of time.
Prerequisite
- A VPN gateway is created, and the SSL-VPN feature is enabled for the VPN gateway. For more information, see CreateVpnGateway .
- If you want to enable two-factor authentication for the SSL server, make sure that the VPN gateway supports two-factor authentication. You may need to upgrade the VPN gateway. For more information, see Two-factor authentication supports IDaaS EIAM 2.0.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:CreateSslVpnServer | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | 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-0016e04115b |
RegionId | string | Yes | The region ID of the VPN gateway. You can call the DescribeRegions operation to query the most recent region list. | cn-shanghai |
VpnGatewayId | string | Yes | The ID of the VPN gateway. | vpn-bp1hgim8by0kc9nga**** |
Name | string | No | The SSL server name. The name must be 1 to 100 characters in length and cannot start with | sslvpnname |
ClientIpPool | string | Yes | The client CIDR block. It is the CIDR block from which an IP address is allocated to the virtual network interface controller (NIC) of the client. It is not the private CIDR block of the client. If the client accesses the SSL server over an SSL-VPN connection, the VPN gateway assigns an IP address from the specified client CIDR block to the client. The client uses the assigned IP address to access cloud resources. Make sure that the number of IP addresses in the client CIDR block is at least four times the maximum number of SSL-VPN connections supported by the VPN gateway. Click to view the reason.
Click to view the CIDR blocks that are not supported.
Click to view the recommended client CIDR blocks for different numbers of SSL-VPN connections.
Note
| 192.168.1.0/24 |
LocalSubnet | string | Yes | The local CIDR block. It is the CIDR block that your client needs to access by using the SSL-VPN connection. This value can be the CIDR block of a VPC, a vSwitch, a data center that is connected to a VPC by using an Express Connect circuit, or an Alibaba Cloud service such as Object Storage Service (OSS). The subnet mask of the specified local CIDR block must be 8 to 32 bits in length. You cannot specify the following CIDR blocks as the local CIDR blocks:
| 10.0.0.0/8 |
Proto | string | No | The protocol that is used by the SSL server. Valid values:
| UDP |
Cipher | string | No | The encryption algorithm that is used by the SSL-VPN connection.
| AES-128-CBC |
Port | integer | No | The port that is used by the SSL server. Valid values of port numbers: 1 to 65535. Default value: 1194. The following ports are not supported: 22, 2222, 22222, 9000, 9001, 9002, 7505, 80, 443, 53, 68, 123, 4510, 4560, 500, and 4500. | 1194 |
Compress | boolean | No | Specifies whether to enable data compression. Valid values:
| false |
EnableMultiFactorAuth | boolean | No | Specifies whether to enable two-factor authentication. To enable two-factor authentication, you need to specify
Note
| false |
IDaaSInstanceId | string | No | The ID of the IDaaS EIAM instance. | idaas-cn-hangzhou-p**** |
IDaaSRegionId | string | No | The region ID of the IDaaS EIAM instance. | cn-hangzhou |
IDaaSApplicationId | string | No | The ID of the IDaaS application.
| app_my6g4qmvnwxzj2f**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"SslVpnServerId": "vss-bp18q7hzj6largv4v****",
"RequestId": "E98A9651-7098-40C7-8F85-C818D1EBBA85",
"Name": "test"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Resource.QuotaFull | The quota of resource is full | The resource quota is exhausted. |
400 | InvalidName | The name is not valid | The name format is invalid. |
400 | VpnGateway.Configuring | The specified service is configuring. | The service is being configured. Try again later. |
400 | VpnGateway.FinancialLocked | The specified service is financial locked. | The service is suspended due to overdue payments. Top up your account first. |
400 | SslVpnServer.AlreadyExist | The SSL VPN server of specified vpn gateway already exists. | The specified SSL server already exists on the VPN gateway. |
400 | VpnRouteEntry.Conflict | The specified route entry has conflict. | Route conflicts exist. |
400 | IpConflict | Client IP pool conflict with local IP range. | The client IP pool conflicts with the local IP range. |
400 | IpConflict | Client 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. |
400 | SslVpnServer.AddRouteError | Add 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. |
400 | ClientIpPool.NetmaskInvalid | The 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. |
400 | ClientIpPool.SubnetInvalid | The specified client IP pool cannot be used. | The client CIDR block is unavailable. |
400 | MissingParameter.IDaaSInstanceId | The input parameter IDaaSInstanceId is mandatory when enable multi-factor authentication. | You must set the IDaaSInstanceId parameter when you enable two-factor authentication. |
400 | OperationFailed.NoRamPermission | Vpn Service has no permission to operate your IDaaS instances. | The VPN service does not have the permissions to manage your IDaaS instance. |
400 | OperationUnsupported.NotSupportMultiFactorAuth | Current version of the VPN does not support multi-factor authentication. | - |
400 | QuotaExceeded.VpnRouteEntry | The 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. |
400 | SystemBusy | The system is busy. Please try again later. | The system is busy. Please try again later. |
400 | SslVpnServerPort.Illegal | The server port is not in the range of [1-65535]. | The port of the SSL-VPN server must be from 1 to 65535. |
400 | EnableHaCheck.SslVpnServerClientCidrContainsVpcRouteDest | Ssl vpn client cidr contains vpc route prefix. The vpc route prefix is %s. | The prefix %s in the VPC route table falls within the CIDR block of the SSL client. |
400 | VpnGateway.SslVpnDisabled | The VPN gateway has not enabled SSL VPN. | The SSL-VPN feature is disabled for the VPN gateway. |
400 | IllegalParam.LocalSubnet | The specified "LocalSubnet" (%s) is invalid. | The specified "LocalSubnet" (%s) is invalid. |
400 | IllegalParam.IDaaSApplicationId | The specified IDaaS application Id is not illegal, the application instance needs to be created based on the dedicated SSL VPN template. | The specified IDaaS application instance ID is invalid. The application instance must be created based on the dedicated SSL VPN template. |
400 | SslVpnIDaaS2.NotSupport | Current version of the VPN does not support IDaaS2.0. | The current version of the VPN instance does not support IDaaS2.0. |
400 | MissingParam.IDaaSApplicationId | The input parameter IDaaSApplicationId is mandatory when enable multi-factor authentication. | Enter the IDaaSApplicationId parameters when starting two-factor authentication. |
400 | MissingParam.IDaaSRegionId | The input parameter IDaaSRegionId is mandatory when enable multi-factor authentication. | Enter the IDaaSRegionId parameters when starting two-factor authentication. |
403 | Forbbiden.SubUser | User 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. |
403 | Forbidden | User 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. |
404 | InvalidRegionId.NotFound | The specified region is not found during access authentication. | The specified area is not found during authentication. |
404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | The specified VPN gateway does not exist. Check whether the specified VPN gateway is valid. |
404 | InvalidIDaaSInstanceId.NotFound | The specified IDaaS instance ID does not exist. | The specified IDaaS instance does not exist. |
404 | InvalidIDaaSApplicationId.NotFound | The specified IDaaS application Id does not exist. | The ID of the specified IDaaS application instance does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-10-19 | API Description Update. The API operation is not deprecated.. The Error code has changed | View Change Details |
2023-05-30 | The Error code has changed | View Change Details |