Adding a Replica

Function

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

This API is available only in the CN North-Beijing4 region.

URI

POST /v1.0/{project_id}/instance/{instance_id}/groups/{group_id}/replications

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

instance_id

Yes

String

Instance ID.

group_id

Yes

String

Shard ID, which is the value of group_id in Querying Shards and Replicas.

Example

POST https://{dcs_endpoint}/v1.0/{project_id}/instance/{instance_id}/groups/{group_id}/replications

Request

Request parameter

Parameter

Mandatory

Type

Description

repl_az_id

No

String

ID of the AZ where the specified replica resides.

The value can be obtained in Querying AZ Information (Unavailable Soon). The AZ must have sufficient resources. Otherwise, the replica cannot be added.

Example request

{
        "repl_az_id":"12c47a78666b4e438cd0c692b9860387"
}

Response

None

Return Value

Return Value

Description

204

Replica added successfully.