Disassociates an elastic IP address (EIP) from the cloud resource to which it is bound.
Operation description
- The UnassociateEipAddress operation is asynchronous. After you send a request, the system returns a request ID, but the EIP is not yet disassociated. The disassociation task continues to run in the background. You can call DescribeEipAddresses to query the status of the EIP:
If the EIP is in the Unassociating state, the EIP is being disassociated. In this state, you can only perform query operations.
If the EIP is in the Available state, the EIP is disassociated.
The UnassociateEipAddress operation does not support concurrent disassociation requests for the same EIP.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:UnassociateEipAddress |
delete |
Instance
*Address
HaVip
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Force |
boolean |
No |
Specifies whether to forcefully disassociate the EIP when the EIP is associated with a NAT gateway that has DNAT or SNAT entries configured. Valid values:
|
false |
| RegionId |
string |
No |
The region ID of the EIP to disassociate. You can call DescribeRegions to query region IDs. |
cn-hangzhou |
| AllocationId |
string |
Yes |
The ID of the EIP to disassociate. |
eip-2zeerraiwb7uj6i0d**** |
| InstanceId |
string |
No |
The instance ID of the cloud resource from which to disassociate the EIP. You can enter the instance ID of a NAT gateway, Classic Load Balancer (CLB) instance, ECS instance, secondary elastic network interface controller (NIC), high availability virtual IP address instance, or an IP address. |
i-hp3akk9irtd69jad**** |
| InstanceType |
string |
No |
The type of the cloud resource from which to disassociate the EIP. Valid values:
|
EcsInstance |
| PrivateIpAddress |
string |
No |
The private IP address of the ECS instance or secondary elastic network interface controller (NIC) instance from which to disassociate the EIP. |
192.XX.XX.2 |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId as the ClientToken. The RequestId may be different for each API request. |
02fb3da4-130e-11**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Examples
Success response
JSON format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectEipStatus | Current elastic IP status does not support this operation. | |
| 400 | InvalidInstanceId.NotFound | Specified instance does not exist. | |
| 400 | IncorrectInstanceStatus | The current status of instance does not support this operation. | |
| 400 | InvalidInstanceType.ValueNotSupported | The specified value of InstanceType is not supported. | |
| 400 | IncorrectHaVipStatus | This operation is denied because satus of the specified HaVip is neither Available nor InUse. | You cannot perform the operation when the specified HAVIP is in the Available or InUse state. |
| 400 | OperationDenied | Eip of default vpc not allow this operation | |
| 400 | InvalidParameter | The specified parameter is not valid. | |
| 400 | TaskConflict | The eip operate too frequent, TaskConflict. | Operations are too frequent and tasks conflict with each other. |
| 400 | InvalidBindingStatus | The eip binding status invalid. | |
| 400 | Forbidden.FinancialLocked | The ip business status is invalid. | The error message returned because the instance has overdue payments. |
| 400 | InvalidIpStatus.HasBeenUsedBySnatTable | The removed ip address has been used by snat table. | |
| 400 | InvalidIpStatus.HasBeenUsedByForwardEntry | The specified address has been used by forwardTable. | |
| 400 | Eni.Attached | The eni should be detached from ecs when associating with direct eip. | If the ENI is associated with an EIP in cut-through mode, you must disassociate the ENI from the ECS instance. |
| 400 | InvalidEIPStatus.BizDisabled | The EIP has been locked. | The error message returned because the EIP is locked. |
| 400 | InvalidStatus.EcsStatusNotSupport | The special instance status Pending is not support operate | The operation is not supported because the instance is suspended. |
| 400 | InvalidStatus.EniStatusNotSupport | %s | |
| 400 | InvalidStatus.SnatOrDnat | Operation failed because snat or dnat in unstable status. | The EIP failed to be disassociated because the SNAT or DNAT entry is in an unstable state. |
| 400 | DependencyViolation.SnatEntry | The specified eip is in ip pool. | |
| 400 | %s | %s | |
| 400 | InvalidStatus.NotAllow | Bind instance status invalid | The status of the associated instance is invalid. |
| 400 | Forbidden | The eip instance owener error | The EIP does not belong to your account. Check whether you have the permissions to perform the operation on the EIP. |
| 400 | InvalidLoadBalancerId.NotFound | LoadBalancerId does not exist. | The ID of the SLB instance does not exist. |
| 400 | OperationFailed.SystemBusy | Operation failed because system is busy. | The error message returned because the system is busy. Try again later. |
| 404 | InvalidAllocationId.NotFound | Specified allocation ID is not found | The specified EIP does not exist. Check whether the specified value is valid. |
| 404 | InvalidBindInstance.NotFound | The specified bind instance does not exist. | |
| 404 | Forbidden.RegionNotFound | Specified region is not found during access authentication. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.