TerminateEipAddress

1. API Description

This API is used to return an elastic IP.

Note

  • Use this API to return an elastic IP that is no longer required. A pay-as-you-go elastic IP will stop billing after it is returns.

  • You cannot return a subscription elastic IP using this API, which will be returned when subscription expires.

  • When this API is called, the elastic IP will be moved to the recycle bin and be released in 24 hours if there are no other operations. You can also call ReleaseEipAddresses to release the elastic IP.

  • Only operations on an elastic IP in status of AVAILABLE, ASSOCIATED, or CREATE_FAILED are supported.

  • Operations on an elastic IP with CREATE_FAILED status will refund all payment amounts.

  • Operations on an elastic IP with ASSOCIATED status will unassign the elastic IP from the instance.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

eipId

Yes

String

ID of an elastic IP.

To obtain the elastic IP ID, you can call DescribeEipAddresses and look for eipId in the response.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Code Example

Return a specified elastic IP

POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: TerminateEipAddress
<Common Request Params>

Request:
{
    "eipId": "eipId"
}

Response:
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

HTTP Status Code
Error Code
Description

404

INVALID_EIP_NOT_FOUND

Elastic IP does not exist.

403

OPERATION_DENIED_EIP_SUBSCRIPTION

Operations on a subscription elastic IP are not supported.

403

OPERATION_DENIED_EIP_RECYCLED

Operations on an elastic IP in recycle bin are not supported.

Last updated