調用UnassociateHaVip 介面將HaVip與專用網路ECS執行個體或彈性網卡解除綁定。
介面說明
在調用本介面將 HaVip 與專用網路 ECS 執行個體或彈性網卡解除綁定時,請注意:
要解除綁定的 ECS 執行個體的狀態必須為運行中或停止。
要解除綁定的 HaVip 狀態必須為 Available 或 InUse。
- UnassociateHaVip 介面屬於非同步介面,即系統會返回一個請求 ID,但該 HaVip 尚未解除綁定成功,系統背景解除綁定任務仍在進行。您可以調用 DescribeHaVips 查詢 HaVip 的解除綁定狀態:
當 HaVip 處於 Unassociating 狀態時,表示 HaVip 正在解除綁定中。
當 HaVip 處於 Inuse 或者 Available 狀態時,表示 HaVip 解除綁定成功。
UnassociateHaVip 介面不支援並發解除綁定同一個 HaVip。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ClientToken |
string |
否 |
保證請求等冪性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。 |
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 執行個體或彈性網卡執行個體,取值:
說明
如果該參數取值為 False,無法解除綁定 HaVip 綁定的主執行個體。 |
True |
| InstanceType |
string |
否 |
要解除綁定 HaVip 的執行個體類型,取值:
說明
當要解除綁定的執行個體為彈性網卡時,該參數必須填寫。 |
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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。