You need to enable JavaScript to run this app.
文档中心
VPN连接

VPN连接

复制全文
下载 pdf
VPN网关路由
CreateVpnGatewayRoute-创建VPN网关路由
复制全文
下载 pdf
CreateVpnGatewayRoute-创建VPN网关路由
调用CreateVpnGatewayRoute为VPN网关添加一条目的路由条目。​
使用说明​
不支持添加与VPN网关所属VPC路由表中已有路由冲突的路由条目。更多VPN网关路由的说明,请参见VPN网关路由概述。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:CreateVpnGatewayRoute​
要执行的操作,取值:CreateVpnGatewayRoute。​
​
Version String 必选 示例值:2020-04-01​
API版本信息。​
​
VpnGatewayId String 必选 示例值:vgw-3tehy13n2l4c6c0v****​
待添加路由条目的VPN网关的ID。​
​
DestinationCidrBlock String 必选 示例值:192.XX.XX.0/24​
VPN网关路由条目的目标网段。​
​
NextHopId String 必选 示例值:vgc-3tex2x1cwd4c6c0v****​
路由下一跳IPsec连接的ID。您可调用DescribeVpnConnections查询IPsec连接的ID信息。​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 可选 示例值:20220322145233010225243081016A****​
请求ID。​
​
VpnGatewayRouteId String 可选 示例值:vgr-3tex2c6c0v844c****​
新添加的VPN网关路由条目的ID。​
​
​
请求示例​
​
GET /?Action=CreateVpnGatewayRoute&Version=2020-04-01&VpnGatewayId=vgw-12bfa2du7fojk17q7y1rk****&DestinationCidrBlock=172.XX.XX.0/24&NextHopId=vgc-7qthudw0ll6jmc**** HTTP/1.1​
Host: vpn.cn-beijing.volcengineapi.com​
X-Date: 20251029T033538Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251029/cn-beijing/vpn/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20220322145233010225243081016A****",​
"Action": "CreateVpnGatewayRoute",​
"Version": "2020-04-01",​
"Service": "vpn",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20220322145233010225243081016A****",​
"VpnGatewayRouteId": "vgr-3tex2c6c0v844c****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidCidr.Malformed​
The specified cidr block is malformed.​
指定的网段格式不合法。​
400​
InvalidRouteCidr.Malformed​
The specified CIDR is malformed.​
指定的网段不合法。​
400​
InvalidVpnGateway.InvalidStatus​
The specified VPN gateway is not in the correct status for the request.​
指定的VPN网关所处的状态无法响应该请求。​
400​
QuotaExceeded.RouteEachVPNGateway​
You've reached the limit on the number of route entries per VPN gateway that you can create.​
已达到每个VPN网关可创建的路由条目的数量上限。​
400​
QuotaExceeded.RouteEntry​
Route entry of a route table number exceeded quota.​
已达到可创建路由条目的数量上限。​
400​
InvalidVpnGatewayRoute.SslVpnClientIpPoolConflict​
The specified vpn gateway route conflicts with that of existing SSL server client ip pool.​
指定VPN网关路由与已有SSL服务端所属客户端网段存在冲突。​
400​
InvalidGatewayRouteTablePrefixList.Malformed​
The specified gateway route table does not support prefix list.​
指定的网关路由表不支持前缀列表。​
400​
InvalidRouteNextHop.Malformed​
The specified next hop is malformed.​
指定的下一跳不合法。​
400​
IncorrectVpnConnectionStatus​
The operation is not supported by the current vpn connection.​
当前操作不支持,请稍后重试。​
400​
QuotaExceeded.SystemRouteEntry​
You've reached the limit on the number of system route entries per route table.​
已达到可创建系统路由条目的数量上限。​
404​
InvalidProject.NotFound​
The specified Project does not exist.​
指定的项目不存在。​
404​
InvalidVpnGatewayRoute.InvalidNextHop​
The specified connection does not belong to the specified VPN gateway.​
指定的下一跳不属于指定的VPN网关。​
404​
InvalidVpnConnection.NotFound​
The specified IPSec connection does not exist.​
指定的IPSec连接不存在。​
404​
InvalidVpnGateway.NotFound​
The specified VPN gateway does not exist.​
指定的VPN网关不存在。​
404​
InvalidRouteTable.NotFound​
The specified route table does not exist.​
指定的路由表不存在。​
409​
InvalidRouteCidr.Conflict​
The specified CIDR block conflicts with that of another route in your route table.​
指定的CIDR地址块与所属路由表中另一个规则CIDR地址块冲突。​
409​
InvalidRouteCidr.Conflict​
The specified CIDR block conflicts with that of another subnet in your VPC.​
指定的CIDR地址块与所属VPC中另一个子网的CIDR地址块冲突。​
409​
InvalidVpnRouteCidr.Conflict​
The specified CIDR block conflicts with that of another route in vpc of VPN gateway.​
指定的CIDR地址块与VPN网关所在VPC的路由地址块冲突。​
412​
InvalidVpnGateway.Expired​
The specified VPN gateway has expired.​
指定的VPN网关已过期。​
​
最近更新时间:2026.02.02 11:15:04
这个页面对您有帮助吗?
有用
有用
无用
无用