You need to enable JavaScript to run this app.
导航

CreateSslVpnServer

最近更新时间2024.04.18 17:23:57

首次发布时间2023.07.28 08:04:08

调用CreateSslVpnServer创建一个SSL服务端。

调试

请求参数

名称类型是否必选示例值描述
ActionStringCreateSslVpnServer要执行的操作,取值:CreateSslVpnServer。
VersionString2020-04-01API版本信息。
VpnGatewayIdStringvgw-12bfa2du17q7y1rk****创建SSL服务端使用的VPN网关的ID。您可调用DescribeVpnGateways查询VPN网关的ID信息。

LocalSubnets.N

String

LocalSubnets.1=10.0.1.0/8&LocalSubnets.2=10.0.2.0/8

SSL服务端的本端网段,本端网段是客户端通过SSL VPN连接访问的地址段。

  • 参数 - N:表示SSL服务端网段的序号。
  • 多个网段之间用&分隔。

说明

本端网段不可与ClientIpPool网段冲突。

ClientIpPool

String

192.168.1.0/24

SSL客户端网段。在SSL VPN中,客户端网段是为客户端虚拟网卡分配的访问地址的网段,而不是客户端已有的内网网段。

  • 客户端网段掩码限制:/16/28
  • 客户端网段不能与LocalSubnet网段冲突,也不能与IPSec连接路由冲突。
  • 客户端网段不能与100.64.0.0/10169.254.0.0/16127.0.0.0/8224.0.0.0/4240.0.0.0/4网段重叠。
  • 客户端网段掩码下的可用IP数量,需要大于创建VPN网关时选择的SSL连接数的4倍。例如:SSL连接数为10,则客户端网段可用IP数量需大于40。

SslVpnServerName

String

test-ssl-vpn

待创建的SSL服务端的名称。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、下划线(_)和短划线(-)。

  • 长度限制为1 ~ 128个字符。

  • 不填默认为SSL服务端的ID。

Description

String

This is a descrption

待创建的SSL服务端的描述。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、空格( )、下划线(_)、中划线(-)、等号(=)、英文逗号(,)、中文逗号(,)、中文句号(。)。

  • 长度限制为0 ~ 255个字符。

  • 不填默认为空字符串。

Protocol

String

UDP

SSL服务端所使用的协议,取值:

  • TCP:TCP协议。

  • UDP(默认):UDP协议。

Cipher

String

AES-128-CBC

SSL服务端的加密算法。

  • AES-128-CBC(默认)

  • AES-192-CBC

  • AES-256-CBC

  • None (不使用加密)

Auth

String

SHA1

SSL服务端的认证算法。

  • SHA1(默认)

  • MD5

  • None(不使用加密)

Compress

Boolean

false

是否对传输数据进行压缩处理。

  • true:对通信进行压缩。

  • false(默认值):对通信不进行压缩。

ClientToken

String

02fb3da4-130e-11e9-8e44-0016e04****

客户端Token,用于保证请求幂等性。

  • 由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。

  • 仅支持ASCII字符,且不能超过64个字符。

  • 若不传入ClientToken,则此次API调用不进行幂等校验。

ProjectNameStringProject_1SSL服务端所属的项目。不填默认为default,即创建的资源属于default项目。

Port

Integer

1194

SSL服务端所使用的端口。默认值:1194。

  • 端口取值范围:1~65535
  • 不支持使用以下端口:22,68,179,323,500,4500。

返回数据

名称类型示例值描述
RequestIdString0ED8D006-F706-4D23-88ED-E11ED28D****请求ID。
SslVpnServerIdStringvss-zm55pqtvk17oq32zd****SSL服务端的实例ID

请求示例

GET /?Action=CreateSslVpnServer&Version=2020-04-01&ClientIpPool=172.XX.XX.0/16&VpnGatewayId=vgw-12bjrw3x177y817q7y****&LocalSubnets.1=172.XX.XX.0/16&SslVpnServerName=vpn-test-ssl&Description=vpn-cicd-test&Protocol=UDP&Cipher=AES-128-CBC&Auth=SHA1&Compress=false HTTP/1.1
Host: open.volcengineapi.com
ServiceName: vpn
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202307271943538F491489007CE3****",
        "Action": "CreateSslVpnServer",
        "Version": "2020-04-01",
        "Service": "vpn",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202307271943538F491489007CE3****",
        "SslVpnServerId": "vss-2feyndgkcdbsw59gp68i****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode错误码错误信息描述
