For the complete documentation index, see llms.txt. This page is also available as Markdown.

ResizeDisk

1. API Description

This API (ResizeDisk) is used to resize a disk to a specified size.

Note

  • Only disk expansion is supported currently.

  • This API is an async API. You can use DescribeDisks to query the status of the disk. If disk has been queried with the CHANGING status, it means that the disk is being expanding.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

diskId

Yes

String

Disk ID.

diskSize

Yes

Integer

Disk size after expansion.

Unit: GB.

The value must be larger than the current one, and the upper limit is 2000 GB.

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

Resize the disk to 100 GB.

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

Request:
{
  "diskId": "your-disk-id",
  "diskSize": 100
}

Response:
{
  "requestId": "TE742A21A-C449-41AF-8853-1B62A93AA4E5",
  "response": {
    "requestId": "TE742A21A-C449-41AF-8853-1B62A93AA4E5"
  }
}

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

Last updated