Obtaining Instance Backup Statistics
Function
This API is used to obtain instance backup statistics.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions 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 |
|---|---|---|---|---|---|
|
rds:instance:listAll |
read |
- |
- |
rds:instance:list |
- |
URI
- Parameter description
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Definition Project ID of a tenant in a region. Constraints The value cannot be empty. Range To obtain the value, see Obtaining a Project ID. Default Value N/A |
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
engine |
No |
String |
Definition DB engine name. Constraints Only RDS for MySQL is supported. Range mysql Default Value N/A |
|
order_field |
No |
String |
Definition Field based on which the query results are sorted. Constraints N/A Range
Default Value N/A |
|
order_rule |
No |
String |
Definition Sorting rule. Constraints N/A Range
Default Value DESC |
|
instance_id |
String |
No |
Definition Instance ID. Constraints N/A Range You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances. Default Value N/A |
|
instance_name |
String |
No |
Definition Instance name. Fuzzy match is supported. Constraints N/A Range N/A Default Value N/A |
|
offset |
Integer |
No |
Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints N/A Range An integer greater than or equal to 0 Default Value 0 |
|
limit |
Integer |
No |
Definition Number of records returned by a query. Constraints N/A Range The value must be a positive integer ranging from 1 to 50. Default Value 10 |
Example Request
Query instance backup statistics.
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/backups/summary?engine=mysql
{
}
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
infos
Array of Object
Definition
Instance backup statistics list. For details, see Table 4.
total_count
Integer
Definition
Total number of records.
Range
N/A
Table 4 infos field description Parameter
Type
Description
id
String
Definition
Instance ID.
Range
N/A
name
String
Definition
Instance name.
Range
N/A
backup_use_space
Double
Definition
Total usage of backup data (in MB), including log backups and snapshot backups.
Range
N/A
datastore
Object
Definition
DB engine information. For details, see Table 5.
spaces
Object
Definition
Backup usage details. For details, see Table 6.
Table 5 datastore field description Parameter
Type
Description
type
String
Definition
DB engine type.
Range
N/A
version
String
Definition
DB engine version.
Range
N/A
Table 6 spaces field description Parameter
Type
Description
obs
Double
Definition
Log backup usage, in MB.
Range
N/A
snapshot
Double
Definition
Space usage of CBR snapshot backups billed by RDS, in MB.
Range
N/A
obs_free
Double
Definition
Free space for log backups, in GB.
Range
N/A
snapshot_free
Double
Definition
Free space for snapshot backups, in GB.
Range
N/A
- Example normal response
{ "infos": [ { "instance_id": "3c96029500994cba823e3e9faa557c03in01", "name": "rds-test", "backup_used_space": 2308.01, "space": { "obs": 0.01, "snapshot": 2308.0, "obs_free": 100.0, "snapshot_free": 300.0 }, "datastore": { "type": "mysql", "version": "8.0.41" } } ], "total": 1 }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, 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