TerminateDisk

1. API Description

This API is used to return a disk.

Note

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

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

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

  • Only operations on data disks are supported.

2. Input Parameters

The following request parameter list only provides API request parameters.

3. Output Parameters

4. Code Example

Return a disk.

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

Request:
{
  "diskId": "your-disk-id"
}

Response:
{
  "requestId": "TE2A08EDA-C514-4F82-8D9A-C5BA0A7B1BF3",
  "response": {
    "requestId": "TE2A08EDA-C514-4F82-8D9A-C5BA0A7B1BF3"
  }
}

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.​

Last updated