Creates a pay-as-you-go or subscription data disk.
Operation description
- When you create a disk, you can enable the multi-attach (
MultiAttach
) feature for the disk. Before you enable the multi-attach feature, we recommend that you familiarize yourself with the multi-attach feature and its limits. For more information, see NVMe protocol and Use the multi-attach feature. - You can create a basic disk, an ultra disk, a standard SSD, or an enhanced SSD (ESSD).
- When you create disks, you may be charged for the resources used. We recommend that you familiarize yourself with the Elastic Compute Service (ECS) billing methods before you proceed. For more information, see Billing overview.
- By default,
DeleteAutoSnapshot
is set totrue
when a disk is created. This indicates that when the disk is released, the automatic snapshots of the disk are also deleted. You can call the ModifyDiskAttribute operation to modify the parameter value. - If you do not configure the performance level when you create an ESSD, the performance level for the ESSD is PL1 by default. You can call the ModifyDiskSpec operation to modify the performance level of the ESSD.
- By default, for a disk that is created by calling this operation, the
Portable
attribute is set totrue
and the billing method is pay-as-you-go.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region in which to create the disk. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ZoneId | string | No | The ID of the zone in which to create the pay-as-you-go disk.
| cn-hangzhou-g |
SnapshotId | string | No | The ID of the snapshot used to create the disk. Snapshots that were created on or before July 15, 2013 cannot be used to create disks. The following limits apply to
| s-bp67acfmxazb4p**** |
DiskName | string | No | The name of the disk. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with This parameter is empty by default. | testDiskName |
Size | integer | No | The size of the disk. Unit: GiB. This parameter is required. Valid values:
If
| 2000 |
DiskCategory | string | No | The category of the disk. Valid values:
Default value: cloud. | cloud_ssd |
Description | string | No | The description of the disk. The description must be 2 to 256 characters in length and cannot start with This parameter is empty by default. | testDescription |
Encrypted | boolean | No | Specifies whether to encrypt the disk. Valid values:
Default value: false. | false |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. | 123e4567-e89b-12d3-a456-426655440000 |
InstanceId | string | No | The ID of the instance to which the created subscription disk is automatically attached.
This parameter is empty by default. This indicates that a pay-as-you-go disk is created. RegionId and ZoneId specify where the disk resides. | i-bp18pnlg1ds9rky4**** |
ResourceGroupId | string | No | The ID of the resource group to which to assign the disk. | rg-bp67acfmxazb4p**** |
KMSKeyId | string | No | The ID of the Key Management Service (KMS) key that you want to use for the disk. | 0e478b7a-4262-4802-b8cb-00d3fb40826X |
PerformanceLevel | string | No | The performance level of the ESSD. Valid values:
Default value: PL1. For more information about ESSD performance levels, see ESSDs . | PL1 |
AdvancedFeatures | string | No | This parameter is not publicly available. | hide |
StorageSetId | string | No | The ID of the storage set. Note
You cannot specify storage set-related parameters ( StorageSetId and StorageSetPartitionNumber ) and the dedicated block storage cluster-related parameter (StorageClusterId ) at the same time. Otherwise, the operation cannot be called.
| ss-bp67acfmxazb4p**** |
EncryptAlgorithm | string | No | This parameter is not publicly available. | hide |
StorageSetPartitionNumber | integer | No | The number of partitions in the storage set. The value must be greater than or equal to 2 but cannot exceed the quota obtained by calling the DescribeAccountAttributes operation. Default value: 2. | 3 |
StorageClusterId | string | No | The ID of the dedicated block storage cluster. To create a disk in a specific dedicated block storage cluster, specify this parameter. Note
You cannot specify storage set-related parameters ( StorageSetId and StorageSetPartitionNumber ) and the dedicated block storage cluster-related parameter (StorageClusterId ) at the same time. Otherwise, the operation cannot be called.
| dbsc-j5e1sf2vaf5he8m2**** |
MultiAttach | string | No | Specifies whether to enable the multi-attach feature for the disk. Valid values:
Default value: Disabled. Note
Disks for which the multi-attach feature is enabled support only the pay-as-you-go billing method. When MultiAttach is set to Enabled, you cannot specify InstanceId . You can call the AttachDisk operation to attach disks to instances after the disks are created. Disks for which the multi-attach feature is enabled can be attached only as data disks.
| Disabled |
Tag | object [] | No | The tags to add to the disk. | |
key | string | No | The key of tag N to add to the disk. Note
We recommend that you use Tag.N.Key to ensure future compatibility.
| Test |
Key | string | No | The key of tag N to add to the disk. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain | TestKey |
Value | string | No | The value of tag N to add to the disk. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with | TestValue |
value | string | No | The value of tag N to add to the disk. Note
We recommend that you use Tag.N.Value to ensure future compatibility.
| Test |
Arn | object [] | No | This parameter is not publicly available. | |
RoleType | string | No | This parameter is not publicly available. | hide |
Rolearn | string | No | This parameter is not publicly available. | hide |
AssumeRoleFor | long | No | This parameter is not publicly available. | 1000000000 |
ProvisionedIops | long | No | This parameter is not publicly available. | 40000 |
BurstingEnabled | boolean | No | This parameter is not publicly available. | false |
Response parameters
Examples
Sample success responses
JSON
format
{
"DiskId": "d-bp131n0q38u3a4zi****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"OrderId": "20413515388****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidSize.ValueNotSupported | The specified parameter Size is not valid. | The specified Size parameter is invalid. |
400 | InvalidDiskName.Malformed | The specified disk name is wrongly formed. | The disk name is invalid. The name must be 2 to 128 characters in length and start with a letter. It can contain letters, digits, periods (.), underscores (_), and hyphens (-) and cannot start with http:// or https. |
400 | InvalidDescription.Malformed | The specified description is wrongly formed. | The resource description is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://. |
400 | MissingParameter | The input parameter either "SnapshotId" or "Size" should be specified. | - |
400 | InvalidDiskCategory.NotSupported | The specified disk category is not support. | The specified disk category is not supported. |
400 | Account.Arrearage | Your account has an outstanding payment. | Your account has overdue payments. |
400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | - |
400 | InvalidDataDiskCategory.ValueNotSupported | %s | - |
400 | InvalidParameter.Conflict | %s | The specified parameter is invalid. Check whether parameter conflicts exist. %s is a variable. An error message is dynamically returned based on call conditions. |
400 | RegionUnauthorized | %s | - |
400 | Zone.NotOnSale | %s | The requested resources are unavailable in the specified zone. %s is a variable. An error message is dynamically returned based on call conditions. |
400 | InvalidDataDiskSize.ValueNotSupported | %s | - |
400 | OperationDenied | The specified Zone is not available or not authorized. | The specified zone is unavailable or you are not authorized to access it. |
400 | InvalidDiskSize.NotSupported | The specified parameter size is not valid. | - |
400 | InvalidDiskSizeOrCategory | The specified disk category or size is invalid. | The specified disk category or size is invalid. |
400 | InvalidParameter.EncryptedIllegal | %s | The specified parameter is invalid. Check whether your encryption operation is supported. %s is a variable. An error message is dynamically returned based on call conditions. |
400 | InvalidParameter.EncryptedNotSupported | %s | The specified parameter is invalid and your encryption operation is not supported. %s is a variable. An error message is dynamically returned based on call conditions. |
400 | EncryptedOption.Conflict | %s | The specified parameter is invalid and your encryption operation is not supported. %s is a variable. An error message is dynamically returned based on call conditions. |
400 | InvalidParameter.Encrypted.KmsNotEnabled | The encrypted disk need enable KMS. | - |
400 | InvalidParameter.EncryptedIllegal | The specified parameter Encrypted must be true when kmsKeyId is not empty. | The encryption feature is not enabled after a Key Management Service (KMS) key ID is specified. |
400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | The specified tag key already exists. Tag keys must be unique. |
400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | The specified Tag.N.Key parameter is invalid. |
400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | The specified tag value is invalid. |
400 | InvalidParameter.Arns | The specified Arns is not valid. | - |
400 | MissingParameter | The input parameter ZoneId that is mandatory for processing this request is not supplied. | - |
400 | InvalidPerformanceLevel.Malformed | The specified parameter PerformanceLevel is not valid. | The specified PerformanceLevel parameter is invalid. |
400 | InvalidDiskCategory.ConflictSnapshotCategory | The specified disk category conflict with snapshot category. | - |
400 | InvalidEncrypted.NotMatchEncryptAlgorithm | The specified parameter Encrypted must be true when EncryptAlgorithm is not empty. | - |
400 | InvalidEncrypted.NotMatchKmsKeyId | The specified parameter Encrypted must be true when KmsKeyId is not empty. | - |
400 | InvalidEncrypted.NotMatchSnapshot | The specified parameter Encrypted is different from the Encrypted of the snapshot. | - |
400 | InvalidEncryptAlgorithm.NotMatchSnapshot | The specified parameter EncryptAlgorithm is different from the encrypt algorithm of the snapshot. | - |
400 | InvalidKmsKeyId.NotMatchSnapshot | The specified parameter KmsKeyId is different from the KmsKeyId of the snapshot. | - |
400 | InvalidEncryptAlgorithm | The specified parameter EncryptAlgorithm is not valid. | - |
400 | InvalidPerformanceLevel.ValueNotSupported | The current ZoneId does not support PL0 of cloud_essd. | - |
400 | InvalidKMSKeyId.NotSymmetric | The specified parameter KmsKeyId must be symmetric. | - |
400 | InvalidStorageSetId.NotFound | The specified storage set does not exist. | - |
400 | InvalidStorageClusterId.StatusNotSupport | The current status of the dedicated storage cluster cannot create a cloud disk yet. | - |
400 | InvalidStorageClusterId.ConflictWithStorageSetId | The specified StorageClusterId is in conflict with storageSetId. | - |
400 | InvalidStorageClusterId.ConflictWithInstanceId | The specified StorageClusterId is in conflict with instanceId. | - |
400 | InvalidStorageClusterId.CategoryNotMatch | The current dedicated storage cluster cannot create this category of disk. | - |
400 | InvalidStorageClusterId.PerformanceLevelNotMatch | The current dedicated storage cluster cannot create this performance level of disk. | - |
400 | InvalidStorageClusterId.CapacityNotEnough | The remaining capacity of the current dedicated storage cluster is less than the size of disk. | The remaining capacity of the dedicated block storage cluster to which the disk belongs is insufficient. |
400 | InvalidCloudBoxZone.EncryptedNotSupported | The cloud box zone does not support creating encrypted disks. | - |
400 | InvalidInstance.NotFoundSystemDisk | The specified instance has no system disk. | The specified instance does not have a system disk. Make sure that the instance has a system disk. You can call the DescribeInstances operation to query the details of the instance. |
400 | ProvisionedIopsForDiskCategoryUnsupported | The specified disk category does not support provisioned iops. | - |
400 | InvalidProvisionedIops.LimitExceed | The provisioned iops exceeds the limit. | - |
400 | BurstingEnabledForDiskCategoryUnsupported | The specified disk category does not support bursting enabled. | - |
400 | BurstingEnabledForMultiAttachDiskUnsupported | The multi attach disk does not support bursting enabled. | - |
400 | ProvisionedIopsForDiskCategoryRequired | The provisioned iops is required for this disk category. | - |
400 | NotSupportSnapshotEncrypted.RegionId | The specified region does not support creating encrypted disks with native snapshot encrypt. | - |
400 | NotSupportSnapshotEncrypted.ZoneId | The specified zone does not support creating encrypted disks with native snapshot encrypt. | - |
400 | NotSupportSnapshotEncrypted.ShareImage | Shared snapshot creating encrypted disks with native snapshot encrypt is not supported. | When you create encrypted disks based on a shared image, only the encryption key provided by the shared image can be used for these disks and you cannot specify encryption keys for the disks. |
400 | NotSupport.SnapshotEncryptedAlgorithmConflict | Changing encrypt algorithm with encrypted snapshot is not supported. | - |
400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | The capacity of disks that belong to the specified disk category exceeds the quota limit for the zone. |
400 | InsufficientBalance.AgentAccount | The account balance is insufficient. Please contact your channel partner to recharge in time. | The account balance is insufficient. Contact your customer service representative to add funds to the account in a timely manner. |
400 | InvalidParam.EncryptedMismatch | Creating encrypted disks with shared encrypted snapshots requires replacing encryption keys. | - |
400 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance, please contact your partner to increase your account balance. | - |
403 | InvalidDataDiskCategory.NotSupported | Specified disk category is not supported. | The specified disk category is not supported. |
403 | InstanceDiskCategoryLimitExceed | The total size of specified disk category in an instance exceeds. | The total size of disks of the specified category exceeds the maximum capacity allowed for an instance. |
403 | InvalidSnapshot.NotReady | The specified snapshot creation is not completed yet. | The specified snapshot is not created. |
403 | InvalidSnapshot.TooOld | This operation is forbidden because the specified snapshot is created before 2013-07-15. | The disk cannot be re-initialized because the snapshot used to create the disk was created before July 15, 2013. |
403 | InvalidSnapshot.TooLarge | The capacity of snapshot exceeds 2000GB. | The snapshot size exceeds 2,000 GB. |
403 | OperationDenied | The specified snapshot is not allowed to create disk. | The specified snapshot cannot be used to create disks. |
403 | QuotaExceed.PortableCloudDisk | The quota of portable cloud disk exceeds. | The maximum number of removable disks has been reached. |
403 | InvalidDiskCategory.ValueUnauthorized | The disk category is not authorized. | You need permission to operate this disk category. |
403 | InvalidSnapshotId.NotReady | The specified snapshot has not completed yet. | The specified snapshot is being created. |
403 | InvalidSnapshotId.NotDataDiskSnapshot | The specified snapshot is system disk snapshot. | The specified snapshot is a system disk snapshot. |
403 | InvalidDiskSize.TooSmall | Specified disk size is less than the size of snapshot. | The specified disk size is smaller than the snapshot size. |
403 | OperationDenied | The type of the disk does not support the operation. | The disk category does not support the specified operation. |
403 | InvalidDataDiskCategory.NotSupported | %s | - |
403 | InvalidDiskSize.NotSupported | Disk size is not supported. | The disk size is invalid. |
403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | Your account balance is insufficient. Add funds to your account and try again. |
403 | InvalidAccountStatus.SnapshotServiceUnavailable | Snapshot service has not been opened yet. | The operation is not supported while the snapshot service is not activated. |
403 | InvalidPayMethod | The specified pay method is not valid. | The specified payment method is invalid. |
403 | InvalidDiskCategory.NotSupported | The specified disk category is not supported. | The specified disk category does not support this operation. |
403 | InvalidDiskSize.NotSupported | The specified disk size is not supported. | - |
403 | UserNotInTheWhiteList | The user is not in disk white list. | You are not authorized to manage the disk. Try again when you are authorized. |
403 | QuotaExceed.PostPaidDisk | Living postPaid disks quota exceeded. | - |
403 | InvalidRegion.NotSupport | The specified region does not support byok. | The bring your own key (BYOK) feature is not supported in the region. |
403 | UserNotInTheWhiteList | The user is not in byok white list. | You are not authorized to use the bring your own key (BYOK) feature. Try again when you are authorized. |
403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | The customer master key (CMK) is not enabled when KMSKeyId is specified for an encrypted disk. You can call the DescribeKey operation of KMS to query information about the specified CMK. |
403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK needs to be added ECS tag. | - |
403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | ECS is not authorized to access your KMS resources. |
403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | - |
403 | InvalidParameter.AdvancedFeatures | The specified parameter AdvancedFeatures is not valid. | - |
403 | UserNotInTheWhiteList | The user is not in Arns white list. | - |
403 | InvalidInstanceChargeType.ValueNotSupported | The InstanceChargeType does not support this action. | - |
403 | InvalidStatus.Upgrading | The instance is upgrading; please try again later. | The instance is being upgraded. Try again later. |
403 | InvalidParam.ZoneIdAndInstanceId.Conflict | The specified parameter 'ZoneId' and 'InstanceId' are not blank at the same time. | - |
403 | OperationDenied.PerformanceLevelNotMatch | The specified PerformanceLevel and Size do not match. | - |
403 | InvalidStorageSetName.Malformed | Specified parameter StorageSetName is not valid. | - |
403 | InvalidDescription.Malformed | Specified parameter Description is not valid. | - |
403 | InvalidMaxPartitionNumber.Malformed | Specified parameter MaxPartitionNumber is not valid. | - |
403 | InvalidParameter.StorageSetPartitionNumber | Specified parameter StorageSetPartitionNumber is not valid. | - |
403 | InvalidParameter.StorageSetId | Specified parameter StorageSetId is not valid. | - |
403 | InvalidParameter.StorageSetZoneId | Specified parameter StorageSetZoneId is not valid. | - |
403 | QuotaExceed.Tags | %s | The number of specified tags exceeds the upper limit. %s is a variable. An error message is dynamically returned based on call conditions. |
403 | QuotaExceeded.PostpaidDataDiskCapacity | The quota of postpaid data disk capacity exceeds. | The used capacity of the pay-as-you-go disk reaches the quota limit. |
403 | InvalidRegionId.NotSupportEncryptAlgorithm | The current region does not support creating encrypted disks with EncryptAlgorithm. | - |
403 | InvalidDiskSize.TooSmall | Specified disk size is too small when choosing PL0 of cloud_essd. | - |
403 | OperationDenied.SnapshotNotAllowed | The specified snapshot is not allowed to create disk. | The specified snapshot cannot be used to create disks. |
403 | LastTokenProcessing | The last token request is processing. | A token request is being processed. Try again later. |
403 | InvalidParameter.MultiAttach | The specified param MultiAttach is not valid. | The specified MultiAttach parameter is invalid. |
403 | InvalidParameter.MultiAttachAndInstanceIdConflict | The parameter MultiAttach and InstanceId are conflict. | The MultiAttach and InstanceId parameters cannot be both specified. |
403 | InvalidParameter.DiskCategoryAndMultiAttachConflict | The specified disk category does not support multi attach set. | The MultiAttach parameter is not supported by Shared Block Storage devices. |
403 | InvalidParameter.DiskCategoryAndMultiAttachNotMatch | The specified disk category does not support multi attach enabled. | The specified disk category does not support the multi-attach feature. |
403 | OperationDenied.ZoneNotSupportMultiAttachDisk | The specified zone does support multi attach disk. | Disks for which the multi-attach feature is enabled cannot be created in the specified zone. |
403 | UserNotInTheWhiteList | User is not in multi attach disk white list, apply through the work order. | - |
403 | InvalidAccountStatus.CouponAmountNotEnough | Your coupon balance is insufficient or has expired. | Your coupon balance is insufficient or your coupons have expired. |
403 | InvalidOperation.CreateFromSnapshotUnsupported | The elastic ephemeral disk cannot be created from snapshot. | The elastic ephemeral disk cannot be created from snapshot. |
403 | NotSupportSnapshotEncrypted.DiskCategory | The specified disk category does not support creating encrypted system disks or creating encrypted data disks from snapshots. Check the DiskCategory or Encrypted parameter, or check your account for default encryption settings. | This disk type does not support creating encrypted system disks or creating encrypted data disks in snapshot mode. Please check the disk type and encryption parameters you entered, or check whether you have configured the default encryption configuration for account cloud disks. |
403 | InvalidEncrypted.DefaultEncryptionUnsupported | The specified parameter Encrypted must be true when default encryption is enabled. | After the cloud disk is encrypted by default, the newly purchased cloud disk must be an encrypted cloud disk. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region ID does not exist. |
404 | InvalidZoneId.NotFound | The specified zone does not exist. | The specified zone ID does not exist. |
404 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. | The specified snapshot ID does not exist. |
404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | The specified resource group does not exist. |
404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | The RegionId provided does not exist |
404 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | The specified KMSKeyId parameter does not exist. |
404 | InvalidInstanceId.NotFound | The InstanceId provided does not exist in our records. | The specified instance does not exist. Check whether the instance ID is correct. |
404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instance does not exist. |
404 | InvalidStorageClusterId.NotExist | The specified StorageClusterId does not exist in current region. | - |
500 | InternalError | The request processing has failed due to some unknown error. | An internal error has occurred. Try again later. |
500 | InvalidParameter.DataEncryptedKeyCreateFailed | Create kms data encrypted key fail. If you need further assistance, you can contact the KMS Technical Support. | - |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-03-21 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2024-01-15 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-11-24 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-11-21 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-10-09 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-08-29 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-08-02 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-06-28 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2021-11-29 | The Error code has changed | see changesets | ||||||||||
|