Skip to main content

Modify Cluster Replica (V2)

This operation sets the number of replicas for the specified cluster. For Global clusters, each member cluster can have different number of replicas, and this operation only modifies the replica number of the specified cluster.

POST/v2/clusters/{CLUSTER_ID}/modifyReplica
Connection Endpoint

The base URL for this API is in the following format:

https://api.cloud.zilliz.com

📘Notes

The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.

shell
export BASE_URL="https://api.cloud.zilliz.com"
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges.

Example Value: Bearer {{TOKEN}}
Acceptstringheader

Use application/json.

Example Value: application/json
CLUSTER_IDstringpathrequired

ID of the cluster to modify.

Example Value: inxx-xxxxxxxxxxxxxxx
Request Body
replicainteger<int64>required

Number of replicas for this cluster after the modification.

Value Range: ≥ 1≤ 8
autoscalingobject

Autoscaling configuration of the cluster.

replicaobject

Replica range and schedules for autoscaling.

mininteger<int64>

Minimum number of replicas.

Value Range: ≥ 1≤ 8
maxinteger<int64>

Maximum number of replicas.

Value Range: ≥ 1≤ 8
schedulesarray

Scheduled replica adjustments.

[]schedulesobject

Scheduled autoscaling adjustment.

cronstring

Cron expression of the schedule.

targetinteger<int64>

Target replica count applied when the schedule fires.

Value Range: ≥ 1≤ 8
timezonestring

Timezone of the schedule.

bash
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"

curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/modifyReplica" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"replica": 2
}'
bash
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"

curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/modifyReplica" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"autoscaling": {
"replica": {
"min": 1,
"max": 2
}
}
}'
bash
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"

curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/modifyReplica" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"autoscaling": {
"replica": {
"schedules": [
{
"cron": "10 0 0 0 0 ?",
"target": 2
}
]
}
}
}'
Responses

Returns the ID of the modified cluster.

A successful response body returned after modifying the replica of the specified Cluster.

codeinteger<int32>

Response code.

dataobject

Response payload.

clusterIdstring

ID of the cluster that has been modified.

promptstring

Prompt message returned.

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

Successjson
{
"code": 0,
"data": {
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"prompt": "successfully submitted. Cluster is being upgraded, which is expected to take several minutes. You can access data about the creation progress and status of your cluster by DescribeCluster API. Once the cluster status is RUNNING, you may access your vector database using the SDK."
}
}