400IdempotentParameterMismatchArguments on this idempotent request are inconsistent with arguments used in previous request(s).此幂等请求的参数与前一个请求中使用的参数不一致。
400InvalidCidr.MalformedThe specified cidr block is malformed.指定的网段格式不合法。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
400InvalidName.MalformedThe specified name is malformed. Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidParameter.ClientTokenMalformedThe specified parameter ClientToken is malformed.指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。
400InvalidClientIpPool.ConflictRouteThe specified ClientIpPool conflicts with that of VPN gateway route table cidr.指定的客户端网段与VPN网关路由表中目的地址冲突。
400InvalidSslVpnClientIpPool.ConflictThe specified ClientIpPool conflicts with that of VPN gateway route.指定的客户端网段与VPN网关路由存在冲突。
400InvalidSslVpnServerAuth.MalformedThe specified Auth is malformed.指定的SSL服务端认证算法不合法。
400InvalidSslVpnServerCipher.MalformedThe specified Cipher is malformed.指定的SSL服务端加密算法不合法。
400InvalidSslVpnServerClientIpPool.MalformedThe specified ClientIpPool is malformed.指定的客户端网段不合法。
400InvalidSslVpnServerClientIpPoolMask.MalformedThe netmask length of client IP pool must be greater than or equal to 16 and less than or equal to 28.指定的客户端网段掩码必须大于等于16且小于等于28。
400InvalidSslVpnServerLocalSubnet.ConflictThere are conflicting CIDRs in the specified LocalSubnets.指定本端网段之间存在相互冲突的网段。
400InvalidSslVpnServerLocalSubnet.MalformedThe specified LocalSubnet is malformed.指定的本端网段不合法。
400InvalidSslVpnServerProtocol.MalformedThe specified Protocol is malformed.指定的SSL服务端协议不合法。
400InvalidVpnGateway.InvalidStatusThe specified VPN gateway is not in the correct status for the request.指定的VPN网关所处的状态无法响应该请求。
400InvalidVpnGateway.SslNotEnabledSSL of the specified VPN gateway is not enabled.当前VPN网关未开启SSL功能。
400LimitExceeded.SslVpnServerEachVpnGatewayYou've reached the limit on the number of SSL servers per VPN gateway that you can create.已达到每个VPN网关实例下可创建的SSL服务端数量上限。
400LimitExceeded.SslVpnServerLocalSubnetsYou've reached the limit on the number of local subnets per SSL server that you can create.已达到每个SSL服务端可以配置的本端网段的数量上限。
400InvalidSslVpnServerClientIpPool.VpcRouteEntryFailed to create route entry in the system route table of the VPC contains the specified VPN gateway for the client ip pool.VPN网关所属VPC路由表中添加指向客户端网段的路由失败。
400QuotaExceeded.RouteEntryRoute entry of a route table number exceeded quota.已达到可创建路由条目的数量上限。
400InvalidClientIpPool.NotEnoughThe support ip numbers of ClientIpPool is smaller than SslMaxConnections of vpn gateway.客户端网段支持的IP数量小于网关所选的连接规格。
400InvalidSslVpnServerPort.MalformedThe specified ssl vpn server port is invalid.指定的SSL服务端端口值不合法。
400QuotaExceeded.VpcRouteEntryYou've reached the limit on the number of route entry in the system route table of the VPC contains the specified VPN gateway that you can create.已达到指定VPN网关所属VPC系统路由表可创建路由条目的数量上限。
404InvalidVpnGateway.NotFoundThe specified VPN gateway does not exist.指定的VPN网关不存在。
404InvalidProject.NotFoundThe specified Project does not exist.指定的项目不存在。
409InvalidRouteCidr.ConflictThe specified CIDR block conflicts with that of another route in your route table.指定的CIDR地址块与所属路由表中另一个规则CIDR地址块冲突。
409InvalidSslVpnServerVpcRouteEntry.ConflictThe specified ClientIpPool conflicts with that of another route in the system route table of the VPC contains the VPN gateway.指定的客户端网段与VPN网关所属VPC的系统路由表中另一个规则的CIDR地址块冲突。
412IdempotentProcessingThe request uses the same client token as a previous one that is still in process.幂等请求处理中。
412InvalidVpnGateway.ExpiredThe specified VPN gateway has expired.指定的VPN网关已过期。