Updated on 2025-08-22 GMT+08:00

Querying Instance Disk Information

API Description

This API is used to query instance disk information.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/disk-usage

  • URI example
    https://dds.cn-north-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/520c58ba00a3497e97ce0b9604874dd6in02/disk-usage
    Table 1 Request parameters

    Name

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    Definition

    User token obtained from IAM. For details, see Authentication.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    project_id

    Yes

    String

    Definition

    Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    String

    Definition

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request Parameters

None

Response Parameters

  • Parameter description
    Table 2 Response body parameters

    Name

    Type

    Description

    volumes

    Array of Table 3 objects

    Definition

    Disk information list.

    Range

    N/A

    Table 3 DiskVolumes

    Name

    Type

    Description

    entity_id

    String

    Definition

    Instance ID, group ID, or node ID. To obtain the value, call the API for Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

    Range

    N/A

    entity_name

    String

    Definition

    Instance name, group name, or node name.

    Range

    N/A

    group_type

    String

    Definition

    Group type.

    Range

    • mongos: the mongos node type.
    • shard: the shard node type.
    • config: the config node type.
    • replica: the replica set type.
    • single: the single node type.
    • readonly: the read replica type.

    used

    String

    Definition

    Used capacity. The value contains two decimal places. The unit is GB.

    Range

    N/A

    size

    String

    Definition

    Total size, in GB.

    Range

    N/A

Example Request

GET https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/520c58ba00a3497e97ce0b9604874dd6in02/disk-usage

Example Response

Status code: 200

Success.

{    
  "volumes" : [ {     
   "entity_id" : "f04553d9ad2942e7a44facc518dc5699gr02",   
   "entity_name" : "single01",   
   "group_type" : "single",   
   "used" : "3.18",    
   "size" : "60"  
  } ]  
}

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.