Querying DR relationships
Function
This API is used to query DR relationships.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
DR relationship query is supported only for RDS for PostgreSQL 12 and later.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
DR relationship ID. |
status |
No |
String |
DR configuration status. |
master_instance_id |
No |
String |
Primary instance ID. |
master_region |
No |
String |
Region where the primary instance is located. |
slave_instance_id |
No |
String |
DR instance ID. |
slave_region |
No |
String |
Region where the DR instance is located. |
create_at_start |
No |
Long |
Creation start time. |
create_at_end |
No |
Long |
Creation end time. |
order |
No |
String |
Sorting order.
Default value: DESC |
sort_field |
No |
String |
Sorting field.
Default value: time |
offset |
No |
Integer |
Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. |
limit |
No |
Integer |
Number of records to be queried. The default value is 10. The value must be a positive integer. The minimum value is 1 and the maximum value is 100. |
Example Request
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/disaster-recovery-infos { "status": "normal", "order": "ASC", "sort_field": "time", "offset": 0, "limit": 10 }
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
total_count
Integer
Total number of records.
instance_dr_infos
Array of objects
DR information.
For details, see Table 4.
Table 4 instance_dr_infos field description Parameter
Type
Description
id
String
DR relationship ID.
status
String
DR configuration status.
failed_message
String
Failure message.
replica_state
String
Synchronization status. The value can be 0 or -1. The value 0 indicates that the synchronization is normal, and -1 indicates that the synchronization is abnormal.
wal_write_receive_delay_in_mb
String
WAL send lag volume, in MB. It means the difference between the WAL Log Sequence Number (LSN) written by the primary instance and the WAL LSN received by the DR instance.
wal_write_replay_delay_in_mb
String
End-to-end delayed WAL size, in MB. It refers to the difference between the WAL LSN written by the primary instance and the WAL LSN replayed by the DR instance.
wal_receive_replay_delay_in_ms
String
Replay delay, in milliseconds, on the DR instance.
master_instance_id
String
Primary instance ID.
master_region
String
Region where the primary instance is located.
slave_instance_id
String
DR instance ID.
slave_region
String
Region where the standby instance is located
build_process
String
Process for configuring disaster recovery (DR).
- master: process of configuring DR capability for the primary instance
- slave: process of configuring DR for the DR instance
time
Long
DR configuration time.
- Example normal response
{ "total_count": 1, "instance_dr_infos": [ { "id": "57160f82-e6bb-44bc-80db-0d950d4f3b40", "status": "failed", "failed_message": "the network is disconnected", "replica_state": "0", "wal_write_receive_delay_in_mb": "10.0", "wal_write_replay_delay_in_mb": "10.0", "wal_receive_replay_delay_in_ms": "0", "master_instance_id": "fab4e3df67c24aa0a5b41bc2bcb41918in03", "master_region": "region-A", "slave_instance_id": "df50adb922ef42a495943b304f8aa551in03", "slave_region": " region-B", "time": 1702551254685 } ] }
- 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