Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ DR Instances/ Removing the DR Relationship from a DB Instance
Updated on 2024-08-28 GMT+08:00

Removing the DR Relationship from a DB Instance

Function

This API is used to remove the DR relationship from a DB instance.

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

Constraints

  • RDS for PostgreSQL 12 and later versions support removal of cross-cloud or cross-region DR.
  • You need to remove the DR relationship from the DR instance first and then remove the DR relationship from the primary instance. Otherwise, an exception may occur.

URI

  • URI format

    DELETE /v3/{project_id}/instances/{instance_id}/delete-disaster-recovery

  • Parameter description

    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.

    instance_id

    Yes

    Instance ID.

Request

Table 1 Parameters

Parameter

Mandatory

Type

Description

target_instance_id

Yes

String

ID of the target instance.

target_project_id

Yes

String

ID of the project that the target instance belongs to.

target_region

Yes

String

Region where the target instance is located.

target_ip

Yes

String

Floating IP address of the target instance.

is_master

Yes

Boolean

Whether the operation object is the primary instance.

  • true: The operation object is the primary instance.
  • false: The operation object is the DR instance.

Example Request

Remove the DR relationship from a DB instance.

DELETE https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/42d4b4fc17d144bbb3ba64a306e68c72in03/delete-disaster-recovery 

{ 
   "target_instance_id" : "8c08eda627cc4344aca26832c87ff16cin03", 
   "target_project_id" : "0ddd1dbcb3494d3dbdb614b39104760b", 
   "target_region" : "cn-southwest-244", 
   "target_ip" : "192.168.2.70", 
   "is_master" : true 
 }

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    job_id

    String

    Taskflow ID.

  • Example normal response
    {
      "job_id": "64a5083a-d8e0-4cee-b086-5c2a776ee92d"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.