Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ DR Instances (RDS for PostgreSQL)/ Querying Primary or DR Instances Available for Setting Up Disaster Recovery
Updated on 2026-07-21 GMT+08:00

Querying Primary or DR Instances Available for Setting Up Disaster Recovery

Function

This API is used to query primary or DR instances available for setting up disaster recovery.

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

This API is available only for RDS for PostgreSQL.

URI

  • URI format

    GET /v3/{project_id}/instances/disaster-recovery-instance?type={type}

  • 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

    type

    Yes

    Definition

    Type of the instance to be queried.

    Constraints

    The value cannot be empty.

    Range

    • master: primary instance
    • slave: DR instance

    Default Value

    N/A

Request

None

Example Request

Query primary or DR instances available for setting up disaster recovery.

GET https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/disaster-recovery-instance?type=master

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    instances

    Array of objects

    Definition

    Instance information list.

    For details, see Table 3.

    Table 3 instances field description

    Parameter

    Type

    Description

    instance_id

    String

    Definition

    Instance ID.

    Range

    N/A

    instance_name

    String

    Definition

    Instance name.

    Range

    N/A

  • Example normal response
    {
     "instances": [
            {
            "instance_id": "fab4e3df67c24aa0a5b41bc2bcb41918in03",
            "instance_name": "rds-test1"
             },
            {
            "instance_id": "b5e2c7fcef8b4c2f8fd8d80d73344756in03",
            "instance_name": "rds-test2"
           }
        ]
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.