调用AssociateHaVip接口将HaVip绑定到ENS实例或ENS弹性网卡上。
接口说明
在调用本接口绑定高可用虚拟 IP 时,请注意:
HaVip 绑定后,无需重启 ENS 实例,但需要将 HaVip 配置到 ENS 实例的弹性网卡上。
HaVip 和要绑定的 ENS 实例必须同属于一个交换机。
要绑定的 ENS 实例的状态必须为运行中或已停止。
HaVip 实例的状态必须为 Available 或 InUse。
- AssociateHaVip 接口属于异步接口,即系统返回一个请求 ID,但该 HaVip 并未绑定完成,系统后台的绑定任务仍在进行。您可以调用 DescribeHaVips 查询 HaVip 的绑定状态:
当 HaVip 处于 Associating 状态时,表示 HaVip 正在绑定中。
当 HaVip 处于 InUse 状态时,表示 HaVip 绑定完成。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:AssociateHaVip |
update |
*HaVip
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| HaVipId |
string |
是 |
要绑定的 HaVip 实例 ID。 |
havip-5p14t**** |
| InstanceId |
string |
是 |
实例 ID。 |
i-50c4**** |
| InstanceType |
string |
否 |
要绑定 HaVip 的实例类型,取值:
|
EnsInstance |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
示例
正常返回示例
JSON格式
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InstanceNotFound | The input parameter instancdId that is not found. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | HaVipNotFound | The input parameter haVipId that is not found. | 指定的HaVip不存在。 |
| 400 | IncorrectHaVipStatus | The status of the haVip is invalid. | HaVip的状态不正确 |
| 400 | SystemError | Interface call error, please re-match, or contact the product. | 接口调用错误,请重新选配 |
| 400 | InstanceAlreadyAssociated | The instance is already bound. | 实例已绑定。 |
| 400 | IncorrectNetworkInterfaceStatus | The operation could not be completed because the status of the specified network interface is invalid for this action. | 指定的网卡状态不支持当前操作。 |
| 400 | NetworkInterfaceNotFound | The specified network interface does not exist. | 指定的网卡不存在。 |
| 400 | NetworkInterfaceTypeNotSupported | This network interface type cannot be used with the current operation. | 网卡类型不支持当前操作 |
| 400 | IncorrectInstanceVSwitch | The binding instance must be under the same VSwitch. | 绑定实例需要在同一个交换机下。 |
| 400 | IncorrectInstanceStatus | The current status of the instance does not support this operation. | 当前实例状态不支持此操作。 |
| 400 | CountLimitExceed.HaVipOnInstance | The amount of HaVip associated with the specified Instance reach its limits. | 超过实例的HaVip限额。 |
| 400 | CountLimitExceed.InstanceOnHaVip | The number of instances bound to HaVip has reached the limit. | HaVip上绑定的实例数已达限额 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。