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

CreateVpnConnectionHealthCheckers

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

首次发布时间2024.03.22 08:25:16

调用CreateVpnConnectionHealthCheckers创建IPsec连接健康检查。

调试

请求参数

名称类型是否必选示例值描述

Action

String

CreateVpnConnectionHealthCheckers

要执行的操作,取值:CreateVpnConnectionHealthCheckers。

VersionString2020-04-01API版本信息。
VpnConnectionIdStringvgc-273zkshb2qayo7fap8t21IPsec连接的ID。

HealthCheckConfigs.N.LocalIp

String

HealthCheckConfigs.1.LocalIp=100.XX.XX.10&HealthCheckConfigs.2.LocalIp=100.XX.XX.11

健康检查的源IP,源IP指本地数据中心或对端VPC通过IPsec连接,可以访问的本端VPC侧的IP地址。

  • 参数 - N - 参数:表示健康检查中源IP的序号。

  • 多个源IP之间用&分隔。

  • 不支持169.254.0.0/16224.0.0.0/3127.0.0.0/8网段内的IP。

  • 同一个VPN网关下有多个IPsec连接需要开启健康检查时,请使用不同的源IP来区分。

HealthCheckConfigs.N.RemoteIp

String

HealthCheckConfigs.1.RemoteIp=192.XX.XX.12&HealthCheckConfigs.2.RemoteIp=192.XX.XX.18

健康检查的目的IP,目的IP是本端VPC通过IPsec连接,可以访问的对端数据中心或对端VPC的IP地址。

  • 参数 - N - 参数:表示健康检查中目的IP的序号。

  • 多个目标IP之间用&分隔。

  • 目的IP不可与源IP相同,不支持169.254.0.0/16224.0.0.0/3127.0.0.0/8网段内IP。

HealthCheckConfigs.N.CheckInterval

Integer

HealthCheckConfigs.1.CheckInterval=3&HealthCheckConfigs.2.CheckInterval=3

执行健康检查的时间间隔。

  • 参数 - N - 参数:表示健康检查中时间间隔的序号。

  • 多个时间间隔之间用&分隔。

  • 取值范围为1 ~ 300, 默认值为3,单位:秒。

HealthCheckConfigs.N.UpTime

Integer

HealthCheckConfigs.1.UpTime=3&HealthCheckConfigs.2.UpTime=3

健康检查的健康阈值。

  • 参数 - N - 参数:表示健康检查中健康阈值的序号。

  • 多个健康阈值之间用&分隔。

  • 取值范围为1 ~ 10,默认值:3,单位:次。

HealthCheckConfigs.N.DownTime

Integer

HealthCheckConfigs.1.DownTime=3&HealthCheckConfigs.2.DownTime=3

健康检查的不健康阈值。

  • 参数 - N - 参数:表示健康检查中不健康阈值的序号。

  • 多个不健康阈值之间用&分隔。

  • 取值范围为1 ~ 10,默认值:3,单位:次。

HealthCheckConfigs.N.Timeout

Integer

HealthCheckConfigs.1.Timeout=2&HealthCheckConfigs.2.Timeout=2

健康检查的响应超时时间。

  • 参数 - N - 参数:表示健康检查响应超时时间的序号。

  • 多个响应超时时间之间用&分隔。

  • 取值范围为1 ~ 300,且需要小于CheckInterval的值。默认值:1,单位:秒。

  • 响应超时时间不可大于探测间隔。

ClientToken

String

123e4567-e89b-12d3-a456-42665544****

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

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

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

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

返回数据

名称类型示例值描述
CheckerIdsList["vhc-fejkfjkrg3ef0****", "vhc-def1we6nzla****"]新创建健康检查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: open.volcengineapi.com
ServiceName: vpn
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20240318143303A529B2D8F6C****",
        "Action": "CreateVpnConnectionHealthCheckers",
        "Version": "2020-04-01",
        "Service": "vpn",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "20240318143303A529B2D8F6C6E2****",
        "checkerIDs": [
            "vhc-12b9ncfrstuyo17q7y1dn****"
        ]
    }
}

错误码

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

HttpCode错误码错误信息描述
400IdempotentParameterMismatchArguments on this idempotent request are inconsistent with arguments used in previous request(s).此幂等请求的参数与前一个请求中使用的参数不一致。
400InvalidCheckInterval.MalformedThe specified check interval is malformed.指定的check interval不合法。
400InvalidDownTime.MalformedThe specified check downtime is malformed.指定的check downtime不合法。
400InvalidHealthCheckConfig.EmptyHealth check configuration is empty.指定的健康检查配置为空。
400InvalidHealthCheckConfig.IpPairExistsThe 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连接的其他健康检查相同。
400InvalidHealthCheckConfig.LocalIpConflictThe specified local ip conflicts with that of another health checker in the same VPN gateway.指定的local ip和此网关其他健康检查冲突。
400InvalidHealthCheckConfig.RemoteIpConflictThe specified remote ip conflicts with that of another health checker in the same VPN gateway.指定的remote ip和此网关其他健康检查冲突。
400InvalidHealthCheckConfig.RemoteIpInUseThe specified remote ip conflicts with the address used in the VPN gateway.指定的remote ip和此网关本地ip冲突。
400InvalidHeathCheckConfig.LocalIpInUseThe specified local ip conflicts with the address used in the VPN gateway.指定的local ip和此网关本地ip冲突。
400InvalidLocalIp.MalformedThe specified local IP is malformed.指定的local ip不合法。
400InvalidParameter.ClientTokenMalformedThe specified parameter ClientToken is malformed.指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。
400InvalidRemoteIp.MalformedThe specified remote ip is malformed.指定的remote ip不合法。
400InvalidTimeout.MalformedThe specified check timeout is malformed.指定的check timeout不合法。
400InvalidUpTime.MalformedThe specified check uptime is malformed.指定的check uptime不合法。
400InvalidVpnConnection.InvalidStatusThe specified VPN connection is not in the correct status for the request.指定的VPN连接所处的状态无法响应该请求。
400InvalidVpnGateway.FirmwareNotSupportedThe specified features aren't supported by the VPN gateway, please upgrade your VPN gateway.VPN网关不支持所选择的功能,请升级您的VPN网关。
400InvalidVpnGateway.InvalidStatusThe specified VPN gateway is not in the correct status for the request.指定的VPN网关所处的状态无法响应该请求。
400QuotaExceeded.VpnGatewayHealthCheckersYou've reached the limit on the number of health checkers per VPN gateway that you can create.已达到每个VPN网关可创建的健康检查数量上限。
400InvalidHealthCheckConfig.IpPairMalformedThe specified remote ip is the same with the local ip.健康检查指定的remote ip和local ip重复。
404InvalidVpnConnection.NotFoundThe specified IPSec connection does not exist.指定的IPSec连接不存在。
412IdempotentProcessingThe request uses the same client token as a previous one that is still in process.幂等请求处理中。