Queries details about one or more created disks in a specified region.

Description

You can specify multiple request parameters such as InstanceId and DiskIds to be queried. Specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions.

QPS limits

The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou

The ID of the region.

InstanceId String No 2ad1ae67295445f598017499dc****

The ID of the simple application server.

DiskIds String No ["d-bp14wq0149cpp2x****", "d-bp14wq0149cpp2y****"]

The IDs of the disks. The value can be a JSON array that consists of up to 100 disk IDs. Separate the disk IDs with commas (,).

PageSize Integer No 10

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

PageNumber Integer No 1

The number of the page to return.

Default value: 1.

Action String Yes ListDisks

The operation that you want to perform. Set the value to ListDisks.

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The total number of disks.

RequestId String 20758A-585D-4A41-A9B2-28DA8F4F534F

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

Disks Array of Disk

Details about the disks.

CreationTime String 2021-03-08T05:31:06Z

The time when the disk was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Status String In_use

The status of the disk. Valid values:

  • ReIniting: The disk is being initialized.
  • Creating: The disk is being created.
  • In_Use: The disk is being used.
  • Available: The disk can be attached.
  • Attaching: The disk is being attached.
  • Detaching: The disk is being detached.
Device String /dev/xvda

The device name of the disk on the simple application server.

Size Integer 50

The size of the disk. Unit: GB.

DiskName String SystemDisk

The name of the disk.

DiskChargeType String PrePaid

The billing method of the disk.

DiskType String System

The type of the disk. Valid values:

  • System: system disk
  • data: data disk
Category String ESSD

The category of the disk. Valid values:

  • ESSD: enhanced SSD (ESSD) at performance level 0 (PL0)
  • SSD: standard SSD
DiskId String d-bp14wq0149cpp2x****

The ID of the disk.

InstanceId String 2ad1ae67295445f598017499dc****

The ID of the simple application server to which the disk is attached.

RegionId String cn-hangzhou

The ID of the region.

Examples

Sample requests

https://swas.cn-hangzhou.aliyuncs.com/?Action=ListDisks
&InstanceId=2ad1ae67295445f598017499dc****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListDisksResponse>
    <TotalCount>1</TotalCount>
    <RequestId>20758A-585D-4A41-A9B2-28DA8F4F534F</RequestId>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
    <Disks>
        <DiskType>System</DiskType>
        <Status>In_use</Status>
        <Category>ESSD</Category>
        <InstanceId>2ad1ae67295445f598017499dc****</InstanceId>
        <Size>50</Size>
        <Device>/dev/xvda</Device>
        <CreationTime>2021-03-08T05:31:06Z</CreationTime>
        <DiskChargeType>PrePaid</DiskChargeType>
        <RegionId>cn-hangzhou</RegionId>
        <DiskName>SystemDisk</DiskName>
        <DiskId>d-bp14wq0149cpp2x****</DiskId>
    </Disks>
</ListDisksResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "RequestId" : "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "PageSize" : 10,
  "PageNumber" : 1,
  "Disks" : [ {
    "DiskType" : "System",
    "Status" : "In_use",
    "Category" : "ESSD",
    "InstanceId" : "2ad1ae67295445f598017499dc****",
    "Size" : 50,
    "Device" : "/dev/xvda",
    "CreationTime" : "2021-03-08T05:31:06Z",
    "DiskChargeType" : "PrePaid",
    "RegionId" : "cn-hangzhou",
    "DiskName" : "SystemDisk",
    "DiskId" : "d-bp14wq0149cpp2x****"
  } ]
}

Error codes

HTTP status code Error code Error message Description
403 InvalidParam The specified parameter value is invalid. The error message returned because a specified parameter is invalid.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter is invalid.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket.

For a list of error codes, visit the API Error Center.