Creates a pay-as-you-go or subscription data disk.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceChargeType | string | Yes | The billing method of the instance. Set the value to PostPaid. | PostPaid |
EnsRegionId | string | Yes | The ID of the edge node. | cn-chengdu-telecom |
Category | string | Yes | The category of the disk. Valid values:
| cloud_efficiency |
Size | string | No | The size of the disk. Unit: GiB. | 20 |
SnapshotId | string | No | The ID of the snapshot that you want to use to create the disk. The following limits apply to the SnapshotId and Size parameters:
| s-897654321**** |
Encrypted | boolean | No | Specifies whether to encrypt the new system disk. Valid values:
| false |
KMSKeyId | string | No | The ID of the Key Management Service (KMS) key that is used by the cloud disk. Note
If you set the Encrypted parameter to true, the default service key is used when the KMSKeyId parameter is empty.
| 0e478b7a-4262-4802-b8cb-00d3fxxxxx |
DiskName | string | No | The name of the disk. | yourDiskName |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "7030AB96-57CF-1C68-9FEE-D60E547FD79C",
"OrderId": "21127020370****",
"InstanceIds": [
"d-5rpvziragkacvop665m3h****"
]
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | Invalid%s | The specified parameter %s is invalid. |
400 | Missing%s | You must specify the parameter %s. |
400 | NoPermission | Permission denied. |
400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-11-21 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||
| ||||||||||
2021-10-28 | Add Operation | see changesets |