All Products
Search
Document Center

Simple Application Server:ListDisks

Last Updated:Apr 17, 2024

Queries the information about disks in a region.

Operation description

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

QPS limit

You can call this API operation up to 10 times per minute per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the disks.

cn-hangzhou
InstanceIdstringNo

The ID of the simple application server.

2ad1ae67295445f598017499dc****
DiskIdsstringNo

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

["d-bp14wq0149cpp2x****", "d-bp14wq0149cpp2y****"]
PageSizeintegerNo

The number of entries per page.

Maximum value: 100.

Default value: 10.

10
PageNumberintegerNo

The page number.

Default value: 1.

1
DiskTypestringNo

The type of the disk. Valid values:

  • System: system disk.
  • Data: data disk.

By default, system disks and data disks are both queried.

System
Tagobject []No

The tags of the disk.

KeystringNo

The key of tag N to be added to the disk. Valid values of N: 1 to 20.

TestKey
ValuestringNo

The value of tag N to be added to the disk. Valid values of N: 1 to 20.

TestValue

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of entries returned.

1
RequestIdstring

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F534F
PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
Disksobject []

The array of disks.

CreationTimestring

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 in UTC.

2021-03-08T05:31:06Z
Statusstring

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.
In_use
Devicestring

The device name of the server to which the disk is attached.

/dev/xvda
Sizeinteger

The size of the disk. Unit: GB.

50
DiskNamestring

The name of the disk.

SystemDisk
DiskChargeTypestring

The billing method of the disk.

PrePaid
DiskTypestring

The disk type. Valid values:

  • System: system disk.
  • Data: data disk.
System
Categorystring

The category of the disk. Valid values:

  • ESSD: enhanced SSD (ESSD) of PL0.
  • SSD: standard SSD.
  • CLOUD_EFFICIENCY:an ultra disk.
ESSD
DiskIdstring

The disk ID.

d-bp14wq0149cpp2x****
InstanceIdstring

The simple application server ID of the disk.

2ad1ae67295445f598017499dc****
RegionIdstring

The region ID.

cn-hangzhou
Remarkstring

The remarks of the disk.

remark
Tagsobject []

The tags of the disk.

Keystring

The key of tag N to be added to the disk. Valid values of N: 1 to 20.

TestKey
Valuestring

The value of tag N to be added to the disk. Valid values of N: 1 to 20.

TestValue
InstanceNamestring

The name of the simple application server.

myInstance

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
500InternalErrorAn error occurred while processing your request.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-20The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
Output ParametersThe response structure of the API has changed.
2023-05-25API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DiskType
Output ParametersThe response structure of the API has changed.