Querying Instance Disk Information
API Description
This API is used to query instance disk information.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
dds:instance:getDiskUsage
read
instance
dds:instance:list
-
URI
- URI format
- 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
None
Response
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot