跳到主要内容

创建全球集群 (V2)

This operation creates a global cluster. A global cluster consists of multiple member clusters deployed in different regions. The member clusters in a global cluster share the same CU type and CU size. You can create global clusters to provide disaster recovery and low latency access across regions.

POST/v2/globalClusters/create
连接端点

该 API 的 Base URL 格式如下:

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

📘说明

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

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

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

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

全球集群名称。

示例值:my-global-cluster
projectIdstring必填项

全球集群所属项目 ID。

示例值:proj-xxxxxxxxxxxxxxx
cuTypestring必填项

全球集群的计算单元类型(CU)。

示例值:Performance-optimized
cuSizeinteger必填项

全球集群的计算单元大小(CU)。
对于全球集群中的成员集群,该值取值范围为 11024,可能的值为1、2、4、8、12、16、20、24、28、32、…、64、72、80、88、…、256、272、288、…、1024。
关于 CU 大小的增量规则,请参阅 详细计划对比 中的 Deployment 部分。

示例值:4
primaryClusterobjectrequired

全球集群的主集群参数。

clusterNamestring必填项

主集群名称。

示例值:my-primary-cluster
regionIdstring必填项

主集群部署的区域 ID。该区域必须是指定项目中适用的区域之一。

secondaryClustersarrayrequired

全球集群的从集群参数。您可以指定一个或多个从集群。

[]secondaryClustersobjectrequired
clusterNamestring必填项

从集群名称。

示例值:my-secondary-cluster-1
regionIdstring必填项

从集群部署的区域 ID。该区域必须是指定项目中适用的区域之一,并且必须与主集群部署的区域不同。

export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/globalClusters/create" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"globalClusterName": "my-global-cluster",
"projectId": "proj-xxxxxxxxxxxxxxx",
"cuType": "Performance-optimized",
"cuSize": 4,
"primaryCluster": {
"clusterName": "my-primary-cluster",
"regionId": "ali-cn-hangzhou"
},
"secondaryClusters": [
{
"clusterName": "my-secondary-cluster-1",
"regionId": "ali-cn-beijing"
},
{
"clusterName": "my-secondary-cluster-2",
"regionId": "ali-cn-shanghai"
}
]
}'
响应200 - application/json
globalClusterIdstring

创建的全球集群 ID。

示例值:glo-xxxxxxxxxxxxxxx
usernamestring

访问全球集群的用户名。

示例值:admin
passwordstring

访问全球集群的密码。

示例值:Passw0rd!
jobIdstring

创建全球集群的任务 ID。您可以使用此 ID 查询创建任务的进度。

示例值:job-xxxxxxxxxxxxxxx

返回错误消息。

codeinteger

响应码。

messagestring

错误描述。

{
"globalClusterId": "glo-xxxxxxxxxxxxxxx",
"username": "db_admin",
"password": "Passw0rd!",
"jobId": "job-xxxxxxxxxxxxxxx"
}