查看集群列表 (V2)
本接口可列出当前 API Key 权限范围内的所有集群。
GET/v2/clusters
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
Authorizationstringheader必填项
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
Acceptstringheader
使用 application/json。
示例值:application/json
pageSizeintegerquery
每次返回的记录数。
示例值:10
currentPageintegerquery
当前页码。
示例值:1
regionstringquery
云区域 ID。若指定,则仅返回该区域内的集群。
projectIdstringquery
项目 ID。若指定,则仅返回该项目内的集群。
regionIdstringquery
云区域 ID。若指定,则仅返回该区域内的集群。
bash
export TOKEN="YOUR_API_KEY"
curl --request GET \
--url "${BASE_URL}/v2/clusters" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
响应200 OK - application/json
返回集群详情列表。
列出 Cluster 时返回的一种响应负载变体。
codeinteger<int32>
响应码。
dataobject
响应负载,是一个集群详情列表。
countinteger<int32>
集群总数。
currentPageinteger<int32>
当前页码。
pageSizeinteger<int32>
每页条数。
clustersarray
当前页的集群。
[]clustersobject
集群详情。
clusterIdstring
集群 ID。
clusterNamestring
集群名称。
descriptionstring
集群描述。
regionIdstring
集群所在地域 ID。
cuTypestring
集群的 CU 类型。
planstring
集群的套餐类型。
cuSizeinteger<int64>
集群的 CU 数量。
取值范围:0≤ 256
statusstring
集群状态。
connectAddressstring
用于连接集群的端点。
privateLinkAddressstring
集群的私网连接地址。
createTimestring<date-time>
集群创建时间。
projectIdstring
集群所属项目 ID。
deploymentOptionstring
集群的部署选项。
globalClusterMetaobject
集群所属的全局集群元数据,集群不属于全局集群时不返回。
globalClusterIdstring
全局集群 ID。
rolestring
集群在全局集群中的角色。
返回错误消息。
codeinteger
响应码。
messagestring
错误描述。
json
{
"code": 0,
"data": {
"count": 1,
"currentPage": 1,
"pageSize": 10,
"clusters": [
{
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"clusterName": "dedicated-3",
"description": "",
"regionId": "ali-cn-hangzhou",
"plan": "Enterprise",
"cuType": "Performance-optimized",
"cuSize": 1,
"status": "RUNNING",
"connectAddress": "https://inxx-xxxxxxxxxxxxxxx.ali-cn-hangzhou.vectordb.zilliz.com.cn:19530",
"privateLinkAddress": "",
"createTime": "2024-06-30T16:49:50Z",
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxx",
"deploymentOption": "Dedicated"
}
]
}
}
json
{
"code": 0,
"data": {
"count": 1,
"currentPage": 1,
"pageSize": 10,
"clusters": [
{
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"clusterName": "dedicated-3",
"description": "",
"regionId": "ali-cn-hangzhou",
"plan": "Enterprise",
"cuType": "Performance-optimized",
"cuSize": 1,
"status": "RUNNING",
"connectAddress": "https://inxx-xxxxxxxxxxxxxxx.ali-cn-hangzhou.vectordb.zilliz.com.cn:19530",
"privateLinkAddress": "",
"createTime": "2024-06-30T16:49:50Z",
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxx",
"deploymentOption": "Dedicated",
"globalClusterMeta": {
"globalClusterId": "glo-xxxxxxxxxxxxxxx",
"role": "PRIMARY"
}
}
]
}
}