Help Center/ GaussDB/ API Reference/ APIs/ Instance Management/ Changing the Deployment Model of an Instance
Updated on 2026-09-24 GMT+08:00

Changing the Deployment Model of an Instance

Function

This API is used to change the deployment model of an instance.

Debugging

You can debug this API in API Explorer.

Constraints

Currently, only the centralized single-replica deployment model can be changed to the centralized primary/standby (1 primary + 2 standby) or centralized primary/standby (1 primary + 1 standby + 1 log) deployment model.

URI

PUT /v3/{project_id}/instances/{instance_id}/deployment/solution

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language of the information returned by the API.

Constraints

N/A

Range

  • zh-cn: Chinese
  • en-us: English

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

solution

Yes

String

Definition

Target deployment model of the instance after the change.

Constraints

N/A

Range

  • logger: 1 primary + 1 standby + 1 log
  • triset: 1 primary + 2 standby

Default Value

N/A

availability_zone

Yes

String

Definition

AZs for deployment. Use commas (,) to separate multiple AZs.

Constraints

The value cannot contain the following special characters: ^%&\\'`|";=?$<>

Range

N/A

Default Value

N/A

master_az

No

String

Definition

The primary AZ of an instance.

Constraints

If this parameter is left empty, the current primary AZ is used by default.

Range

N/A

Default Value

The primary AZ of the current instance.

logger_az

No

String

Definition

Log AZ.

Constraints

This parameter is mandatory when the solution parameter is set to logger.

Range

N/A

Default Value

N/A

Response Parameters

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

Definition

Task ID.

Range

N/A

Example Request

Changing the centralized single-replica deployment model to the centralized primary/standby (1 primary + 1 standby + 1 log) deployment model

PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/5362449138da4e408dbae5152ca26640in14/deployment/solution 
{
    "solution": "logger",
    "availability_zone": "az0.dc0,BMS_az7.dc2,BMS_az8.dc2",
    "logger_az": "BMS_az7.dc2"
}

Example Response

{ 
  "job_id" : "0da624f7-0eec-4e2b-bfef-0685bb5591f6" 
}

Status Codes

Error Codes

For details, see Error Codes.