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

VPN连接

复制全文
下载 pdf
VPN连接健康检查
CreateVpnConnectionHealthCheckers-创建健康检查实例
复制全文
下载 pdf
CreateVpnConnectionHealthCheckers-创建健康检查实例
调用CreateVpnConnectionHealthCheckers创建IPsec连接健康检查。​
使用说明​
  • 若待配置健康检查的IPsec连接绑定资源为“VPN网关”,需确保VPN网关为最新版本,请您先升级VPN网关,具体操作请参考升级VPN网关。​
  • 已创建的绑定资源为“中转路由器”的IPsec连接,暂不支持配置健康检查,如有需要请重新创建IPsec连接。​
  • 如果IPsec连接配置了健康检查,需要在对端配置一个可以回复ICMP报文的IP,用于健康检查的探测。​
  • 已提前规划好健康检查的IP地址。健康检查的源IP不可使用通过该IPsec连接进行通信的VPC内将要被占用的IP,否则可能会导致经过VPN网关的流量不可达。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:CreateVpnConnectionHealthCheckers​
要执行的操作,取值:CreateVpnConnectionHealthCheckers。​
​
Version String 必选 示例值:2020-04-01​
API版本信息。​
​
VpnConnectionId String 必选 示例值:vgc-273zkshb2qayo7fap8t21​
IPsec连接的ID。​
​
HealthCheckConfigs.N.LocalIp String 必选 示例值:100.XX.XX.10​
健康检查的源IP,源IP指本地数据中心或对端VPC通过IPsec连接,可以访问的本端VPC侧的IP地址。​
  • 参数 - N - 参数:表示健康检查中源IP的序号。​
  • 多个源IP之间用&分隔。​
  • 不支持169.254.0.0/16、224.0.0.0/3、127.0.0.0/8网段内的IP。​
  • 同一个VPN网关下有多个IPsec连接需要开启健康检查时,请使用不同的源IP来区分。​
​
HealthCheckConfigs.N.RemoteIp String 必选 示例值:192.XX.XX.12​
健康检查的目的IP,目的IP是本端VPC通过IPsec连接,可以访问的对端数据中心或对端VPC的IP地址。​
  • 参数 - N - 参数:表示健康检查中目的IP的序号。​
  • 多个目标IP之间用&分隔。​
  • 目的IP不可与源IP相同,不支持169.254.0.0/16、224.0.0.0/3、127.0.0.0/8网段内IP。​
​
HealthCheckConfigs.N.CheckInterval Integer 可选 示例值:3​
执行健康检查的时间间隔。​
  • 参数 - N - 参数:表示健康检查中时间间隔的序号。​
  • 多个时间间隔之间用&分隔。​
  • 取值范围为1 ~ 300, 默认值为3,单位:秒。​
​
HealthCheckConfigs.N.UpTime Integer 可选 示例值:3​
健康检查的健康阈值。​
  • 参数 - N - 参数:表示健康检查中健康阈值的序号。​
  • 多个健康阈值之间用&分隔。​
  • 取值范围为1 ~ 10,默认值:3,单位:次。​
​
HealthCheckConfigs.N.DownTime Integer 可选 示例值:3​
健康检查的不健康阈值。​
  • 参数 - N - 参数:表示健康检查中不健康阈值的序号。​
  • 多个不健康阈值之间用&分隔。​
  • 取值范围为1 ~ 10,默认值:3,单位:次。​
​
HealthCheckConfigs.N.Timeout Integer 可选 示例值:2​
健康检查的响应超时时间。​
  • 参数 - N - 参数:表示健康检查响应超时时间的序号。​
  • 多个响应超时时间之间用&分隔。​
  • 取值范围为1 ~ 300,且需要小于CheckInterval的值。默认值:1,单位:秒。​
  • 响应超时时间不可大于探测间隔。​
​
ClientToken String 可选 示例值:123e4567-e89b-12d3-a456-42665544****​
客户端Token,用于保证请求幂等性。​
  • 由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。​
  • 仅支持ASCII字符,且不能超过64个字符。​
  • 若不传入ClientToken,则此次API调用不进行幂等校验。​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 可选 示例值:0ED8D006-F706-4D23-88ED-E11ED28D****​
