Help Center> GeminiDB> API Reference> APIs v3 (Recommended)> Disaster Recovery> Demoting a DR Instance from Primary to Standby
Updated on 2023-11-21 GMT+08:00

Demoting a DR Instance from Primary to Standby

Function

This API is used to demote a DR instance from primary to standby.

Constraints

This API supports GeminiDB Redis instances.

URI

POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/switchover-slave

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 202

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

ID of the job of promoting a DR instance from standby to primary.

Example Requests

  • URI example
    POST https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/054e292c9880d4992f02c0196d3ein12/switchover-slave

Example Responses

Status code: 202

Accepted

{
  "job_id" : "20f793fd-2703-4339-bfb5-f1c9065b15c8"
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.