Updated on 2025-12-09 GMT+08:00

Querying DR relationships

Function

This API is used to query DR relationships.

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 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

-

Constraints

DR relationship query is supported only for RDS for PostgreSQL 12 and later.

URI

  • URI format

    POST /v3/{project_id}/instances/disaster-recovery-infos

  • 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

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

id

No

String

Definition

DR relationship ID.

Constraints

N/A

Range

N/A

Default Value

N/A

status

No

String

Definition

DR configuration status.

Constraints

N/A

Range

N/A

Default Value

N/A

master_instance_id

No

String

Definition

Primary instance ID.

Constraints

N/A

Range

N/A

Default Value

N/A

master_region

No

String

Definition

Region where the primary instance is located.

Constraints

N/A

Range

N/A

Default Value

N/A

slave_instance_id

No

String

Definition

DR instance ID.

Constraints

N/A

Range

N/A

Default Value

N/A

slave_region

No

String

Definition

Region where the DR instance is located.

Constraints

N/A

Range

N/A

Default Value

N/A

create_at_start

No

Long

Definition

Creation start time.

Constraints

N/A

Range

N/A

Default Value

N/A

create_at_end

No

Long

Definition

Creation end time.

Constraints

N/A

Range

N/A

Default Value

N/A

order

No

String

Definition

Sorting order.

Constraints

N/A

Range

  • DESC: descending order
  • ASC: ascending order

Default Value

DESC

sort_field

No

String

Definition

Sorting field.

Constraints

N/A

Range

  • status: Data is sorted by DR configuration status.
  • time: Data is sorted by DR configuration time.
  • master_region: Data is sorted by region where the primary instance is located.
  • slave_region: Data is sorted by region where the DR instance is located.

Default Value

time

offset

No

Integer

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

N/A

Range

The value must be a non-negative number.

Default Value

0: The query starts from the first data record.

limit

No

Integer

Definition

Number of records returned by a query.

Constraints

N/A

Range

The value must be a positive integer ranging from 1 to 100.

Default Value

10

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

    Definition

    Total number of records.

    Range

    N/A

    instance_dr_infos

    Array of objects

    Definition

    DR information.

    For details, see Table 4.

    Table 4 instance_dr_infos field description

    Parameter

    Type

    Description

    id

    String

    Definition

    DR relationship ID.

    Range

    N/A

    status

    String

    Definition

    DR configuration status.

    Range

    N/A

    failed_message

    String

    Definition

    Failure message.

    Range

    N/A

    replica_state

    String

    Definition

    Synchronization status.

    Range

    • 0: normal
    • -1: abnormal

    wal_write_receive_delay_in_mb

    String

    Definition

    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.

    Range

    N/A

    wal_write_replay_delay_in_mb

    String

    Definition

    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.

    Range

    N/A

    wal_receive_replay_delay_in_ms

    String

    Definition

    Replay delay, in milliseconds, on the DR instance.

    Range

    N/A

    master_instance_id

    String

    Definition

    Primary instance ID.

    Range

    N/A

    master_region

    String

    Definition

    Region where the primary instance is located.

    Range

    N/A

    slave_instance_id

    String

    Definition

    DR instance ID.

    Range

    N/A

    slave_region

    String

    Definition

    Region where the DR instance is located

    Range

    N/A

    build_process

    String

    Definition

    Process for configuring disaster recovery (DR).

    Range

    • master: process of configuring DR capability for the primary instance
    • slave: process of configuring DR for the DR instance

    time

    Long

    Definition

    DR configuration time.

    Range

    N/A

  • 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

Error Code

For details, see Error Codes.