You need to enable JavaScript to run this app.
文档中心
私有网络

私有网络

复制全文
下载 pdf
高可用虚拟IP
AssociateHaVip - 绑定高可用虚拟IP
复制全文
下载 pdf
AssociateHaVip - 绑定高可用虚拟IP
调用 AssociateHaVip 接口,将高可用虚拟IP(HAVIP)与云服务器实例或网卡绑定。​
使用说明​
  • 一个高可用虚拟IP最多支持绑定10台云服务器实例或10张网卡,同一个高可用虚拟IP不能既绑定云服务器实例又绑定网卡。​
  • 需确保待绑定云服务器实例或网卡,与高可用虚拟IP在同一子网。​
  • 如果高可用虚拟IP要绑定公网IP,可调用AssociateEipAddress进行绑定,其中InstanceType值为HaVip。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:AssociateHaVip​
接口名称。当前 API 的名称为AssociateHaVip。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
HaVipId String 必选 示例值:havip-2zeo05qre24nhrqpy****​
要绑定的高可用虚拟IP的ID。​
您可以调用 DescribeHaVips 接口,查询高可用虚拟IP的ID。​
​
InstanceType String 可选 示例值:EcsInstance​
绑定高可用虚拟IP的实例的类型。取值如下:​
  • EcsInstance(默认):云服务器实例​
  • NetworkInterface:网卡​
​
InstanceId String 必选 示例值:i-faf344422ffsfad****​
绑定高可用虚拟IP的实例的ID。​
您可以调用 DescribeInstances 或 DescribeNetworkInterfaces 接口,查询云服务器实例的ID或网卡的ID。​
说明​
如果未指定InstanceType,此参数需传入云服务器实例的ID;如果指定了InstanceType,此参数需传入对应类型实例的ID。​
​
ClientToken String 可选 示例值:123e4567-e89b-12d3-a456-42665544****​
客户端Token,用于保证请求幂等性。​
  • 由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。​
  • 仅支持ASCII字符,且不能超过64个字符。​
  • 若不传入ClientToken,则此次API调用不进行幂等校验。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 示例值:F3CD6886-D8D0-4FEE-B93E-1B732396****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=AssociateHaVip&Version=2020-04-01&HaVipId=havip-2zeo05qre24nhrqpy****&InstanceId=i-faf344422ffsfad****&InstanceType=EcsInstance HTTP/1.1​
Host: vpc.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/vpc/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "AssociateHaVip",​
"Version": "2020-04-01",​
"Service": "vpc",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"​
}​
}​
​
错误码​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
IdempotentParameterMismatch​
Arguments on this idempotent request are inconsistent with arguments used in previous request(s).​
此幂等请求的参数与前一个请求中使用的参数不一致。​
400​
InvalidEni.InvalidStatus​
The specified elastic network interface is not in the correct status for the request.​
指定的弹性网卡所处的状态无法响应该请求。​
400​
InvalidHaVip.InvalidStatus​
The specified HaVip is not in the correct status for the request.​
指定的高可用虚拟IP所处状态无法响应该请求。​
400​
InvalidHaVip.NotSupport​
The specified HaVip does not support this operation​
指定的高可用虚拟IP不支持此操作。​
400​
InvalidInstance.HaVipMismatch​
The specified instance and HaVip are in different subnets.​
指定的实例和高可用虚拟IP不在同一个子网内。​
400​
InvalidInstance.InvalidStatus​
The specified instance is not in the correct status for the request.​
指定的ECS实例所处的状态无法响应该请求。​
400​
InvalidInstanceType.Malformed​
The specified instance type is malformed.​
指定的实例类型不合法。​
400​
InvalidParameter.ClientTokenMalformed​
The specified parameter ClientToken is malformed.​
指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。​
400​
LimitExceeded.HaVipsPerInstance​
You've reached the limit on the number of HaVips that you can associate with an instance.​
已达到每个实例可绑定的高可用虚拟IP数量上限。​
400​
LimitExceeded.InstancesPerHaVip​
You've reached the limit on the number of instances that you can associate with a HaVip.​
已达到每个高可用虚拟IP可绑定的实例数量上限。​
403​
Forbidden​
You are not authorized to perform operations on the specified HaVip. Cannot bind HaVip to multiple instance types.​
无权限对指定高可用虚拟IP进行操作。指定的高可用虚拟IP不能同时绑定ECS和弹性网卡。​
403​
Forbidden​
You are not authorized to perform operations on the specified elastic network interface. Cannot associate HaVip with two elastic network interface in the same ECS instance.​
无权限对指定弹性网卡进行操作。不允许将高可用虚拟IP绑定到同一台ECS上的两张网卡。​
403​
Forbidden​
You are not authorized to perform operations on the specified elastic network interface. The specified elastic network interface is a service-managed elastic network interface.​
无权限对指定弹性网卡进行操作。指定的弹性网卡为云产品托管的弹性网卡。​
403​
Forbidden​
You are not authorized to perform operations on the specified elastic network interface. The specified elastic network interface is not attached to ECS.​
无权限对指定弹性网卡进行操作。指定的弹性网卡绑定的类型不是ECS。​
403​
Forbidden​
You are not authorized to perform operations on the specified instance. The specified instance is associated with a HaVip.​
无权限对指定实例进行操作。指定的实例已经绑定了高可用虚拟IP。​
404​
InvalidEniId.NotFound​
The specified elastic network interface does not exist.​
指定的弹性网卡不存在。​
404​
InvalidHaVip.NotFound​
The specified HaVip does not exist.​
指定的高可用虚拟IP不存在。​
404​
InvalidInstance.NotFound​
The specified instance does not exist.​
指定的ECS实例不存在。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
幂等请求处理中。​
​
​
最近更新时间:2026.02.09 16:06:04
这个页面对您有帮助吗?
有用
有用
无用
无用