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

Querying DR Instances in Batches

Function

This API is used to query DR instances in batches.

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

RDS for PostgreSQL 12 and later versions support cross-cloud or cross-region DR.

URI

  • URI format

    GET /v3/{project_id}/instances/disaster-recovery-relation

  • 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

  • Parameter description

    None

  • URI example

    GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/disaster-recovery-relation

  • Request example

    None

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    instance_dr_relations

    Array of objects

    Definition

    DR instance list.

    For details, see Table 3.

    Table 3 Data structure description of instance_dr_relations

    Parameter

    Type

    Description

    instance_id

    String

    Definition

    Instance ID in the current region.

    Range

    N/A

    master_instance

    Object

    Definition

    Primary instance information.

    For details, see Table 4.

    slave_instances

    Array of objects

    Definition

    DR instance information.

    For details, see Table 5.

    Table 4 Data structure description of master_instance

    Parameter

    Type

    Description

    instance_id

    String

    Definition

    Instance ID.

    Range

    N/A

    region

    String

    Definition

    Region.

    Range

    N/A

    project_id

    String

    Definition

    Project ID.

    Range

    N/A

    project_name

    String

    Definition

    Project name.

    Range

    N/A

    Table 5 Data structure description of slave_instances

    Parameter

    Type

    Description

    instance_id

    String

    Definition

    Instance ID.

    Range

    N/A

    region

    String

    Definition

    Region.

    Range

    N/A

    project_id

    String

    Definition

    Project ID.

    Range

    N/A

    project_name

    String

    Definition

    Project name.

    Range

    N/A

  • Example normal response
    {
       "instance_dr_relations": [
          {
             "instance_id": "b5e2c7fcef8b4c2f8fd8d80d73344756in03",
             "master_instance": {
                "instance_id": "fab4e3df67c24aa0a5b41bc2bcb41918in03",
                "region": "aRegion",
                "project_id": "08fd4e669e00d57d2ffec01352c7cb77",
                "project_name": "masterProjectName"
             }
          },
          {
             "instance_id": "fab4e3df67c24aa0a5b41bc2bcb41918in03",
             "slave_instances": [
                {
                   "instance_id": "b5e2c7fcef8b4c2f8fd8d80d73344756in03",
                   "region": "bRegion",
                   "project_id": "054b61972980d4552f0bc00ac8d3f5cd",
                   "project_name": "slaveProjectName"
                }
             ]
          }
       ]
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.