全部产品
Search
文档中心

专有网络 VPC:UnassociateHaVip - 将HaVip与专有网络ECS实例解绑

更新时间:Aug 28, 2026

调用UnassociateHaVip 接口将HaVip与专有网络ECS实例或弹性网卡解绑。

接口说明

在调用本接口将 HaVip 与专有网络 ECS 实例或弹性网卡解绑时,请注意:

  • 要解绑的 ECS 实例的状态必须为运行中停止

  • 要解绑的 HaVip 状态必须为 AvailableInUse

  • UnassociateHaVip 接口属于异步接口,即系统会返回一个请求 ID,但该 HaVip 尚未解绑成功,系统后台的解绑任务仍在进行。您可以调用 DescribeHaVips 查询 HaVip 的解绑状态:
    • 当 HaVip 处于 Unassociating 状态时,表示 HaVip 正在解绑中。

    • 当 HaVip 处于 Inuse 或者 Available 状态时,表示 HaVip 解绑成功。

  • UnassociateHaVip 接口不支持并发解绑同一个 HaVip。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

ClientToken

string

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持 ASCII 字符,且不能超过 64 个字符。

0c593ea1-3bea-11e9-b96b-88e9fe63****

RegionId

string

HaVip 所在的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-shanghai

HaVipId

string

要解绑的 HaVip 的 ID。

havip-2zeo05qre24nhrqpy****

InstanceId

string

与 HaVip 解绑的 ECS 实例 ID 或弹性网卡实例 ID。

i-faf344422ffsfad****

Force

string

是否强制解绑与 HaVip 绑定的 ECS 实例或弹性网卡实例,取值:

  • True:强制解绑。

  • False (默认值):不强制解绑。

说明

如果该参数取值为 False,无法解绑 HaVip 绑定的主实例。

True

InstanceType

string

要解绑 HaVip 的实例类型,取值:

  • EcsInstance:云服务器 ECS 实例。

  • NetworkInterface:弹性网卡实例。

说明

当要解绑的实例为弹性网卡时,该参数必须填写。

EcsInstance

返回参数

名称

类型

描述

示例值

object

RequestId

string

请求 ID。

C44F62BE-9CE7-4277-B117-69243F3988BF

示例

正常返回示例

JSON格式

{
  "RequestId": "C44F62BE-9CE7-4277-B117-69243F3988BF"
}

错误码

HTTP status code

错误码

错误信息

描述

400 IncorrectHaVipStatus HaVip can be operated by this action only when it's status is InUse.
400 IncorrectInstanceStatus ECS instance can be operated by this action only when it's status is Running or Stopped.
400 ResourceNotAssociated The HaVip and ECS instance are not associated.
400 Forbidden.UnassociateMaster Unassociating a master instance is not allowed unless the parameter Force is True.
400 HA.VIP.NOT.ASSOCIATED.WITH.INSTANCE ha vip not associated with instance.
400 OperationFailed.DistibuteLock Distibute lock fail. 操作被其他请求加锁;
400 OperationFailed.QueryNetworkInterfaceInfo Failed to query network interface information. 查询网卡信息失败。
400 IllegalParam.InstanceType The specified instance type is invalid. Only ECS instances and network interface are allowed. 绑定的实例类型不允许。
400 InvalidNetworkInterfaceId.NotFound The network interface is not found. 网卡不存在。
400 ResourceNotFound.Instance The specified binding resource is not found. 绑定资源不存在。
400 Forbidden.HaVip No permissions to perform operations on HAVIPs. Please apply for privilege--vpc_privilege_allow_buy_havip_instance. 操作HaVip没有权限,请到配额中心申请权限。
400 InvalidRegionId.NotFound The RegionId provided does not exist in our records.
500 InternalError The request processing has failed due to some unknown error.
404 InvalidHaVipId.NotFound The specified HaVip does not exist in the specified region. 指定的HaVip不在指定的地域中,请您检查选择的地域是否正确。
404 InvalidInstanceId.NotFound The specified Instance does not exist in the specified region.

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情