跳到主要内容

更新湖检索型集群 (V2)

更新湖检索型集群的名称、描述或自动挂起空闲时间。

PATCH/v2/clusters/onDemandClusters/{CLUSTER_ID}
连接端点

该 API 的 Base URL 格式如下:

https://api.cloud.zilliz.com.cn

📘说明

控制面接口速率限制为单用户单接口每秒最多 20 个请求。

shell
export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheader必填项

认证令牌,应为具备适当权限的 API 密钥。

示例值:Bearer {{TOKEN}}
OrgIdstringheader必填项

集群所属的组织 ID。

示例值:org-xxxxxxxxxxxxxxxxxxx
Acceptstringheader

使用 application/json。

示例值:application/json
CLUSTER_IDstringpath必填项

当前操作的目标集群 ID。

示例值:inxx-xxxxxxxxxxxxxxx
请求体
clusterNamestring

集群的新名称。值不能为空字符串。

descriptionstring

集群的新描述。值可以为空字符串。

autoSuspendstring

自动挂起空闲时间。该值必须使用 <number><s|m|h> 格式,例如 60s、5m 或 1h,且至少为 60 秒。

示例值:5m
cuSizeinteger<int32>

Query Cluster 的新 CU 数量,必须为 8 的正整数倍。

取值范围:≥ 8
示例值:32
keepWarmobject

可选的 keep-warm 调度整体替换配置;不填表示保持不变,空的 schedules 列表表示移除该调度。

enabledboolean必填项

是否启用 keep-warm 调度。

schedulesarray必填项

每周 keep-warm 时间窗口的完整替换集合,使用组织系统时区,最多 10 条;更新时传空列表表示移除调度。

[]schedulesobject必填项

定时扩缩容规则。

cronstring

定义定时计划生效时间的 Cron 表达式。

targetinteger<int64>

定时计划触发时应用的目标值。

timezonestring

Cron 定时计划使用的时区。

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

curl --request PATCH \
--url "${BASE_URL}/v2/clusters/onDemandClusters/${CLUSTER_ID}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"clusterName": "New Cluster Name",
"description": "This is the new description of the cluster.",
"autoSuspend": "5m"
}'
bash
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"

curl --request PATCH \
--url "${BASE_URL}/v2/clusters/onDemandClusters/${CLUSTER_ID}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"clusterName": "New Cluster Name"
}'
bash
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"

curl --request PATCH \
--url "${BASE_URL}/v2/clusters/onDemandClusters/${CLUSTER_ID}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"description": ""
}'
bash
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"

curl --request PATCH \
--url "${BASE_URL}/v2/clusters/onDemandClusters/${CLUSTER_ID}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"autoSuspend": "5m"
}'
响应

Returns the ID of the modified cluster.

该操作返回的备选响应体,表示更新请求的一种可能结果。

codeinteger<int32>

响应码。

dataobject

Response payload.

clusterIdstring

ID of the cluster that has been modified.

promptstring

Prompt message returned.

返回错误消息。

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."
}
}