跳到主要内容

创建集群

Creates a new cluster.

POST
/v1/clusters/create
Base URL

该 API 的 Base URL 格式如下:

https://controller.api.${CLOUD_REGION}.zilliz.com.cn

📘说明
export CLOUD_REGION="ali-cn-hangzhou"
export BASE_URL="https://controller.api.${CLOUD_REGION}.zilliz.com.cn"
参数
Authorizationstringheaderrequired

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

示例值:Bearer {{TOKEN}}
请求体application/json
planstring必填项

待创建集群所属的订阅计划。

clusterNamestring必填项

待创建集群名称。

cuSizeinteger必填项

集群使用的 CU 大小。

取值范围:≥ 1≤ 256
cuTypestring必填项

集群使用的 CU 类型。

projectIdstring必填项

待创建集群所属项目 ID。

示例值:proj-xxxxxxxxxxxxxxxxxxxxxx
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v1/clusters/create" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"cuSize": 1,
"clusterName": "Cluster-02",
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxx",
"plan": "Standard",
"cuType": "Performance-optimized"
}'
响应200 - application/json

A success response.

codeinteger

响应码。

dataobject

响应载荷,为一个包含 Dedicated 集群相关信息的对象。

clusterIdstring

受此操作影响的集群 ID。

usernamestring

访问此集群的默认用户名。此用户拥有此集群的管理权限。

passwordstring

访问此集群的默认用户密码。此密码仅展示一次,请务必记录并安全保存。

promptstring

表明此操作成功的声明信息。

Returns an error message.

codeinteger

响应码。

messagestring

错误描述。

{
"code": 200,
"data": {
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"username": "db_admin",
"password": "xxxxxxxxxxxxxxxx",
"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."
}
}