Disassociates a high-availability virtual IP address (HAVIP) from an ECS instance or elastic network interface (ENI).
Operation description
When you call this operation:
-
The ECS instance must be in the Running or Stopped state.
-
The HAVIP must be in the Available or InUse state.
- UnassociateHaVip is an asynchronous operation. The system returns a request ID, but the disassociation may still be in progress. Call DescribeHaVips to query the HAVIP status:
-
Unassociating: The HAVIP is being disassociated.
-
Inuse or Available: The disassociation is complete.
-
-
You cannot concurrently disassociate the same HAVIP.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that ensures idempotence. Must be unique, ASCII-only, and up to 64 characters. |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
| RegionId |
string |
Yes |
The region ID of the HAVIP. Call DescribeRegions to query regions. |
cn-shanghai |
| HaVipId |
string |
Yes |
The HAVIP ID. |
havip-2zeo05qre24nhrqpy**** |
| InstanceId |
string |
Yes |
The ECS instance or ENI ID to disassociate from the HAVIP. |
i-faf344422ffsfad**** |
| Force |
string |
No |
Whether to force disassociation. Valid values:
Note
If set to False, you cannot disassociate the HAVIP from the primary instance. |
True |
| InstanceType |
string |
No |
The instance type to disassociate. Valid values:
Note
Required when disassociating from an ENI. |
EcsInstance |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
C44F62BE-9CE7-4277-B117-69243F3988BF |
Examples
Success response
JSON format
{
"RequestId": "C44F62BE-9CE7-4277-B117-69243F3988BF"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. | The operation is locked by another request; |
| 400 | OperationFailed.QueryNetworkInterfaceInfo | Failed to query network interface information. | The system failed to query ENI information. |
| 400 | IllegalParam.InstanceType | The specified instance type is invalid. Only ECS instances and network interface are allowed. | The type of the associated instance does not support this operation. |
| 400 | InvalidNetworkInterfaceId.NotFound | The network interface is not found. | The ENI does not exist. |
| 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. | The error message returned because you do not have the permissions to manage the HAVIP. Go to Quota Center to acquire the permissions. |
| 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. | The specified HAVIP does not exist in the specified region. Verify the region ID. |
| 404 | InvalidInstanceId.NotFound | The specified Instance does not exist in the specified region. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.