跳到主要内容

创建 Serverless 集群 (V2)

本接口可创建一个 Serverless 集群。

POST/v2/clusters/createServerless
连接端点

该 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
请求体
clusterNamestring必填项

待创建集群名称。

descriptionstring

集群描述。

示例值:Production vector search cluster
projectIdstring必填项

待创建集群所属项目 ID。

示例值:proj-xxxxxxxxxxxxxxxxxxxx
Chinabash
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/clusters/createServerless" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"clusterName": "Serverless-05",
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxxx",
"regionId": "ali-cn-hangzhou",
"description": "用于向量搜索工作负载的集群描述。"
}'
响应

返回已创建的集群详情。

codeinteger

响应码。

dataobject

响应负载。

clusterIdstring

已创建的集群 ID。

usernamestring

已创建集群的管理用户名。

passwordstring

已创建集群的管理用户密码。该密码仅在集群创建成功时显示一次。建议在安全的地方记录它以备后续使用。

promptstring

返回的提示信息。

返回错误消息。

codeinteger

响应码。

messagestring

错误描述。

Successjson
{
"code": 0,
"data": {
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"username": "db_xxxxxxxx",
"password": "***********",
"prompt": "successfully submitted, cluster is being created. 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 with the admin account and the initial password you specified."
}
}
Ctrl I