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<int64>必要
変更後のこのクラスタのレプリカ数。
値の範囲: ≥ 1≤ 8
autoscalingobject
クラスターのオートスケーリング設定。
replicaobject
オートスケーリングのレプリカ範囲とスケジュール。
mininteger<int64>
レプリカの最小数。
値の範囲: ≥ 1≤ 8
maxinteger<int64>
レプリカの最大数。
値の範囲: ≥ 1≤ 8
schedulesarray
スケジュールされたレプリカ調整。
[]schedulesobject
スケジュールされたオートスケーリング調整。
cronstring
スケジュールのcron式。
targetinteger<int64>
スケジュール実行時に適用されるターゲットレプリカ数。
値の範囲: ≥ 1≤ 8
timezonestring
スケジュールのタイムゾーン。
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 を返します。
指定した Cluster のレプリカを変更した後に返される成功レスポンス本文です。
codeinteger<int32>
レスポンスコード。
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."
}
}