調用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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。