请求ID。​
​
CheckerIds String[] 可选 示例值:vhc-fejkfjkrg3ef0****​
新创建健康检查ID的列表。​
​
​
请求示例​
​
GET /?Action=Action=CreateVpnConnectionHealthCheckers&Version=2020-04-01&VpnConnectionId=vgc-imj14gcqbbpc8gbss****&HealthCheckConfigs.1.LocalIp=172.XX.XX.134&HealthCheckConfigs.1.RemoteIp=172.XX.XX.253&HealthCheckConfigs.1.CheckInterval=5&HealthCheckConfigs.1.UpTime=3&HealthCheckConfigs.1.DownTime=3&HealthCheckConfigs.1.Timeout=3 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": "20240318143303A529B2D8F6C6E2****",​
"Action": "CreateVpnConnectionHealthCheckers",​
"Version": "2020-04-01",​
"Service": "vpn",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20240318143303A529B2D8F6C6E2****",​
"CheckerIds": [​
"vhc-12b9ncfrstuyo17q7y1dn****"​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
IdempotentParameterMismatch​
Arguments on this idempotent request are inconsistent with arguments used in previous request(s).​
此幂等请求的参数与前一个请求中使用的参数不一致。​
400​
InvalidCheckInterval.Malformed​
The specified check interval is malformed.​
指定的check interval不合法。​
400​
InvalidDownTime.Malformed​
The specified check downtime is malformed.​
指定的check downtime不合法。​
400​
InvalidHealthCheckConfig.Empty​
Health check configuration is empty.​
指定的健康检查配置为空。​
400​
InvalidHealthCheckConfig.IpPairExists​
The specified local ip and remote ip is the same with that of another health checker in the same VPN connection.​
指定的local ip和remote ip和此IPSec连接的其他健康检查相同。​
400​
InvalidHealthCheckConfig.LocalIpConflict​
The specified local ip conflicts with that of another health checker in the same VPN gateway.​
指定的local ip和此网关其他健康检查冲突。​
400​
InvalidHealthCheckConfig.RemoteIpConflict​
The specified remote ip conflicts with that of another health checker in the same VPN gateway.​
指定的remote ip和此网关其他健康检查冲突。​
400​
InvalidHealthCheckConfig.RemoteIpInUse​
The specified remote ip conflicts with the address used in the VPN gateway.​
指定的remote ip和此网关本地ip冲突。​
400​
InvalidHeathCheckConfig.LocalIpInUse​
The specified local ip conflicts with the address used in the VPN gateway.​
指定的local ip和此网关本地ip冲突。​
400​
InvalidLocalIp.Malformed​
The specified local IP is malformed.​
指定的local ip不合法。​
400​
InvalidParameter.ClientTokenMalformed​
The specified parameter ClientToken is malformed.​
指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。​
400​
InvalidRemoteIp.Malformed​
The specified remote ip is malformed.​
指定的remote ip不合法。​
400​
InvalidTimeout.Malformed​
The specified check timeout is malformed.​
指定的check timeout不合法。​
400​
InvalidUpTime.Malformed​
The specified check uptime is malformed.​
指定的check uptime不合法。​
400​
InvalidVpnConnection.InvalidStatus​
The specified VPN connection is not in the correct status for the request.​
指定的VPN连接所处的状态无法响应该请求。​
400​
InvalidVpnGateway.FirmwareNotSupported​
The specified features aren't supported by the VPN gateway, please upgrade your VPN gateway.​
VPN网关不支持所选择的功能,请升级您的VPN网关。​
400​
InvalidVpnGateway.InvalidStatus​
The specified VPN gateway is not in the correct status for the request.​
指定的VPN网关所处的状态无法响应该请求。​
400​
QuotaExceeded.VpnGatewayHealthCheckers​
You've reached the limit on the number of health checkers per VPN gateway that you can create.​
已达到每个VPN网关可创建的健康检查数量上限。​
400​
InvalidHealthCheckConfig.IpPairMalformed​
The specified remote ip is the same with the local ip.​
健康检查指定的remote ip和local ip重复。​
400​
InvalidHealthCheckConfig.IpNotInTrafficSelector​
The specified local ip or remote ip is not within the configured traffic selector.​
健康检查的 local ip 或 remote ip 不在配置的 Traffic Selector 范围内。​
400​
QuotaExceeded.TRIPsecHealthCheckers​
You've reached the limit on the number of health checkers per TR IPsec that you can create.​
已达到每个VPN网关可创建的健康检查数量上限。​
404​
InvalidVpnConnection.NotFound​
The specified IPSec connection does not exist.​
指定的IPSec连接不存在。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
幂等请求处理中。​
​
最近更新时间:2026.02.02 11:15:04
这个页面对您有帮助吗?
有用
有用
无用
无用