tencent cloud

APIs

DescribeDisks

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-05-12 19:37:57

1. API Description

Domain name for API request: cbs.intl.tencentcloudapi.com.

This API (DescribeDisks) is used to query the list of cloud disks.

  • The details of the cloud disk can be queried based on the ID, type or status of the cloud disk. The relationship between different conditions is AND. For more information about filtering, please see the Filter.
  • If the parameter is empty, a certain number (specified by 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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 Yes String Common Params. For more information, please see the list of regions supported by the product.
Filters.N No Array of Filter Filters. You cannot specify DiskIds and Filters at the same time.
  • disk-usage - Array of String - Optional - Filters by cloud disk type. (SYSTEM_DISK: system disk
  • Limit No Integer Number of results to be returned. Default is 20. Maximum is 100. For more information on disk-11112222, please see relevant sections in API Introduction.
    OrderField No String Field on which the list of cloud disks is sorted. valid values:
  • CREATE_TIME: sort by creation TIME of the cloud disk

  • DEADLINE: sort by expiration TIME of the cloud disk

  • sort by creation TIME by default.
    Offset No Integer Offset. Default is 0. For more information on tag-key, please see relevant sections in API Introduction.
    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.
    DiskIds.N No Array of String Query by one or more cloud disk IDs, such as Limit. For the format of this parameter, please see the ids.N section of the API Introduction. This parameter does not support specifying both Offset and disk-11112222.
    Order No String Specifies the sorting order of the cloud disk list. valid values:
  • ASC: ascending order

  • DESC: descending order.
  • .

    3. Output Parameters

    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, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying All Mounted Data Disks

    This example shows you how to query all mounted data disks.

    Input Example

    POST / HTTP/1.1
    Host: cbs.intl.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"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "RequestId": "e2386a23-48c1-4c18-9a36-4e7354f333b2",
            "DiskSet": [
                {
                    "DeleteWithInstance": false,
                    "Encrypt": false,
                    "DiskType": "CLOUD_BSSD",
                    "AutoRenewFlagError": false,
                    "Rollbacking": false,
                    "RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
                    "DiskName": "my-data-disk",
                    "Tags": [],
                    "InstanceId": "",
                    "DifferDaysOfDeadline": 1,
                    "DiskId": "disk-b94t5dzt",
                    "DiskState": "ATTACHED",
                    "Placement": {
                        "ProjectId": 0,
                        "Zone": "ap-guangzhou-3",
                        "ProjectName": "Default Project",
                        "CageId": "cage-bdq5l1mx",
                        "CdcName": "my-cloud-dedicated-cbs",
                        "CdcId": "cdc-1648zauv",
                        "DedicatedClusterId": "cluster-o42khj98"
                    },
                    "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-agp4l0lx"
                    ],
                    "Shareable": true,
                    "MigratePercent": 100,
                    "SnapshotSize": 100,
                    "SnapshotCount": 0,
                    "BackupDisk": true,
                    "AttachMode": "PF",
                    "DiskBackupQuota": 1,
                    "DiskBackupCount": 1,
                    "DeleteSnapshot": 0,
                    "InstanceType": "CVM",
                    "BurstPerformance": false,
                    "ErrorPrompt": "Detach disk timeout, please retry later",
                    "LastAttachInsId": "ins-agp4l0lx"
                }
            ]
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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

    도움말 및 지원

    문제 해결에 도움이 되었나요?

    피드백