All Products
Search
Document Center

Virtual Private Cloud:ReleaseEipAddress

Last Updated:Nov 13, 2024

Releases an elastic IP address (EIP).

Operation description

Before you call this operation, take note of the following items:

  • Before you release an EIP, make sure that the EIP meets the following requirements:

    • You can release only an EIP that is in the Available state.
    • You can release only a pay-as-you-go EIP. You cannot release a subscription EIP.
  • ReleaseEipAddress 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 Releasing state, the EIP is being released. In this state, you can only query the EIP and cannot perform other operations.
    • If you cannot query the EIP, the EIP is released.
  • You cannot repeatedly call the ReleaseEipAddress operation to release an EIP within the specified period of time.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:ReleaseEipAddressupdate
  • Address
    acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}
  • vpc:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
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 release.

eip-2zeerraiwb7uj6i0d****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

748C38F6-9A3D-482E-83FB-DB6C39C68AEA

Examples

Sample success responses

JSONformat

{
  "RequestId": "748C38F6-9A3D-482E-83FB-DB6C39C68AEA"
}

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.
400Forbidden.ChargeTypeIsPrepaidIt's forbidden to release a prepaid EIPYou cannot release subscription EIPs.
400TaskConflict.AssociateGlobalAccelerationInstanceOperate too frequent.The number of requests that you send exceeds the upper limit.
400InvalidOperation.DeletionProtectionThe instance cannnot delete because of deletion protecion.-
400Forbidden.ReleaseSegmentEipRelease single segment eip is forbidden.-
400ForbiddenThe eip instance owner errorThe EIP does not belong to your account. Check whether you are authorized to perform the operation on the EIP.
400Mismatch.%sAnd%sThe %s and %s are mismatched.The parameter does not match. Check the parameter.
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.
404Forbidden.RegionNotFoundSpecified region is not found during access authentication.The specified region does not exist. Check whether the specified region ID is valid.
500InternalErrorThe request processing has failed due to some unknown error.An unknown error occurred.

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