Domain name for API request: cbs.tencentcloudapi.com.
This API (DescribeDisks) is used to query the list of cloud disks.
Filter
.Limit
; the default is 20) of cloud disk lists are returned to the current user.A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeDisks. |
Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
Region | No | String | Common Params. This parameter is not required for this API. |
DiskIds.N | No | Array of String | Query by one or more cloud disk IDs, such as disk-11112222 . For the format of this parameter, please see the ids.N section of the API Introduction. This parameter does not support specifying both DiskIds and Filters . |
Filters.N | No | Array of Filter | Filters. You cannot specify DiskIds and Filters at the same time. disk-11112222 . tag-key with a specific tag key. |
Offset | No | Integer | Offset. Default is 0. For more information on Offset , please see relevant sections in API Introduction. |
Limit | No | Integer | Number of results to be returned. Default is 20. Maximum is 100. For more information on Limit , please see relevant sections in API Introduction. |
Order | No | String | Outputs the ordering of the cloud disk list. Value range: |
OrderField | No | String | The field by which the cloud disk list is sorted. Value range: By default, the cloud disk list is sorted by the creation time of cloud disks. |
ReturnBindAutoSnapshotPolicy | No | Boolean | Whether the ID of the periodic snapshot policy bound to the cloud disk needs to be returned in the cloud disk details. TRUE: return; FALSE: do not return. |
Parameter Name | Type | Description |
---|---|---|
TotalCount | Integer | The quantity of cloud disks meeting the conditions. |
DiskSet | Array of Disk | List of cloud disk details. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to query all attached data disks.
POST / HTTP/1.1
Host: cbs.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDisks
<Common request parameters>
{
"Filters": [
{
"Values": [
"ATTACHED"
],
"Name": "disk-state"
},
{
"Values": [
"DATA_DISK"
],
"Name": "disk-usage"
}
]
}
{
"Response": {
"TotalCount": 1,
"RequestId": "e2386a23-48c1-4c18-9a36-4e7354f333b2",
"DiskSet": [
{
"DeleteWithInstance": false,
"Encrypt": false,
"DiskType": "CLOUD_BASIC",
"AutoRenewFlagError": false,
"Rollbacking": false,
"RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
"DiskName": "test",
"Tags": [],
"InstanceId": "",
"DifferDaysOfDeadline": 1,
"DiskId": "disk-b94t5dzt",
"DiskState": "ATTACHED",
"Placement": {
"ProjectId": 0,
"Zone": "ap-guangzhou-2"
},
"IsReturnable": false,
"DeadlineTime": "2018-10-26 10:55:43",
"Attached": true,
"DiskSize": 10,
"DiskUsage": "DATA_DISK",
"Portable": true,
"DiskChargeType": "PREPAID",
"SnapshotAbility": true,
"DeadlineError": false,
"RollbackPercent": 100,
"AutoSnapshotPolicyIds": null,
"ReturnFailCode": 3,
"CreateTime": "2018-09-26 17:36:07",
"ThroughputPerformance": 1,
"Migrating": true,
"InstanceIdList": [
"ins-test1234"
],
"Shareable": true,
"MigratePercent": 100,
"SnapshotSize": 100,
"SnapshotCount": 0,
"BackupDisk": true,
"AttachMode": "PF",
"DiskBackupQuota": 1,
"DiskBackupCount": 1,
"DeleteSnapshot": 0,
"InstanceType": "CVM"
}
]
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InvalidFilter | The specified Filter is not supported. |
InvalidParameterValue | Invalid parameter value. |
MissingParameter | Missing parameter. |
UnsupportedOperation | Unsupported operation |
Was this page helpful?