CreateDisk_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

  • 创建磁盘时支持开启多重挂载特性(MultiAttach)。建议您先了解该特性及使用限制,更多信息,请参见ESSD 云盘支持 NVMe以及使用多重挂载功能

  • 支持创建的磁盘类型:普通云盘、高效云盘、SSD 云盘、ESSD 云盘、ESSD Entry 云盘、ESSD 同城冗余、ESSD AutoPL 云盘、弹性临时盘-标准版和弹性临时盘-高级版。

  • 创建磁盘需要通过实名认证。请前往会员信息实名认证

  • 创建磁盘会涉及到资源计费,建议您提前了解云服务器 ECS 的计费方式。更多信息,请参见计费概述

  • 创建磁盘时,默认设置:

    • 删除磁盘时删除其自动快照,即DeleteAutoSnapshot取值为true。您可以调用 DescribeDisks 查询该参数配置,调用 ModifyDiskAttribute 修改该参数。
    • 创建 ESSD 云盘时,如果您不设置磁盘性能等级,默认为 PL1 等级。您可以通过 ModifyDiskSpec 修改磁盘性能等级。
    • 计费方式为按量付费,即默认Portable属性为true

流控信息

请求速率为500/60(s)。更多流控信息,请前往配额中心查看

授权信息

当前云产品暂无权限信息透出。

请求参数

字段名称字段详情
RegionIdstring

所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
ZoneIdstring

在指定可用区内创建一块按量付费磁盘。展开详情

示例值:cn-hangzhou-g参考取值来源:
    DescribeZones
SnapshotIdstring

创建云盘使用的快照 ID。2013 年 7 月 15 日及以前的快照不能用来创建云盘。 展开详情

示例值:s-bp67acfmxazb4p****参考取值来源:
    CopySnapshot
    CreateSnapshot
    DescribeSnapshots
DiskNamestring

磁盘名称。长度为 2~128 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文等),ASCII 数字(0-9)。可以包含半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。必须以 Unicode 中 letter 分类下的字符开头。展开详情

示例值:testDiskName参考取值来源:
    DescribeDisks
Sizeinteger<int32>

容量大小。单位:GiB。您必须为该参数传入参数值。取值范围:展开详情

示例值:2000取值 <= 65536
DiskCategorystring

数据盘的磁盘种类。取值范围:展开详情

示例值:cloud_ssd
Descriptionstring

磁盘描述。长度为 2~256 个英文或中文字符,不能以http://https://开头。展开详情

示例值:testDescription
Encryptedboolean

是否加密云盘。取值范围:展开详情

示例值:false
ClientTokenstring

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性

示例值:123e4567-e89b-12d3-a456-426655440000
InstanceIdstring

创建一块包年包月磁盘,并自动挂载到指定的包年包月实例(InstanceId)上。展开详情

示例值:i-bp18pnlg1ds9rky4****参考取值来源:
    RunInstances
    StopInstances
    CreateInstance
    StartInstances
    RebootInstances
    DescribeInstances
    ModifyManagedInstance
    RenewReservedInstances
    DetachInstanceRamRole
    AttachInstanceRamRole
    DeregisterManagedInstance
    PurchaseReservedInstancesOffering
ResourceGroupIdstring

磁盘所在的企业资源组 ID。

示例值:rg-bp67acfmxazb4p****参考取值来源:
    DescribeSecurityGroups
KMSKeyIdstring

云盘使用的 KMS 密钥 ID。

示例值:0e478b7a-4262-4802-b8cb-00d3fb40826X参考取值来源:
    DescribeDiskDefaultKMSKeyId
字符长度 <= 64
PerformanceLevelstring

创建一块 ESSD 云盘时,设置云盘的性能等级。取值范围:展开详情

示例值:PL1
AdvancedFeaturesstring

该参数暂未开放使用。

示例值:hide
StorageSetIdstring

存储集 ID。展开详情

示例值:ss-bp67acfmxazb4p****
EncryptAlgorithmstring

该参数暂未开放使用。

示例值:hide
StorageSetPartitionNumberinteger<int32>

存储集分区数。取值范围:大于等于 2,最高不能超过调用 DescribeAccountAttributes 后显示的权益配额限制。展开详情

示例值:3取值 >= 1
StorageClusterIdstring

专属块存储集群 ID。如果您需要在指定的专属块存储集群中创建云盘,请指定该参数。展开详情

示例值:dbsc-j5e1sf2vaf5he8m2****
MultiAttachstring

是否开启多重挂载特性。取值范围:展开详情

示例值:Disabled
Tagarray<object>

磁盘的标签信息列表。

