创建全球集群 (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.
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export BASE_URL="https://api.cloud.zilliz.com.cn"
认证令牌,应为具备适当权限的 API 密钥。
全球集群名称。
全球集群所属项目 ID。
全球集群的计算单元类型(CU)。
全球集群的计算单元大小(CU)。
对于全球集群中的成员集群,该值取值范围为 1 到 1024,可能的值为1、2、4、8、12、16、20、24、28、32、…、64、72、80、88、…、256、272、288、…、1024。
关于 CU 大小的增量规则,请参阅 详细计划对比 中的 Deployment 部分。
全球集群的主集群参数。
主集群名称。
主集群部署的区域 ID。该区域必须是指定项目中适用的区域之一。
全球集群的从集群参数。您可以指定一个或多个从集群。
从集群名称。
从集群部署的区域 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"
}
]
}'
创建的全球集群 ID。
访问全球集群的用户名。
访问全球集群的密码。
创建全球集群的任务 ID。您可以使用此 ID 查询创建任务的进度。
返回错误消息。
响应码。
错误描述。
{
"globalClusterId": "glo-xxxxxxxxxxxxxxx",
"username": "db_admin",
"password": "Passw0rd!",
"jobId": "job-xxxxxxxxxxxxxxx"
}