All Products
Search
Document Center

ENS:CreateDisk

Last Updated:Jul 26, 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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:CreateDiskcreate
  • All Resources
    *
    none
none

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 messageDescription
400Invalid%sThe specified parameter %s is invalid.-
400Missing%sYou must specify the parameter %s.-
400Stock.NotEnoughThe inventory of the specified zone is insufficient.Please contact the product.Insufficient resource inventory in the specified zone.
400ens.interface.errorFailed to call API.-
400ens.buy.store.emptyInsufficient inventory of purchased resources.Insufficient inventory of purchased resources.
400SaleControlVerificationFailedDiskSpecCloud disk capacity sales constraint verification failed, please re-match, or contact the product.Cloud disk capacity sales constraint verification failed, please re-match, or contact the product
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
2024-07-19The Error code has changedView Change Details
2024-06-28The Error code has changedView Change Details
2023-11-21The Error code has changed. The request parameters of the API has changedView Change Details
2021-10-28Add OperationView Change Details