建立一塊隨用隨付或包年包月的資料磁碟。
介面說明
-
建立磁碟時支援開啟多重掛載特性(
MultiAttach)。建議您先了解該特性及使用限制,更多資訊,請參見ESSD 雲端硬碟支援 NVMe以及使用多重掛載功能。 -
支援建立的磁碟類型:普通雲端硬碟、高效雲端硬碟、SSD 雲端硬碟、ESSD 雲端硬碟、ESSD Entry 雲端硬碟、ESSD 同城冗餘、ESSD AutoPL 雲端硬碟、彈性臨時碟-標準版和彈性臨時碟-進階版。
-
建立磁碟需要通過實名認證。請前往會員資訊實名認證。
-
建立磁碟會涉及到資源計費,建議您提前了解雲端伺服器 ECS 的計費方式。更多資訊,請參見計費概述。
-
建立磁碟時,預設設定:
刪除磁碟時刪除其自動快照,即
DeleteAutoSnapshot取值為true。您可以呼叫 DescribeDisks 查詢該參數配置,呼叫 ModifyDiskAttribute 修改該參數。建立 ESSD 雲端硬碟時,如果您不設定磁碟性能等級,預設為 PL1 等級。您可以透過 ModifyDiskSpec 修改磁碟性能等級。
計費方式為隨用隨付,即預設
Portable屬性為true。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:CreateDisk |
create |
Disk
Disk
Snapshot
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
所屬的地域 ID。您可以呼叫 DescribeRegions 查看最新的阿里雲地域列表。 |
cn-hangzhou |
| ZoneId |
string |
否 |
在指定可用區內建立一塊隨用隨付磁碟。
說明
|
cn-hangzhou-g |
| SnapshotId |
string |
否 |
建立雲端硬碟使用的快照 ID。2013 年 7 月 15 日及以前的快照不能用來建立雲端硬碟。
|
s-bp67acfmxazb4p**** |
| DiskName |
string |
否 |
磁碟名稱。長度為 2~128 個字元,支援 Unicode 中 letter 分類下的字元(其中包括英文、中文等),ASCII 數字(0-9)。可以包含半形冒號(:)、底線(_)、半形句號(.)或者短劃線(-)。必須以 Unicode 中 letter 分類下的字元開頭。 預設值:空。 |
testDiskName |
| Size |
integer |
否 |
容量大小。單位:GiB。您必須為該參數傳入參數值。取值範圍:
如果您指定了
|
2000 |
| DiskCategory |
string |
否 |
資料磁碟的磁碟種類。取值範圍:
預設值:cloud。 |
cloud_ssd |
| Description |
string |
否 |
磁碟描述。長度為 2~256 個英文或中文字元,不能以 預設值:空。 |
testDescription |
| Encrypted |
boolean |
否 |
是否加密雲端硬碟。取值範圍:
預設值:false。 |
false |
| ClientToken |
string |
否 |
保證請求冪等性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。更多資訊,請參見如何保證冪等性。 |
123e4567-e89b-12d3-a456-426655440000 |
| InstanceId |
string |
否 |
建立一塊包年包月磁碟,並自動掛載到指定的包年包月執行個體(InstanceId)上。
預設值:空,代表建立的是隨用隨付雲端硬碟,雲端硬碟所屬地由 RegionId 和 ZoneId 確定。 |
i-bp18pnlg1ds9rky4**** |
| ResourceGroupId |
string |
否 |
磁碟所在的企業資源群組 ID。 |
rg-bp67acfmxazb4p**** |
| KMSKeyId |
string |
否 |
雲端硬碟使用的 KMS 密鑰 ID。 說明
若 Encrypted 設定為 true,不指定 KMSKeyId,則使用預設的密鑰進行加密,並在建立執行個體成功後返回 KMSKeyId 值。
|
0e478b7a-4262-4802-b8cb-00d3fb40826X |
| PerformanceLevel |
string |
否 |
建立一塊 ESSD 雲端硬碟時,設定雲端硬碟的性能等級。取值範圍:
預設值:PL1。 有關如何選擇 ESSD 性能等級,請參見 ESSD 雲端硬碟。 |
PL1 |
| AdvancedFeatures |
string |
否 |
該參數暫未開放使用。 |
hide |
| StorageSetId |
string |
否 |
儲存集 ID。 說明
儲存集相關參數( |
ss-bp67acfmxazb4p**** |
| EncryptAlgorithm |
string |
否 |
該參數暫未開放使用。 |
hide |
| StorageSetPartitionNumber |
integer |
否 |
儲存集分區數。取值範圍:大於等於 2,最高不能超過呼叫 DescribeAccountAttributes 後顯示的權益配額限制。 預設值:2。 |
3 |
| StorageClusterId |
string |
否 |
專屬區塊儲存叢集 ID。如果您需要在指定的專屬區塊儲存叢集中建立雲端硬碟,請指定該參數。 說明
儲存集相關參數( |
dbsc-j5e1sf2vaf5he8m2**** |
| MultiAttach |
string |
否 |
是否開啟多重掛載特性。取值範圍:
預設值:Disabled。 說明
開啟多重掛載特性的雲端硬碟只支援隨用隨付的計費方式。因此 |
Disabled |
| Tag |
array<object> |
否 |
磁碟的標籤資訊列表。 |
|
|
object |
否 |
磁碟的標籤資訊列表。 |
||
| key |
string |
否 |
磁碟的標籤鍵。 說明
為提高程式碼相容性,請盡量使用 Tag.N.Key 參數。 |
Test |
| Key |
string |
否 |
磁碟的標籤鍵。N 的取值範圍:1~20。一旦傳入 Tag.N.Key 值,則不允許為空字串。最多支援 128 個字元,不能以 |
TestKey |
| Value |
string |
否 |
磁碟的標籤值。N 的取值範圍:1~20。一旦傳入 Tag.N.Value 值,可以為空字串。最多支援 128 個字元,不能包含 |
TestValue |
| value |
string |
否 |
磁碟的標籤值。 說明
為提高程式碼相容性,請盡量使用 Tag.N.Value 參數。 |
Test |
| Arn |
array<object> |
否 |
說明
該參數暫未開放使用。 |
|
|
object |
否 |
說明
該參數暫未開放使用。 |
||
| RoleType |
string |
否 |
說明
該參數暫未開放使用。 |
hide |
| Rolearn |
string |
否 |
說明
該參數暫未開放使用。 |
hide |
| AssumeRoleFor |
integer |
否 |
說明
該參數暫未開放使用。 |
1000000000 |
| ProvisionedIops |
integer |
否 |
ESSD AutoPL 雲端硬碟(單碟)預配置性能的讀寫 IOPS。可能值:
IOPS/GiB*容量-基準 IOPS),50,000}] 基準性能=max{min{1,800+50*容量,50,000}, 3,000}。 說明
當 |
40000 |
| BurstingEnabled |
boolean |
否 |
是否開啟 Burst(性能突發)。取值範圍:
說明
當 |
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| DiskId |
string |
磁碟 ID。 |
d-bp131n0q38u3a4zi**** |
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| OrderId |
string |
產生的訂單 ID。 說明
僅在建立包年包月雲端硬碟時會返回訂單 ID。 |
20413515388**** |
樣本
正常返回樣本
JSON格式
{
"DiskId": "d-bp131n0q38u3a4zi****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"OrderId": "20413515388****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 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. | |
| 400 | InvalidDiskSize.ExceedsMultiAttachLimit | The specified disk size exceeds the maximum limit 65536 for enabling multi-attach. | |
| 400 | InvalidStatus.ValueNotSupported | The specified instance status is not supported for this operation, expect status is Running or Stopped. | |
| 400 | InvalidSnapshot.NotReady | The specified snapshot creation is not completed yet. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 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. | |
| 403 | InvalidInstanceStatus | The current status of the instance does not support this operation. | |
| 403 | InvalidDiskSize.NotSupportMultiAttachDisk | The specified disk size exceeds the maximum limit 65536 for enabling multi-attach. | |
| 403 | InstanceDiskLimitExceeded | The amount of the disk on instance reach its limits. | |
| 403 | InvalidOperation.PrepaidDiskUnsupported | The specified DataSource does not support prepaid disk charge type. | |
| 403 | UnsupportedUserType | The specified DataSource is not enabled. | |
| 403 | InvalidDataSource.NotAvailable | The specified DataSource is not available. Please contact the ACS Service team to verify DataSource availability. | |
| 403 | InvalidParameter.DataSourceType | The specified DataSourceType is not valid. The DataSourceType only supports ImageCache. | |
| 403 | InvalidParameter.DataSource | Both DataSourceId and DataSourceType must be specified. | |
| 403 | InvalidDataSource.EncryptedResourceNotSupported | Encrypted DataSources are not supported. Please switch to a non-encrypted DataSource and try again. | |
| 403 | ParameterConflict.DataSourceAndSnapshotId | The specified parameter DataSource is incompatible with SnapshotId. You can specify either DataSource or SnapshotId but not both. | |
| 403 | InvalidZoneId.EncryptedUnsupported | The specified ZoneId does not support creating 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。