子级条数 <= 20
Arnarray<object>
说明 该参数暂未开放使用。
子级条数 <= 10
ProvisionedIopsinteger<int64>

ESSD AutoPL 云盘预配置的读写 IOPS。可能值:0~min{50,000, 1000*容量-基准性能}。展开详情

注意 该字段类型为 Long,在序列化/反序列化的过程中可能导致精度丢失,请注意数值不得大于 9007199254740991。
示例值:40000取值 >= 0
BurstingEnabledboolean

是否开启 Burst(性能突发)。取值范围:展开详情

示例值:false

返回参数

字段名称字段详情
DiskIdstring

磁盘 ID。

示例值:d-bp131n0q38u3a4zi****
RequestIdstring

请求 ID。

示例值:473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
OrderIdstring

生成的订单 ID。展开详情

示例值:20413515388****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
InvalidSize.ValueNotSupported
The specified parameter Size is not valid.诊断
400
InvalidDiskName.Malformed
The specified disk name is wrongly formed.诊断
400
InvalidDescription.Malformed
The specified description is wrongly formed.诊断
400
MissingParameter
The input parameter either "SnapshotId" or "Size" should be specified.诊断
400
InvalidDiskCategory.NotSupported
The specified disk category is not support.诊断
400
Account.Arrearage
Your account has an outstanding payment.诊断
400
InvalidDiskCategory.ValueNotSupported
The specified parameter "DiskCategory" is not valid.诊断
400
InvalidParameter.Conflict
%s诊断
400
OperationDenied
The specified Zone is not available or not authorized.诊断
400
InvalidDiskSize.NotSupported
The specified parameter size is not valid.诊断
400
InvalidDiskSizeOrCategory
The specified disk category or size is invalid.诊断
400
InvalidParameter.EncryptedIllegal
The specified parameter Encrypted must be true when kmsKeyId is not empty.诊断
400
Duplicate.TagKey
The Tag.N.Key contain duplicate key.诊断
400
InvalidTagKey.Malformed
The specified Tag.n.Key is not valid.诊断
400
InvalidTagValue.Malformed
The specified Tag.n.Value is not valid.诊断
400
InvalidParameter.Arns
The specified Arns is not valid.诊断
400
InvalidPerformanceLevel.Malformed
The specified parameter PerformanceLevel is not valid.诊断
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
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.诊断
400
InvalidCloudBoxZone.EncryptedNotSupported
The cloud box zone does not support creating encrypted disks.诊断
400
InvalidInstance.NotFoundSystemDisk
The specified instance has no system disk.诊断
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.诊断
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.诊断
400
InsufficientBalance.AgentAccount
The account balance is insufficient. Please contact your channel partner to recharge in time.诊断
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.诊断
400
InvalidParameter.KmsNotEnabled
Failed to perform this operation because KMS is not activated.诊断
400
InvalidParameter.Encrypted.KmsNotEnable
Failed to perform this operation because KMS is not activated.诊断
400
InvalidZoneId.DiskCategoryUnsupported
The specified disk category does not support setting the ZoneId.诊断
400
InvalidStorageSetId.DiskCategoryUnsupported
The specified disk category does not support setting the StorageSetId.诊断
400
InvalidStorageClusterId.DiskCategoryUnsupported
The specified disk category does not support setting the StorageClusterId.诊断
400
InvalidParameter.Encrypted
Creating non-encrypted disks with encrypted snapshots is not supported.诊断
400
EncryptedOption.Conflict
Disk encryption attributes conflict.诊断
400
InvalidDataDiskCategory.NotSupported
Specified disk category is not supported.诊断
400
InvalidBurstingEnabled.DiskSizeTooSmall
The disk size must be greater than 3 GiB to enable burst.诊断
400
OperationDenied.RiskIssue
Your action is denied by risk issue, please contact customer service.诊断
403
InvalidDataDiskCategory.NotSupported
Specified disk category is not supported.诊断
403
InstanceDiskCategoryLimitExceed
The total size of specified disk category in an instance exceeds.诊断
403
InvalidSnapshot.NotReady
The specified snapshot creation is not completed yet.诊断
403
InvalidSnapshot.TooOld
This operation is forbidden because the specified snapshot is created before 2013-07-15.诊断
403
InvalidSnapshot.TooLarge
The capacity of snapshot exceeds 2000GB.诊断
403
OperationDenied
The specified snapshot is not allowed to create disk.诊断
403
QuotaExceed.PortableCloudDisk
The quota of portable cloud disk exceeds.诊断
403
InvalidDiskCategory.ValueUnauthorized
The disk category is not authorized.诊断
403
InvalidSnapshotId.NotReady
The specified snapshot has not completed yet.诊断
403
InvalidSnapshotId.NotDataDiskSnapshot
The specified snapshot is system disk snapshot.诊断
403
InvalidDiskSize.TooSmall
Specified disk size is less than the size of snapshot.诊断
403
InvalidDiskSize.NotSupported
Disk size is not supported.诊断
403
InvalidAccountStatus.NotEnoughBalance
Your account does not have enough balance.诊断
403
InvalidAccountStatus.SnapshotServiceUnavailable
Snapshot service has not been opened yet.诊断
403
InvalidPayMethod
The specified pay method is not valid.诊断
403
InvalidDiskCategory.NotSupported
The specified disk category is not supported.诊断
403
UserNotInTheWhiteList
The user is not in disk white list.诊断
403
QuotaExceed.PostPaidDisk
Living postPaid disks quota exceeded.诊断
403
InvalidRegion.NotSupport
The specified region does not support byok.诊断
403
InvalidParameter.KMSKeyId.KMSUnauthorized
ECS service have no right to access your KMS.诊断
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
InvalidInstanceChargeType.ValueNotSupported
The InstanceChargeType does not support this action.诊断
403
InvalidStatus.Upgrading
The instance is upgrading; please 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诊断
403
QuotaExceeded.PostpaidDataDiskCapacity
The quota of postpaid data disk capacity exceeds.诊断
403
InvalidRegionId.NotSupportEncryptAlgorithm
The current region does not support creating encrypted disks with EncryptAlgorithm.诊断
403
OperationDenied.SnapshotNotAllowed
The specified snapshot is not allowed to create disk.诊断
403
LastTokenProcessing
The last token request is processing.诊断
403
InvalidParameter.MultiAttach
The specified param MultiAttach is not valid.诊断
403
InvalidParameter.MultiAttachAndInstanceIdConflict
The parameter MultiAttach and InstanceId are conflict.诊断
403
InvalidParameter.DiskCategoryAndMultiAttachConflict
The specified disk category does not support multi attach set.诊断
403
InvalidParameter.DiskCategoryAndMultiAttachNotMatch
The specified disk category does not support multi attach enabled.诊断
403
OperationDenied.ZoneNotSupportMultiAttachDisk
The specified zone does support multi attach disk.诊断
403
InvalidAccountStatus.CouponAmountNotEnough
Your coupon balance is insufficient or has expired.诊断
403
InvalidOperation.CreateFromSnapshotUnsupported
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.诊断
403
InvalidParameter.DataEncryptedKeyCreateFailed
Create kms data encrypted key fail. If you need further assistance, you can contact the KMS Technical Support.诊断
403
Zone.NotOnSale
The resource in the specified zone is no longer available for sale. Please try other regions and zones.诊断
403
RegionUnauthorized
You are not authorized to perform the operation in the specified region.诊断
403
InvalidDataDiskCategory.ValueNotSupported
The specified Category of Data Disk is not valid.诊断
403
InvalidParameter.EncryptedNotSupported
The current disk category does not support encryption. If encryption is required, please switch to a different disk category.诊断
403
InvalidDataDiskSize.ValueNotSupported
The specified disk size is beyond the permitted range, or the snapshot capacity exceeds the size limit for the specified disk category.诊断
403
InvalidParameter.KMSKeyId.CMKNotEnabled
The CMK (Customer Master Key) must be in an active state.诊断
403
InvalidParameter.KMSKeyId.CMKUnauthorized
The CMK(Customer Master Key) lacks authorization to add tags to the ECS service.诊断
403
InvalidEncrypted.NotMatchSnapshot
The specified parameter Encrypted must be set to true when creating disks with encrypted snapshots.诊断
403
InvalidEncrypted.NotMatchDiskDefaultEncryption
Enabling disk default encryption prevents the creation of non-encrypted disks.诊断
404
InvalidRegionId.NotFound
The specified RegionId does not exist.诊断
404
InvalidZoneId.NotFound
The specified zone does not exist.诊断
404
InvalidSnapshotId.NotFound
The specified SnapshotId does not exist.诊断
404
InvalidResourceGroup.NotFound
The ResourceGroup provided does not exist in our records.诊断
404
InvalidParameter.KMSKeyId.NotFound
The specified KMSKeyId does not exist.诊断
404
InvalidInstanceId.NotFound
The InstanceId provided does not exist in our records.诊断
404
InvalidStorageClusterId.NotExist
The specified StorageClusterId does not exist in current region.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

变更时间变更内容概要操作
2025-03-19
变更错误码400
变更错误码403
2025-02-27
变更错误码400
2025-01-17
变更错误码400
2024-12-30
变更错误码400
变更错误码403
2024-12-09
变更错误码403
变更错误码500