修改集群配置 (V2)
Modify a dedicated cluster. You can increase or reduce the number of CUs allocated to the cluster.
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export BASE_URL="https://api.cloud.zilliz.com.cn"
认证令牌,应为具备适当权限的 API 密钥。
使用 application/json。
待修改集群 ID。
修改后分配给指定集群的 CU 数量。此参数与 autoscaling.cu 互斥;您只能指定其中一个。此参数与 replica 的乘积不得超过 256。
修改后指定集群的副本数量。此参数与 autoscaling.replica 互斥;您只能指定其中一个。此参数与 cuSize 的乘积不得超过 256。
集群的自动扩缩容配置。此参数与 cuSize 或 replica 互斥;您只能指定其中一个。
CU 的自动扩缩容配置。如果您已设置 cuSize,则无法使用此配置。最大 CU 数量与最大副本数量的乘积不得超过 256。
自动扩缩容的最小 CU 数量。此参数与 schedules 互斥;您只能指定其中一个。
自动扩缩容的最大 CU 数量。此参数与 schedules 互斥;您只能指定其中一个。
自动扩缩容的时间表。此参数与 min/max 互斥;您只能指定其中一个。
An auto-scaling schedule.
定义时间表的 Cron 表达式。
此时间表的目标 CU 数量。
Replica 的自动扩缩容配置。如果您已设置 replica,则无法使用此配置。最大 CU 数量与最大副本数量的乘积不得超过 256。
自动扩缩容的最小 Replica 数量。此参数与 schedules 互斥;您只能指定其中一个。
自动扩缩容的最大 Replica 数量。此参数与 schedules 互斥;您只能指定其中一个。
自动扩缩容的时间表。此参数与 min/max 互斥;您只能指定其中一个。
An auto-scaling schedule.
定义时间表的 Cron 表达式。
此时间表的目标 Replica 数量。
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/modify" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
-d '{
"cuSize": 2,
"replica": 2
}'
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/modify" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
-d '{
"autoscaling": {
"cu": {
"min": 1,
"max": 2
},
"replica": {
"min": 1,
"max": 2
}
}
}'
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/modify" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
-d '{
"autoscaling": {
"cu": {
"schedules": [
{
"cron": "10 0 0 0 0 ?",
"target": 2
}
]
},
"replica": {
"schedules": [
{
"cron": "10 0 0 0 0 ?",
"target": 2
}
]
}
}
}'
Response code.
Response payload.
ID of the cluster that has been modified.
Prompt message returned.
返回错误消息。
响应码。
错误描述。
{
"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."
}
}