Querying Capacity Statistics
Function
This API is used to query capacity statistics.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
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, no identity policy-based permission required for calling this API.
URI
GET /v3/{project_id}/storage_usage
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Definition Query records. Constraints N/A Range A positive integer Default Value N/A |
| offset | No | Integer | Definition Offset. Constraints N/A Range An integer greater than or equal to 0 Default Value N/A |
| resource_id | No | String | Definition Resource ID. Constraints N/A Range 32 hexadecimal digits (UUID format) Default Value N/A |
| resource_type | No | String | Resource type. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| resource_count | Integer | Number of resources that meet the filter criteria |
| storage_usage | Array of StorageUsage objects | Capacity statistics |
| Parameter | Type | Description |
|---|---|---|
| backup_count | Integer | Number of backups |
| backup_size | Integer | Backup capacity |
| resource_id | String | Definition Resource ID. Range 32 hexadecimal digits (UUID format) |
| resource_name | String | Definition Name of the resource to be backed up. Range Length: 0 to 255 characters |
| resource_type | String | Type of the resource to be backed up: OS::Nova::Server: ECSs; OS::Cinder::Volume: EVS disks; OS::Ironic::BareMetalServer: BMSs; OS::Sfs::Turbo: SFS Turbo file systems; OS::Workspace::DesktopV2: Workspace desktops |
| backup_size_multiaz | Integer | Definition Multi-AZ backup size in MB. Range N/A |
Example Requests
None
Example Responses
Status code: 200
OK
{
"storage_usage" : [ {
"resource_name" : "ECS_name",
"resource_id" : "89d466e5-b7f9-4e45-807a-d5f17f44fc84",
"backup_size" : 0,
"backup_count" : 1,
"resource_type" : "OS::Nova::Server",
"backup_size_multiaz" : 0
} ],
"resource_count" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
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