DescribeDisks

1. API Description

This API is used to query the details of disks.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

diskIds

No

Array of String

ID list of disks.

diskName

No

String

Disk name.

diskStatus

No

String

Disk status.

diskType

No

String

Storage type.

  • System: the Boot Disk.

  • Data: the Disk.

diskCategory

No

String

Disk type.

  • Standard: the Standard NVMe SSD.

  • SSD: the Basic NVMe SSD.

instanceId

No

String

Instance ID.

zoneId

No

String

Availability zone ID.

pageSize

No

Integer

Number of items in the current page result.

Default value: 20;

Maximum value: 1000.

pageNum

No

Integer

Number of pages returned.

Default value: 1.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

totalCount

Integer

Number of disks meeting the filtering conditions.

dataSet

Information on disks.

4. Code Example

Query the details of disks.

POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeDisks
<Common Request Params>

Request:
{
  "diskStatus": "AVAILABLE",
  "diskSize": 20,
  "zoneId": "SIN-E"
}

Response:
{
  "requestId": "T83B6A963-B111-4BF9-8466-1C3351E2DFD1",
  "response": {
    "requestId": "T83B6A963-B111-4BF9-8466-1C3351E2DFD1",
    "dataSet": [
      {
        "diskName": "default-SIN-20GB-01",
        "period": 1,
        "instanceName": "Test-Instanc",
        "chargeType": "PREPAID",
        "portable": true,
        "expiredTime": "2023-02-01T00:00:00Z",
        "diskSize": 20,
        "instanceId": "your-instance-id-1",
        "createTime": "2023-02-01T00:00:00Z",
        "zoneId": "SIN-E",
        "diskStatus": "AVAILABLE",
        "diskId": "disk-id-1",
        "diskType": "DATA",
        "diskCategory": "STANDARD",
        "resourceGroupId": "xxx",
        "resourceGroupName": "xxx"
      }
    ],
    "totalCount": 2
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

HTTP Status Code
Error Code
Description

404

INVALID_ZONE_NOT_FOUND

Availability zone does not exist.

Last updated