Retrieves details of one or more block storage resources, including cloud disks, local disks, and elastic temporary disks.
Operation description
-
Parameters such as
RegionId,ZoneId,DiskIds, andInstanceIdact as filters and are combined with a logical AND. -
The
DiskIdsparameter is a JSON-formatted array. Omitting this parameter disables the filter. However, an emptyDiskIdsarray is a valid filter that returns no results. -
This operation supports pagination. To retrieve the next page of results, set
NextTokento the token returned from the previous call. UseMaxResultsto specify the maximum number of items to return on each page. -
You can attach a disk with the multi-attach feature enabled to multiple instances. You can view all attachment information for the disk in the
Attachmentlist of the response.
When you call this operation using the Alibaba Cloud CLI, request parameter values for different data types must be in the required format. For more information, see CLI parameter format.
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 resides. You can call the DescribeRegions operation to query the latest list of Alibaba Cloud regions. |
cn-hangzhou |
| ZoneId |
string |
No |
The ID of the availability zone. |
cn-hangzhou-g |
| DiskIds |
string |
No |
The IDs of the cloud disks, local disks, or elastic ephemeral disks. The value is a JSON array of up to 100 disk IDs. |
["d-bp67acfmxazb4p****", "d-bp67acfmxazb4g****", … "d-bp67acfmxazb4d****"] |
| InstanceId |
string |
No |
The ID of the instance to which the disk is attached. |
i-bp67acfmxazb4q**** |
| DiskType |
string |
No |
The type of the disk. 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 state of the disk. For more information, see Disk states. Valid values:
Default value: All. |
All |
| SnapshotId |
string |
No |
The ID of the snapshot that was 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 the disk is released when the instance is released. Valid values:
Default value: false. |
false |
| DeleteAutoSnapshot |
boolean |
No |
Specifies whether to release the automatic snapshots of the disk when the disk is released. Valid values:
Default value: false. |
false |
| PageNumber |
integer |
No |
Note
This parameter is deprecated. Use the |
1 |
| PageSize |
integer |
No |
Note
This parameter is deprecated. Use the |
10 |
| NextToken |
string |
No |
The token used to start the next query. To retrieve the next page of results, set this parameter to the |
AAAAAdDWBF2**** |
| MaxResults |
integer |
No |
The number of entries to return on each 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 in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). |
testDiskName |
| AutoSnapshotPolicyId |
string |
No |
The ID of the automatic snapshot policy that is applied to the cloud disk. |
sp-m5e2w2jutw8bv31**** |
| EnableAutoSnapshot |
boolean |
No |
Specifies whether the automatic snapshot policy feature is enabled for the disk. Valid values:
Note
This parameter is deprecated. The automatic snapshot policy feature is enabled by default for all disks. You only need to apply an automatic snapshot policy to a disk. |
true |
| EnableAutomatedSnapshotPolicy |
boolean |
No |
Specifies whether an automatic snapshot policy is applied to the disk. Valid values:
Default value: false. |
false |
| DiskChargeType |
string |
No |
The billing method of the disk. Valid values:
|
PostPaid |
| LockReason |
string |
No |
The reason why the disk is locked. Valid values:
|
security |
| Filter.1.Key |
string |
No |
The key of the filter to use for the query. Set the value to |
CreationStartTime |
| Filter.2.Key |
string |
No |
The key of the filter to use for the query. Set the value to |
CreationEndTime |
| Filter.1.Value |
string |
No |
The value of the filter to use for the query. When you specify this parameter, you must also specify the |
2017-12-05T22:40Z |
| Filter.2.Value |
string |
No |
The value of the filter to use for the query. When you specify this parameter, you must also specify the |
2017-12-06T22:40Z |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the disk belongs. When you use this parameter to filter resources, the number of resources cannot exceed 1,000. Note
You cannot filter resources in the default resource group. |
rg-bp67acfmxazb4p**** |
| EnableShared |
boolean |
No |
Specifies whether the disk is a shared block storage device. |
false |
| Encrypted |
boolean |
No |
Specifies whether to query only encrypted disks. Valid values:
Default value: false. |
false |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run for the request. Valid values:
Default value: false. |
false |
| KMSKeyId |
string |
No |
The ID of the KMS key that is used to encrypt 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 tag key of the disk. Note
For better compatibility, we recommend that you use the |
null |
| Key |
string |
No |
The tag key of the disk. Note
For better compatibility, we recommend that you use the |
TestKey |
| Value |
string |
No |
The tag value of the disk. |
TestValue |
| value |
string |
No |
The tag value of the disk. |
null |
| AdditionalAttributes |
array |
No |
The additional attributes. Currently, the only valid value is Note
Currently, only regional redundant disks have a data placement location. |
IOPS |
|
string |
No |
An additional attribute. Currently, the only valid value is |
Placement |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The token returned to retrieve the next page of results. |
AAAAAdDWBF2**** |
| PageSize |
integer |
Note
This parameter is deprecated. We recommend that you use the |
1 |
| PageNumber |
integer |
Note
This parameter is deprecated. We recommend that you use the |
1 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of entries returned. Note
When you use the |
15 |
| Disks |
object |
||
| Disk |
array<object> |
The details of the disks. |
|
|
array<object> |
Details of 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 status 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 in private preview. |
null |
| EnableAutoSnapshot |
boolean |
Indicates whether an automatic snapshot policy is enabled for the disk. Note
This parameter is deprecated. By default, the automatic snapshot policy feature is enabled for newly created disks. You can apply an automatic snapshot policy to a disk to use this feature. |
false |
| StorageSetId |
string |
The ID of the storage set. |
ss-i-bp1j4i2jdf3owlhe**** |
| StorageSetPartitionNumber |
integer |
The maximum 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:
This setting does not affect snapshots created manually in the console or by calling the CreateSnapshot operation. Manually created snapshots are always retained. |
false |
| StorageClusterId |
string |
The ID of the dedicated block storage cluster to which the disk belongs. If your 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 I/O operations per second (IOPS). |
2000 |
| MountInstanceNum |
integer |
The number of instances to which the disk is attached. |
1 |
| Description |
string |
The description of the disk. |
testDescription |
| Device |
string |
The mount point of the disk on the instance, such as /dev/xvdb. Note the following:
Note
This parameter is deprecated. Use the |
/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 from which the disk was created. The value is empty if the disk was not created from an image or if the source image has been deleted. |
m-bp13aqm171qynt3u*** |
| KMSKeyId |
string |
The ID of the KMS key that is used to encrypt the disk. |
0e478b7a-4262-4802-b8cb-00d3fb408*** |
| DeleteWithInstance |
boolean |
Indicates whether the disk is released when its associated instance 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 from which the disk was created. The value 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 applied to the disk. Note
This parameter is deprecated. If multiple automatic snapshot policies are applied to the disk, only one of the policy IDs is returned. We recommend that you call the DescribeAutoSnapshotPolicyAssociations operation to query all automatic snapshot policies applied to the disk. |
sp-bp67acfmxazb4p**** |
| EnableAutomatedSnapshotPolicy |
boolean |
Indicates whether an automatic snapshot policy is applied to the disk. |
false |
| IOPSWrite |
integer |
The maximum number of write I/O operations per second (IOPS). |
2000 |
| InstanceId |
string |
The ID of the instance to which the disk is attached. Note the following:
|
i-bp67acfmxazb4q**** |
| IOPS |
integer |
The maximum number of read/write I/O operations per second (IOPS). |
4000 |
| RegionId |
string |
The ID of the region to which the disk belongs. |
cn-hangzhou |
| ExpiredTime |
string |
The expiration time of the subscription disk. |
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 is displayed in UTC and 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 of the disk on Alibaba Cloud Marketplace. |
jxsc000204 |
| MultiAttach |
string |
Indicates whether the multi-attach feature is enabled for the disk. |
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 details of the instances to which the disk is attached. This parameter is returned for multi-attach disks. |
|
|
object |
The information about an instance to which the disk is attached. |
||
| AttachedTime |
string |
The time when the disk was attached. The time is displayed in UTC and 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 tag value. |
TestValue |
| TagKey |
string |
The tag key. |
TestKey |
| Attachments |
object |
||
| Attachment |
array<object> |
The attachment information of the disk. |
|
|
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 is displayed in UTC. |
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 returned only when |
40000 |
| BurstingEnabled |
boolean |
Indicates whether the performance burst feature is enabled. Valid values:
This parameter is returned 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 data. This parameter is returned only when Note
Currently, only regional redundant ESSDs ( |
|
| ZoneIds |
string |
The availability zones where the data is actually stored. |
"["cn-hangzhou-b", "cn-hangzhou-j"]" |
| SourceDiskId |
string |
d-123********* |
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*********"
}
]
}
}
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.