All Products
Search
Document Center

Elastic IP Address:UnassociateEipAddress

最終更新日:Aug 30, 2024

Disassociates an elastic IP address (EIP) from a cloud resource.

Operation description

  • UnassociateEipAddress is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeEipAddresses operation to query the status of the task.

    • If the EIP is in the Unassociating state, the EIP is being disassociated. In this state, you can only query the EIP and cannot perform other operations.
    • If the EIP is in the Available state, the EIP is disassociated.
  • You cannot repeatedly call the UnassociateEipAddress operation within the specified period of time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:UnassociateEipAddressdelete
  • Instance
    acs:ecs:{#regionId}:{#accountId}:instance/{#InstanceId}
  • Address
    acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}
  • HaVip
    acs:vpc:{#regionId}:{#accountId}:havip/{#HaVipId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ForcebooleanNo

Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:

  • false (default)
  • true
false
RegionIdstringNo

The ID of the region to which the EIP belongs. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
AllocationIdstringYes

The ID of the EIP that you want to disassociate.

eip-2zeerraiwb7uj6i0d****
InstanceIdstringNo

The ID of the instance from which you want to disassociate the EIP.

i-hp3akk9irtd69jad****
InstanceTypestringNo

The type of instance from which you want to disassociate the EIP. Valid values:

  • EcsInstance (default): an Elastic Compute Service (ECS) instance in a virtual private cloud (VPC)
  • SlbInstance: a Server Load Balancer (SLB) instance in a VPC
  • NetworkInterface: a secondary elastic network interface (ENI) in a VPC
  • Nat: a NAT gateway
  • HaVip: a high-availability virtual IP address (HAVIP)
EcsInstance
PrivateIpAddressstringNo

The private IP address of the ECS instance or the secondary ENI from which you want to disassociate the EIP.

192.XX.XX.2
ClientTokenstringNo

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 request ID as the client token. The request ID may be different for each request.
02fb3da4-130e-11****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

0ED8D006-F706-4D23-88ED-E11ED28DCAC0

Examples

Sample success responses

JSONformat

{
  "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectEipStatusCurrent elastic IP status does not support this operation.You cannot perform the operation when the specified EIP is in the current state.
400InvalidInstanceId.NotFoundSpecified instance does not exist.The instance does not exist. Check the instance ID.
400IncorrectInstanceStatusThe current status of instance does not support this operation.This operation cannot be performed while the instance is in the current state.
400InvalidInstanceType.ValueNotSupportedThe specified value of InstanceType is not supported.InstanceType is set to an invalid value.
400IncorrectHaVipStatusThis 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.
400OperationDeniedEip of default vpc not allow this operationThe operation is not supported by EIPs in a default VPC.
400InvalidParameterThe specified parameter is not valid.The parameter is set to an invalid value.
400TaskConflictThe eip operate too frequent, TaskConflict.Operations are too frequent and tasks conflict with each other.
400InvalidBindingStatusThe eip binding status invalid.The EIP is in an invalid state.
400Forbidden.FinancialLockedThe ip business status is invalid.The error message returned because the instance has overdue payments.
400InvalidIpStatus.HasBeenUsedBySnatTableThe removed ip address has been used by snat table.-
400InvalidIpStatus.HasBeenUsedByForwardEntryThe specified address has been used by forwardTable.-
400Eni.AttachedThe 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.
400InvalidEIPStatus.BizDisabledThe EIP has been locked.The error message returned because the EIP is locked.
400InvalidStatus.EcsStatusNotSupportThe special instance status Pending is not support operateThe operation is not supported because the instance is suspended.
400InvalidStatus.EniStatusNotSupport%s-
400InvalidStatus.SnatOrDnatOperation 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.
400DependencyViolation.SnatEntryThe specified eip is in ip pool.-
400%s%s-
400InvalidStatus.NotAllowBind instance status invalidThe status of the associated instance is invalid.
400DependencyViolation.SnatEntryThe specified resource of Snat depends on Eip, so the operation cannot be completed.-
400ForbiddenThe eip instance owener errorThe EIP does not belong to your account. Check whether you have the permissions to perform the operation on the EIP.
400InvalidLoadBalancerId.NotFoundLoadBalancerId does not exist.The ID of the SLB instance does not exist.
400OperationFailed.SystemBusyOperation failed because system is busy.The error message returned because the system is busy. Try again later.
404InvalidAllocationId.NotFoundSpecified allocation ID is not foundThe specified EIP does not exist. Check whether the specified value is valid.
404InvalidAllocationId.NotFoundSpecified allocation ID is not found.The error message returned because the specified EIP does not exist. Check whether the value of the parameter is valid.
404InvalidBindInstance.NotFoundThe specified bind instance does not exist.-
404Forbidden.RegionNotFoundSpecified region is not found during access authentication.The specified region does not exist. Check whether the specified region ID is valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-31API Description Update. The Error code has changedView Change Details
2023-06-26The Error code has changedView Change Details