跳到主要内容

查看按需集群列表 (V2)
公测版

List all on-demand clusters in the current project.

GET/v2/clusters/onDemandClusters
连接端点

该 API 的 Base URL 格式如下:

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

📘说明

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

export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheaderrequired

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

示例值:Bearer {{TOKEN}}
Acceptstringheader

Use application/json.

示例值:application/json
projectIdstringqueryrequired

要列出集群的项目 ID。如果未指定,将列出默认项目中的集群。

示例值:proj-xxxxxxxxxxxxxxxxxxxx
regionIdstringqueryrequired

要列出集群的云区域 ID。如果未指定,将列出所有区域中的集群。

示例值:ali-cn-hangzhou
export TOKEN="YOUR_API_KEY"

curl --request GET \
--url "${BASE_URL}/v2/clusters/onDemandClusters?projectId=proj-xxxxxxxxxxxxxxxxxxxx&regionId=ali-cn-hangzhou" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
响应200 - application/json
codeinteger

Response code.

dataobject
countinteger

按需集群总数。

onDemandClustersarray

按需集群列表。

[]onDemandClustersobject

一个按需集群。

projectIdstring

集群所属项目 ID。

示例值:proj-xxxxxxxxxxxxxxx
clusterIdstring

集群 ID。

示例值:inxx-xxxxxxxxxxxxxxx
clusterNamestring

集群名称。

regionIdstring

集群所处云地域 ID。

示例值:ali-cn-hangzhou
cuSizeinteger

分配给当前集群的 CU 大小。

statusstring

当前集群所处状态。

endpointstring

访问集群时使用的公共端点。注意对于按需集群来说,该端点是一个项目级别的按需计算端点,项目中的所有按需集群共享该端点。在进行搜索和查询时,请和集群 ID 共同使用。

示例值:https://proj-xxxxxxxxxxxxxxx.aws-us-west-2.zillizcloud.com
privateLinkstring

访问集群时使用的私有端点。若未开启 Private Link。此参数值为空。

createdBystring

集群创建人的邮箱。

createTimeinteger

创建当前集群时的时间戳。

autoSuspendinteger

自动挂起空闲时间。如果指定的时间段内无任何请求,集群将自动挂起。该值为一个整数,表示秒数。例如,300 表示 5 分钟。

{
"code": 0,
"data": {
"count": 2,
"onDemandClusters": [
{
"projectId": "proj-xxxxxxxxxxxxxxx",
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"clusterName": "Cluster-01",
"regionId": "ali-cn-beijing",
"cuSize": 8,
"status": "RUNNING",
"endpoint": "https://proj-xxxxxxxxxxxxxxx.ali-cn-beijing.api.cloud.zilliz.com.cn",
"privateLink": "",
"createdBy": "john.doe@zilliz.com",
"createTime": 1745396115000,
"autoSuspend": 60
},
{
"projectId": "proj-xxxxxxxxxxxxxxx",
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"clusterName": "Cluster-02",
"regionId": "ali-cn-beijing",
"status": "RUNNING",
"cuSize": 8,
"endpoint": "https://proj-xxxxxxxxxxxxxxx.ali-cn-beijing.api.cloud.zilliz.com.cn",
"privateLink": "",
"createdBy": "john.doe@zilliz.com",
"createTime": 1745396116450,
"autoSuspend": 60
}
]
}
}
{
"code": 21119,
"message": "The apikey is illegal."
}