Describes one or more block storage disks, including cloud disks, local disks, and elastic temporary disks.
Operation description
-
The request parameters, such as
RegionId,ZoneId,DiskIds, andInstanceId, act as filters. The operation applies a logicalANDto these parameters. -
The
DiskIdsparameter is a JSON array. If you omit this parameter, it is not used as a filter. If you provide an empty array forDiskIds, the operation returns an empty list. -
This operation supports paginated queries. Set
NextTokento theNextTokenvalue from the previous response to retrieve the next page of results. UseMaxResultsto specify the maximum number of entries to return per page. -
A cloud disk that has the multi-attach feature enabled can be attached to multiple instances. You can view all the attachment information for the cloud disk in the
Attachmentlist of the response.
When using the Alibaba Cloud CLI, parameter values must be in specific formats depending on their data type. For more information, see Parameter formats in Alibaba Cloud CLI.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeDisks |
list |
Disk
Disk
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the disk is located. You can call the DescribeRegions operation to view the latest list of regions. |
cn-hangzhou |
| ZoneId |
string |
No |
The ID of the zone. |
cn-hangzhou-g |
| DiskIds |
string |
No |
The IDs of one or more cloud disks, local disks, or Elastic Ephemeral Disks, specified as a JSON array. The array can contain up to 100 disk IDs. |
["d-bp67acfmxazb4p****", "d-bp67acfmxazb4g****", … "d-bp67acfmxazb4d****"] |
| InstanceId |
string |
No |
The ID of the instance to which the cloud disk, local disk, or Elastic Ephemeral Disk is attached. |
i-bp67acfmxazb4q**** |
| DiskType |
string |
No |
The type of disk to query. Valid values:
Default value: all. Note
Elastic Ephemeral Disks cannot be used as system disks. |
all |
| Category |
string |
No |
The category of the disk. Valid values:
Default value: all. |
all |
| Status |
string |
No |
The status of the disk. For more information, see Disk states. Valid values:
Default value: All. |
All |
| SnapshotId |
string |
No |
The ID of the snapshot used to create the cloud disk. |
s-bp67acfmxazb4p**** |
| Portable |
boolean |
No |
Specifies whether the disk is detachable. Valid values:
The
|
false |
| DeleteWithInstance |
boolean |
No |
Specifies whether to release the disk when its associated instance is released. Valid values:
Default value: false. |
false |
| DeleteAutoSnapshot |
boolean |
No |
Specifies whether to release the automatic snapshots of the cloud disk when the disk is released. Valid values:
Default value: false. |
false |
| PageNumber |
integer |
No |
Note
This parameter is deprecated. We recommend that you use |
1 |
| PageSize |
integer |
No |
Note
This parameter is deprecated. We recommend that you use |
10 |
| NextToken |
string |
No |
The pagination token returned from a previous query. Specify this token to retrieve the next page of results. You do not need to set this parameter for the first request. |
AAAAAdDWBF2**** |
| MaxResults |
integer |
No |
The maximum number of results to return per page. Valid values: 10 to 500. Default value:
|
50 |
| DiskName |
string |
No |
The name of the disk. The name must be 2 to 128 characters long and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). |
testDiskName |
| AutoSnapshotPolicyId |
string |
No |
The ID of the automatic snapshot policy applied to the cloud disks. |
sp-m5e2w2jutw8bv31**** |
| EnableAutoSnapshot |
boolean |
No |
Specifies whether the automatic snapshot policy feature is enabled for the cloud disk.
Note
This parameter is deprecated. The automatic snapshot feature is enabled by default on cloud disks. To back up a disk automatically, apply an automatic snapshot policy to it. |
true |
| EnableAutomatedSnapshotPolicy |
boolean |
No |
Specifies whether an automatic snapshot policy is applied to the cloud disk. Valid values:
Default value: false. |
false |
| DiskChargeType |
string |
No |
The billing method of the disk. Valid values:
|
PostPaid |
| LockReason |
string |
No |
The reason the disk is locked. Valid values:
|
security |
| Filter.1.Key |
string |
No |
The filter key. Set this parameter to |
CreationStartTime |
| Filter.2.Key |
string |
No |
The filter key. Set this parameter to |
CreationEndTime |
| Filter.1.Value |
string |
No |
The start of the time range to query. The time must be in |
2017-12-05T22:40Z |
| Filter.2.Value |
string |
No |
The end of the time range to query. The time must be in |
2017-12-06T22:40Z |
| ResourceGroupId |
string |
No |
The ID of the Resource Group to which the disk belongs. When you filter by this parameter, a maximum of 1,000 results are returned. Note
You cannot filter resources that belong to the default Resource Group. |
rg-bp67acfmxazb4p**** |
| EnableShared |
boolean |
No |
Specifies whether to query only Shared Block Storage disks. |
false |
| Encrypted |
boolean |
No |
Specifies whether to query only encrypted cloud disks. Valid values:
Default value: false. |
false |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
Default value: false. |
false |
| KMSKeyId |
string |
No |
The ID of the Key Management Service (KMS) key that encrypts the cloud disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| MultiAttach |
string |
No |
Specifies whether the multi-attach feature is enabled for the disk. Valid values:
|
Disabled |
| Tag |
array<object> |
No |
The tags of the disk. |
|
|
object |
No |
The tag of the disk. |
||
| key |
string |
No |
The key of the tag. Note
We recommend that you use the |
null |
| Key |
string |
No |
The key of the tag. Note
We recommend that you use the |
TestKey |
| Value |
string |
No |
The value of the tag. |
TestValue |
| value |
string |
No |
The value of the tag. |
null |
| AdditionalAttributes |
array |
No |
Additional attributes. Set the value to Note
Only regional-redundant ESSDs have data placement locations. |
IOPS |
|
string |
No |
An additional attribute. Set the value to |
Placement |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The token used to retrieve the next page of results. |
AAAAAdDWBF2**** |
| PageSize |
integer |
Note
This parameter is deprecated. Use the |
1 |
| PageNumber |
integer |
Note
This parameter is deprecated. Use the |
1 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of entries returned. Note
The |
15 |
| Disks |
object |
||
| Disk |
array<object> |
Details about the disks. |
|
|
array<object> |
Details about a disk. |
||
| SerialNumber |
string |
The serial number of the disk. |
bp18um4r4f2fve2**** |
| CreationTime |
string |
The time when the disk was created. |
2021-06-07T06:08:54Z |
| Status |
string |
The state of the disk. Valid values:
|
In_use |
| Type |
string |
The type of the disk. Valid values:
|
system |
| PerformanceLevel |
string |
The performance level of the ESSD. Valid values:
|
PL0 |
| BdfId |
string |
This parameter is available by invitation only. |
null |
| EnableAutoSnapshot |
boolean |
Indicates whether the automatic snapshot policy feature is enabled for the disk. Note
This parameter is deprecated. The automatic snapshot feature is enabled by default on new disks. To use this feature, apply an automatic snapshot policy to the disk. |
false |
| StorageSetId |
string |
The ID of the storage set. |
ss-i-bp1j4i2jdf3owlhe**** |
| StorageSetPartitionNumber |
integer |
The number of partitions in the storage set. |
11 |
| DiskId |
string |
The ID of the disk. |
d-bp18um4r4f2fve24**** |
| DeleteAutoSnapshot |
boolean |
Indicates whether to delete the automatic snapshots of the disk when the disk is released. Valid values:
Snapshots created by calling the CreateSnapshot operation or in the console are not affected by this parameter and are always retained. |
false |
| StorageClusterId |
string |
The ID of the dedicated block storage cluster to which the disk belongs. If the disk is in a public block storage cluster, this parameter is empty. |
dbsc-j5e1sf2vaf5he8m2**** |
| Encrypted |
boolean |
Indicates whether the disk is encrypted. |
false |
| IOPSRead |
integer |
The maximum number of read IOPS. |
2000 |
| MountInstanceNum |
integer |
The number of instances to which the shared block storage device is attached. |
1 |
| Description |
string |
The description of the disk. |
testDescription |
| Device |
string |
The device name of the disk on the instance to which it is attached, such as /dev/xvdb. This parameter has a value only when the disk is in the
Note
This parameter is deprecated. To ensure compatibility, we recommend that you use other parameters. |
/dev/xvdb |
| DiskName |
string |
The name of the disk. |
testDiskName |
| Portable |
boolean |
Indicates whether the disk is removable. |
false |
| ImageId |
string |
The ID of the image used to create the instance. This parameter is returned only if the disk was created from an image. If the image used to create the disk is deleted, this parameter is empty. |
m-bp13aqm171qynt3u*** |
| KMSKeyId |
string |
The ID of the Key Management Service (KMS) key that is used for the disk. |
0e478b7a-4262-4802-b8cb-00d3fb408*** |
| DeleteWithInstance |
boolean |
Indicates whether the disk is released when the instance to which it is attached is released. Valid values:
|
true |
| DetachedTime |
string |
The time when the disk was last detached. |
2021-06-07T21:01:22Z |
| SourceSnapshotId |
string |
The ID of the snapshot that is used to create the disk. This parameter is empty if the disk was not created from a snapshot or if the source snapshot has been deleted. |
s-bp67acfmxazb4p**** |
| AutoSnapshotPolicyId |
string |
The ID of the automatic snapshot policy that is applied to the disk. Note
This parameter is deprecated. If multiple automatic snapshot policies are applied to the disk, only the ID of one of the policies is returned. To query all automatic snapshot policies that are applied to the disk, call the DescribeAutoSnapshotPolicyEx operation. |
sp-bp67acfmxazb4p**** |
| EnableAutomatedSnapshotPolicy |
boolean |
Indicates whether an automatic snapshot policy is applied to the disk. |
false |
| IOPSWrite |
integer |
The maximum number of write IOPS. |
2000 |
| InstanceId |
string |
The ID of the instance to which the disk is attached. This parameter has a value only when the disk is in the
|
i-bp67acfmxazb4q**** |
| IOPS |
integer |
The maximum number of read and write IOPS. |
4000 |
| RegionId |
string |
The ID of the region to which the disk belongs. |
cn-hangzhou |
| ExpiredTime |
string |
The time when the subscription disk expires. |
2021-07-07T16:00Z |
| Size |
integer |
The size of the disk. Unit: GiB. |
60 |
| ResourceGroupId |
string |
The ID of the resource group to which the disk belongs. |
rg-bp67acfmxazb4p**** |
| DiskChargeType |
string |
The billing method of the disk. Valid values:
|
PrePaid |
| ZoneId |
string |
The ID of the zone to which the disk belongs. |
cn-hangzhou-i |
| AttachedTime |
string |
The time when the disk was last attached. The time follows the ISO 8601 standard in the |
2021-06-07T06:08:56Z |
| Category |
string |
The category of the disk. Valid values:
|
cloud_ssd |
| ProductCode |
string |
The product code from Alibaba Cloud Marketplace. |
jxsc000204 |
| MultiAttach |
string |
Indicates whether the multi-attach feature is enabled for the disk. Valid values: |
Disabled |
| OperationLocks |
object |
||
| OperationLock |
array<object> |
The reasons why the disk is locked. |
|
|
object |
The reason why the disk is locked. |
||
| LockReason |
string |
The reason why the disk is locked. |
security |
| MountInstances |
object |
||
| MountInstance |
array<object> |
The attachment information of the shared block storage device. |
|
|
object |
The attachment information of the shared block storage device. |
||
| AttachedTime |
string |
The time when the disk was attached. The time follows the ISO 8601 standard in the |
2017-12-05T2340:00Z |
| InstanceId |
string |
The ID of the instance to which the disk is attached. |
i-bp1j4i2jdf3owlhe**** |
| Device |
string |
The mount point of the disk. |
/dev/xvda |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the disk. |
|
|
object |
The tag of the disk. |
||
| TagValue |
string |
The value of the tag. |
TestValue |
| TagKey |
string |
The key of the tag. |
TestKey |
| Attachments |
object |
||
| Attachment |
array<object> |
The attachment information of the disk. This parameter is not returned for shared block storage. |
|
|
object |
The attachment information of the disk. |
||
| InstanceId |
string |
The ID of the instance to which the disk is attached. |
i-bp67acfmxazb4q**** |
| Device |
string |
The device name. |
/dev/xvda |
| AttachedTime |
string |
The time when the disk was attached. The time follows the ISO 8601 standard in the |
2021-06-07T06:08:56Z |
| ProvisionedIops |
integer |
The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50000, 1000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}. This parameter is available only when |
40000 |
| BurstingEnabled |
boolean |
Indicates whether the performance burst feature is enabled. Valid values:
This parameter is available only when |
false |
| Throughput |
integer |
The throughput of the disk. Unit: MB/s. |
100 |
| ThroughputRead |
integer |
The read throughput of the disk. Unit: MB/s. |
100 |
| ThroughputWrite |
integer |
The write throughput of the disk. Unit: MB/s. |
100 |
| Placement |
object |
The placement information of the disk. This parameter is returned only if you set Note
This parameter is returned only for ESSD zone-redundant disks ( |
|
| ZoneIds |
string |
The list of zones in which data is stored. |
"["cn-hangzhou-b", "cn-hangzhou-j"]" |
| SourceDiskId |
string |
d-123********* |
|
| DataSource |
object |
||
| Id |
string |
||
| Type |
string |
Examples
Success response
JSON format
{
"NextToken": "AAAAAdDWBF2****",
"PageSize": 1,
"PageNumber": 1,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TotalCount": 15,
"Disks": {
"Disk": [
{
"SerialNumber": "bp18um4r4f2fve2****",
"CreationTime": "2021-06-07T06:08:54Z",
"Status": "In_use",
"Type": "system",
"PerformanceLevel": "PL0",
"BdfId": "null",
"EnableAutoSnapshot": false,
"StorageSetId": "ss-i-bp1j4i2jdf3owlhe****",
"StorageSetPartitionNumber": 11,
"DiskId": "d-bp18um4r4f2fve24****",
"DeleteAutoSnapshot": false,
"StorageClusterId": "dbsc-j5e1sf2vaf5he8m2****",
"Encrypted": false,
"IOPSRead": 2000,
"MountInstanceNum": 1,
"Description": "testDescription",
"Device": "/dev/xvdb",
"DiskName": "testDiskName",
"Portable": false,
"ImageId": "m-bp13aqm171qynt3u***",
"KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb408***",
"DeleteWithInstance": true,
"DetachedTime": "2021-06-07T21:01:22Z",
"SourceSnapshotId": "s-bp67acfmxazb4p****",
"AutoSnapshotPolicyId": "sp-bp67acfmxazb4p****",
"EnableAutomatedSnapshotPolicy": false,
"IOPSWrite": 2000,
"InstanceId": "i-bp67acfmxazb4q****",
"IOPS": 4000,
"RegionId": "cn-hangzhou",
"ExpiredTime": "2021-07-07T16:00Z",
"Size": 60,
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"DiskChargeType": "PrePaid",
"ZoneId": "cn-hangzhou-i",
"AttachedTime": "2021-06-07T06:08:56Z",
"Category": "cloud_ssd",
"ProductCode": "jxsc000204",
"MultiAttach": "Disabled",
"OperationLocks": {
"OperationLock": [
{
"LockReason": "security"
}
]
},
"MountInstances": {
"MountInstance": [
{
"AttachedTime": "2017-12-05T2340:00Z",
"InstanceId": "i-bp1j4i2jdf3owlhe****",
"Device": "/dev/xvda"
}
]
},
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
},
"Attachments": {
"Attachment": [
{
"InstanceId": "i-bp67acfmxazb4q****",
"Device": "/dev/xvda",
"AttachedTime": "2021-06-07T06:08:56Z"
}
]
},
"ProvisionedIops": 40000,
"BurstingEnabled": false,
"Throughput": 100,
"ThroughputRead": 100,
"ThroughputWrite": 100,
"Placement": {
"ZoneIds": "\"[\"cn-hangzhou-b\",\n\"cn-hangzhou-j\"]\""
},
"SourceDiskId": "d-123*********",
"DataSource": {
"Id": "",
"Type": ""
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDiskType.ValueNotSupported | The specified disk type is not supported. | The specified disk type is not supported. |
| 400 | InvalidCategory.ValueNotSupported | The specified disk category is not supported. | The specified disk category is not supported. |
| 400 | InvalidStatus.ValueNotSupported | The specified disk status is not supported. | The disk is in a state that does not support the current operation. |
| 400 | InvalidTag.Mismatch | The specified Tag.n.Key and Tag.n.Value are not match. | The specified Tag.N.Key and Tag.N.Value parameters do not correspond to each other. |
| 400 | InvalidTagCount | The specified tags are beyond the permitted range. | The number of specified tags exceeds the upper limit. |
| 400 | InvalidRegion.NotFound | The specified parameter RegionId is not valid. | The specified RegionId parameter is invalid. |
| 400 | InvalidZoneId.NotFound | The zoneId provided does not exist in our records. | The specified zone ID does not exist. |
| 400 | MissingParamter.RegionId | The regionId should not be null. | The RegionId parameter is required. |
| 400 | InvalidParameter.DiskIds | The specified parameter diskIds is not valid. | The specified DiskIds parameter is invalid. |
| 400 | IncompleteParamter | Some fields can not be null in this request. | Some required parameters are not specified. |
| 400 | InvalidParamter | Some parameters are invalid in this request. | The request contains invalid parameters. |
| 400 | InvalidSnapshot.NotFound | The specified parameter SnapshotId is not valid. | The specified SnapshotId parameter is invalid. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | InvalidDiskIds.Malformed | The amount of specified disk Ids exceeds the limit. | |
| 403 | InvalidCategory.ValueNotSupported | The specified disk category is not supported. | |
| 403 | UserNotInTheWhiteList | The user is not in volume white list. | |
| 403 | InvalidParameter.MultiAttachAndEnableSharedNotMatch | The parameter MultiAttach and EnableShared are not match. | The specified MultiAttach and EnableShared parameters do not match. |
| 403 | InvalidParameter.MultiAttach | The specified param MultiAttach is not valid. | The specified MultiAttach parameter is invalid. |
| 404 | InvalidFilterKey.NotFound | The filter key is not found. | |
| 404 | InvalidFilterValue | The filter value is not valid. | |
| 404 | InvalidDiskIds.ValueNotSupported | The specified parameter "DiskIds" is not supported. | |
| 404 | InvalidDiskChargeType.NotFound | The DiskChargeType does not exist in our records. | The DiskChargeType does not exist in our records. |
| 404 | InvalidLockReason.NotFound | The specified LockReason is not found. | The specified lockout reason does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.