修改全球集群 CU (V2)
Modifies CU size or CU autoscaling policy at Global Cluster level. CU settings apply to all member clusters.
POST/v2/globalClusters/{globalClusterId}/modifyCU
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheaderrequired
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
globalClusterIdstringpathrequired
全球集群 ID。
示例值:glo-xxxxxxxxxxxxxxx
请求体application/json
cuSizeinteger
目标 CU 大小。与 autoscaling.cu 互斥。
示例值:8
autoscalingobject
全球集群自动扩缩容策略。
cuobject
CU 自动扩缩容策略。可配置 min 和 max 进行动态扩缩容,或配置 schedules 进行定时扩缩容。
mininteger
动态扩缩容的最小 CU,必须与 max 同时设置。
示例值:4
maxinteger
动态扩缩容的最大 CU,必须与 min 同时设置。
示例值:16
schedulesarray
定时扩缩容规则。
[]schedulesobject
cronstring必填项
定时扩缩容的 Cron 表达式。
示例值:0 9 * * 1-4
targetinteger必填项
该定时规则的目标 CU 大小。
示例值:8
export TOKEN="YOUR_API_KEY"
export globalClusterId="glo-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/globalClusters/${globalClusterId}/modifyCU" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"cuSize": 8
}'
export TOKEN="YOUR_API_KEY"
export globalClusterId="glo-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/globalClusters/${globalClusterId}/modifyCU" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"autoscaling": {
"cu": {
"min": 4,
"max": 16
}
}
}'
export TOKEN="YOUR_API_KEY"
export globalClusterId="glo-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/globalClusters/${globalClusterId}/modifyCU" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"autoscaling": {
"cu": {
"schedules": [
{
"cron": "0 9 * * 1-4",
"target": 8,
"timezone": "UTC"
}
]
}
}
}'
响应200 - application/json
jobIdstring
异步操作的任务 ID。
示例值:job-xxxxxxxxxxxxxxx
返回错误消息。
codeinteger
响应码。
示例值:400
messagestring
错误描述。
示例值:Invalid request parameters.
{
"jobId": "job-xxxxxxxxxxxxxxx"
}