Updated on 2024-03-05 GMT+08:00

Adding Replicas

Function

This API is used to add replicas to shards of a Redis Cluster instance.

URI

POST /v2/{project_id}/instance/{instance_id}/groups/{group_id}/replications

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

instance_id

Yes

String

Instance ID.

group_id

Yes

String

Shard ID.

Request

Table 2 Request parameters

Parameter

Mandatory

Type

Description

az_code

No

String

Code of the AZ where the specified replica resides. The value can be obtained by calling the API described in Querying AZ Information. The AZ must have sufficient resources. Otherwise, the replica cannot be added.

Response

None

Example Request

POST https://{dcs_endpoint}/v2/{project_id}/instance/{instance_id}/groups/{group_id}/replications

Example Response

None

Status Code

Status Code

Description

204

Replicas added successfully.

400

Invalid request.

500

Internal service error.