Cluster Replica を変更します (V2)
この操作では、指定したクラスタのレプリカ数を設定します。Global cluster の場合、各メンバークラスタでレプリカ数が異なることがあり、この操作で変更されるのは指定したクラスタのレプリカ数のみです。
POST/v2/clusters/{CLUSTER_ID}/modifyReplica
https://api.cloud.zilliz.com
shell
export BASE_URL="https://api.cloud.zilliz.com"
パラメータ
Authorizationstringheader必要
認証トークンには、適切な権限を持つ API key を使用する必要があります。
値の例: Bearer {{TOKEN}}
Acceptstringheader
application/json を使用します。
値の例: application/json
CLUSTER_IDstringpath必要
変更するクラスタの ID。
値の例: inxx-xxxxxxxxxxxxxxx
リクエスト・ボディapplication/json
replicainteger必要
変更後のこのクラスタのレプリカ数。
値の範囲: ≥ 1≤ 8
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
}
]
}
}
}'
レスポンス200 OK - application/json
変更されたクラスタの ID を返します。
codeinteger
レスポンスコード。
dataobject
レスポンスペイロード。
clusterIdstring
変更されたクラスタの ID。
promptstring
返されたプロンプトメッセージ。
エラーメッセージを返します。
codeinteger
レスポンスコード。
messagestring
エラーメッセージ。
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."
}
}