Updated on 2024-08-28 GMT+08:00

Querying DR Instances in Batches

Function

This API is used to query DR instances in batches.

  • Before calling an API, you need to understand the API in Authentication.

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

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

Request

  • Parameter description

    None

  • URI example

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

  • Request example

    None

Response

  • Normal response
    Table 2 Parameter description

    Parameter

    Type

    Description

    instance_dr_relations

    Array of objects

    DR instance list.

    For details, see Table 3.

    Table 3 Data structure description of instance_dr_relations

    Parameter

    Type

    Description

    instance_id

    String

    Instance ID in the current region.

    master_instance

    Object

    Primary instance information.

    For details, see Table 4.

    slave_instances

    Array of objects

    DR instance information.

    For details, see Table 5.

    Table 4 Data structure description of master_instance

    Parameter

    Type

    Description

    instance_id

    String

    Instance ID.

    region

    String

    Region.

    project_id

    String

    Project ID.

    project_name

    String

    Project name.

    Table 5 Data structure description of slave_instances

    Parameter

    Type

    Description

    instance_id

    String

    Instance ID.

    region

    String

    Region.

    project_id

    String

    Project ID.

    project_name

    String

    Project name.

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