Configuring the DR Capability for a DR Instance
Function
This API is used to configure the DR capability of a DR instance when establishing a cross-cloud DR relationship.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Constraints
- The DR capability for a DR instance can be configured only after the DR capability for a primary DB instance is configured. Otherwise, the DR relationship fails to be established.
- The primary DB instance and DR instance are available and are deployed in different clouds. The DR instance is deployed in standalone mode.
- The specifications of the DR instance are greater than or equal to the primary DB instance specifications.
- Only PostgreSQL 11, PostgreSQL 12, and PostgreSQL Enhanced Edition support cross-cloud DR relationships.
- Cross-cloud DR relationships cannot be established across major versions.
URI
- URI format
POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/action
- Example
https://rds.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in03/action
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Specifies the project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
Specifies the DB instance ID.
Request
- Parameter description
Table 2 Parameter description Name
Mandatory
Type
Description
build_slave_dr_relation
Yes
Object
Specifies the primary DB instance information required for configuring the DR relationship for the DR instance.
For details, see Table 3.
Table 3 build_slave_dr_relation field description Name
Mandatory
Type
Description
target_instance_id
Yes
String
Specifies the ID of the primary DB instance.
target_project_id
Yes
String
Specifies the project ID of the tenant to which the primary DB instance belongs.
target_region
Yes
String
Specifies the ID of the region where the primary DB instance resides.
target_ip
Yes
String
Specifies the data VIP of the primary DB instance.
- Request example
{ "build_slave_dr_relation": { "target_instance_id":"c39bd176fb0540929f6add80b91b212cin03", "target_project_id":"054b61972980d4552f0bc00ac8d3f5cd", "target_region":"cn-xianhz-1", "target_ip":"192.168.3.238" } }
Response
- Normal response
Table 4 Parameter description Name
Type
Description
job_id
String
Indicates the workflow ID.
- Example normal response
{ "job_id": "184f29cd-be1a-43f1-5b6bc5500e73" } - Abnormal response
For details, see Abnormal Request Results.
Last Article: Configuring the DR Capability for a Primary DB Instance
Next Article: Promoting a DR Instance to Be the Primary DB Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.