ResizeDisk
1. API Description
This API is used to resize a disk to a specified size.
2. Input Parameters
The following request parameter list only provides API request parameters.
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
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.
404
INVALID_DISK_NOT_FOUND
Disk does not exist.
404
INVALID_DISK_SIZE_EXCEED_MAXIMUM
Disk size exceeds the upper limit.
400
INVALID_ILLEGAL_DISK_SIZE
The value must be large than the old one.
400
UNSUPPORTED_OPERATION_DISK_RESIZE
Operation is not supported for the disk.
400
UNSUPPORTED_OPERATION_DISK_STATUS
Operation is not supported for the disk in current status.
403
OPERATION_DENIED_INSTANCE_STATUS_NOT_SUPPORT
Operation is not supported in the current instance state.
Last updated