All Products
Search
Document Center

ENS:DescribeDisks

Last Updated:Jul 26, 2024

Queries the information about one or more disks.

Debugging

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:DescribeDisksget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnsRegionIdstringNo

The ID of the edge node.

cn-kunming-telecom
DiskIdstringNo

The ID of the disk.

d-5soak1gqa507lyfzvz0xo****
DiskNamestringNo

The name of the disk.

DiskName
PageNumberstringNo

The number of the page to return. Pages start from page 1.

Default value: 1.

1
PageSizestringNo

The number of entries to return on each page. Maximum value: 50.

Default value: 10.

10
StatusstringNo

The status of the disk. Valid values:

  • In-use: The disk is in use.
  • Available: The disk can be attached.
  • Attaching: The disk is being attached.
  • Detaching: The disk is being detached.
  • Creating: The disk is being created.
  • ReIniting: The disk is being reset.
  • Deleting: The disk is being released.
  • Deleted: The disk is released.
  • Expiring: The disk is about to expire.
Available
TypestringNo

The type of the disk. Valid values:

  • system: system disk.
  • data: data disk.
system
CategorystringNo

The category of the disk.

  • cloud_efficiency: ultra disk.
  • cloud_ssd: all-flash disk.
  • local_hdd: local HDD.
  • local_ssd: local SSD.
local_ssd
DiskChargeTypestringNo

The billing method.

  • prePay: subscription.
  • postpay: pay-as-you-go.
prepay
EnsRegionIdsstringNo

The node information.

["cn-suzhou-telecom","cn-chengdu-telecom"]
DiskIdsstringNo

The ID of the disk.

[\"d-wz99njena32z90ki****\"]
OrderByParamsstringNo

The order in which you want to sort the returned data. Example: {"EnsRegionId":"desc"}. By default, the nodes are sorted by IDs in descending order.

{ "DiskNameSort":"desc","EnsRegionIdSort":"asc" }
DiskTypestringNo

The purchase method of the disk. Valid values:

  • ServiceDisk: The disk is purchased when ENS is activated.
  • ResoureDisk: The disk is purchased when the instance is created.
  • PostPayDisk: The disk is separately purchased.
PostPayDisk
InstanceIdstringNo

The ID of the instance to which the disk is attached.

i-5t77rb0yoz79m28ku60sx****
SnapshotIdstringNo

The ID of the snapshot.

s-897654321****

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The returned service code. 0 indicates that the request was successful.

0
Disksarray<object>

The information about the disks.

object
Categorystring

The category of the disk.

  • cloud_efficiency: ultra disk.
  • cloud_ssd: all-flash disk.
  • local_hdd: local HDD.
  • local_ssd: local SSD.
local_ssd
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 displayed in UTC.

2021-11-11T14:34:55+08:00
DiskChargeTypestring

The billing method of the cloud disk or local disk. Valid values:

  • prepaid: subscription.
  • postpaid: pay-as-you-go.
prepaid
DiskIdstring

The ID of the disk.

d-5svum1dx1w4a4spr54lgr****
DiskNamestring

The name of the disk.

fvt-ecs-5cf0****
EnsRegionIdstring

The ID of the edge node.

cn-guangzhou-10
InstanceIdstring

The ID of the instance.

i-5t77rb0yoz79m28ku60sx****
InstanceNamestring

The name of the instance.

Sizeinteger

The size of the disk. Unit: MiB.

20
Statusstring

The status of the disk. Valid values:

  • In-use: The disk is in use.
  • Available: The disk can be attached.
  • Attaching: The disk is being attached.
  • Detaching: The disk is being detached.
  • Creating: The disk is being created.
  • ReIniting: The disk is being reset.
Available
Typestring

The type of the cloud disk or local disk. Valid values:

  • 1: system disk.
  • 2: data disk.
1
Portableboolean

Indicates whether the cloud disk or local disk is removable. Valid values:

  • true: The disk is removable. A removable disk can independently exist and can be attached to or detached from an instance within the same zone.
  • false: The disk is not removable. A disk that is not removable cannot independently exist or be attached to or detached from an instance within the same zone.

If disks are of the following categories or types, the Portable value is false and the disks have the same lifecycle as their attached instances:

  • Local HDDs
  • Local SSDs
  • Data disks that use the subscription billing method
true
SnapshotIdstring

The ID of the snapshot.

s-bp67acfmxazb4p****
SerialIdstring

The serial number.

123
Encryptedboolean

Indicates whether the cloud disk is encrypted. Valid values:

  • true
  • false
False
EncryptedKeyIdstring

The ID of the Key Management Service (KMS) key that is used for the cloud disk.

05467897a-4262-4802-b8cb-00d3fb40****
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page. Maximum value: 50. Default value: 10.

50
RequestIdstring

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984
TotalCountinteger

The total number of returned pages.

13

Examples

Sample success responses

JSONformat

{
  "Code": 0,
  "Disks": {
    "Disks": [
      {
        "Category": "local_ssd",
        "CreationTime": "2021-11-11T14:34:55+08:00",
        "DiskChargeType": "prepaid",
        "DiskId": "d-5svum1dx1w4a4spr54lgr****",
        "DiskName": "fvt-ecs-5cf0****",
        "EnsRegionId": "cn-guangzhou-10",
        "InstanceId": "i-5t77rb0yoz79m28ku60sx****",
        "InstanceName": "",
        "Size": 20,
        "Status": "Available",
        "Type": "1",
        "Portable": true,
        "SnapshotId": "s-bp67acfmxazb4p****",
        "SerialId": "123",
        "Encrypted": true,
        "EncryptedKeyId": "05467897a-4262-4802-b8cb-00d3fb40****"
      }
    ]
  },
  "PageNumber": 1,
  "PageSize": 50,
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "TotalCount": 13
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameter domainName that is mandatory for processing this request is not supplied.-
400InstanceIdNotFoundThe input parameter instancdId that is not found.The specified instance ID does not exist.
400NoPermissionPermission denied.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

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

Change history

Change timeSummary of changesOperation
2023-11-14The Error code has changed. The response structure of the API has changedView Change Details
2023-10-17The Error code has changed. The response structure of the API has changedView Change Details
2023-07-20API Description Update. The Error code has changed. The response structure of the API has changedView Change Details
2023-03-02The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2021-10-28Add OperationView Change Details