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.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
Authorization Information
- 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.
- 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
- 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