Querying Databases That Can Be Restored to a Specified Point in Time
Function
This API is used to query databases that can be restored to a specified point in time.
- 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:backup:list |
list |
- |
- |
- |
- |
Constraints
This API is only available to RDS for MySQL and RDS for PostgreSQL.
URI
- URI format
- Parameter description
Table 1 Parameters 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
engine
Yes
Definition
DB engine.
Constraints
N/A
Range
The value can be mysql or postgresql (case-insensitive).
Default Value
N/A
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance_ids |
Yes |
Array of strings |
Definition Instance IDs. 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 |
|
restore_time |
Yes |
Long |
Definition Restoration time point. A timestamp in milliseconds is used. Constraints N/A Range N/A Default Value N/A |
|
database_name_like |
No |
String |
Definition Database name, which can be used for fuzzy query. The database name cannot contain Chinese characters. Constraints N/A Range N/A Default Value N/A |
|
instance_name_like |
No |
String |
Definition Instance name, which can be used for fuzzy query. Constraints N/A Range N/A Default Value N/A |
Example Request
Query the databases that can be restored to a specified point in time of an RDS for MySQL instance.
{
"instance_ids" : [ "5d742eda6e574ff3a003191638ef8c51in01" ],
"restore_time" : 1688554422000,
"database_name_like" : "",
"instance_name_like" : ""
}
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
database_limit
Integer
Definition
Maximum number of databases that can be restored for a single instance. If the number of databases queried exceeds this limit, only the databases within this limit are returned in the response.
Range
N/A
table_limit
Integer
Definition
Maximum number of tables in all databases that can be restored for a single instance. If the number of tables queried exceeds this limit, only the databases whose total number of tables is within this limit are returned in the response.
Range
N/A
instances
Array of objects
Definition
Instance information. For details, see Table 4.
Table 4 Data structure of the instances field Parameter
Type
Description
id
String
Definition
Instance ID.
Range
N/A
name
String
Definition
Instance name.
Range
N/A
total_tables
Integer
Definition
Total number of tables in all restorable databases of the instance. This value cannot exceed the value of table_limit.
Range
N/A
databases
Array of objects
Definition
Database information. For details, see Table 5.
- Example normal response
Querying databases that can be restored to a specified point in time:
{ "instances": [ { "id": "5d742eda6e574ff3a003191638ef8c51in01", "name": "AUTO-GENERATED-INSTANCE-57-HA-LOCALSSD", "databases": [ { "name": "dbtest", "total_tables": 1 }, { "name": "dbtest_restore", "total_tables": 1 } ], "total_tables": 2 } ], "database_limit": 2000, "table_limit": 20000 } - 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