All Products
Search
Document Center

ENS:CreateDisk

Last Updated:Apr 16, 2024

Creates a pay-as-you-go or subscription data disk.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceChargeTypestringYes

The billing method of the instance. Set the value to PostPaid.

PostPaid
EnsRegionIdstringYes

The ID of the edge node.

cn-chengdu-telecom
CategorystringYes

The category of the disk. Valid values:

  • cloud_efficiency: ultra disk.
  • cloud_ssd: all-flash disk.
cloud_efficiency
SizestringNo

The size of the disk. Unit: GiB.

20
SnapshotIdstringNo

The ID of the snapshot that you want to use to create the disk.

The following limits apply to the SnapshotId and Size parameters:

  • If the size of the snapshot specified by SnapshotId is greater than the specified Size value, the size of the created disk is equal to the specified snapshot size.
  • If the size of the snapshot specified by SnapshotId is smaller than the specified Size value, the size of the created disk is equal to the specified Size value.
s-897654321****
EncryptedbooleanNo

Specifies whether to encrypt the new system disk. Valid values:

  • true
  • false (default): no
false
KMSKeyIdstringNo

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
DiskNamestringNo

The name of the disk.

yourDiskName

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

7030AB96-57CF-1C68-9FEE-D60E547FD79C
OrderIdstring

The ID of the order. Multiple IDs are separated by commas (,).

Note This parameter is not returned for the pay-as-you-go billing method.
21127020370****
InstanceIdsarray

The IDs of the instances.

string

The ID of an instance.

d-5rpvziragkacvop665m3h****

Examples

Sample success responses

JSONformat

{
  "RequestId": "7030AB96-57CF-1C68-9FEE-D60E547FD79C",
  "OrderId": "21127020370****",
  "InstanceIds": [
    "d-5rpvziragkacvop665m3h****"
  ]
}

Error codes

HTTP status codeError codeError message
400Invalid%sThe specified parameter %s is invalid.
400Missing%sYou must specify the parameter %s.
400NoPermissionPermission denied.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-21The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DiskName
2021-10-28Add Operationsee changesets