Querying the Databases That Can Be Restored to the Primary DB Instance from a Read Replica
Function
This API is used to query the databases that can be restored to the primary DB instance from a read replica.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
- To use this function, contact customer service.
- This API is available only to read replicas of RDS for PostgreSQL 12 or later.
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
ID of the instance to be queried.
Constraints
N/A
Range
N/A
Default Value
N/A
Request Parameters
None
Example Request
Query the databases that can be restored to the primary DB instance from a read replica.
GET https://rds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/e28979107ed04d3b8b2f1b819b8d2be3in03/log-replay/database
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
database_limit
Integer
Definition
Maximum number of databases that can be returned each time.
Range
N/A
total_tables
Integer
Definition
Total number of returned tables.
Range
N/A
table_limit
Integer
Definition
Maximum number of tables that can be returned each time.
Range
N/A
databases
Array of objects
Definition
Databases that can be restored to the primary instance.
For details, see Table 3.
Table 3 databases field data structure description Parameter
Type
Description
name
String
Definition
Database name.
Range
N/A
total_tables
Integer
Definition
Total number of tables in the database.
Range
N/A
schemas
Array of objects
Definition
Schemas in the database.
For details, see Table 4.
Table 4 schemas field data structure description Parameter
Type
Description
name
String
Definition
Schema name.
Range
N/A
total_tables
Integer
Definition
Total number of tables in the schema.
Range
N/A
tables
Array of objects
Definition
Tables in the schema.
For details, see Table 5.
- Example normal response
{ "databases" : [ { "name" : "postgres", "schemas" : [ ], "total_tables" : 0 } ], "database_limit" : 2000, "table_limit" : 20000, "total_tables" : 0 }
- 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