创建 Storage Integration (V2)
本接口用于创建对象存储集成。创建前,系统会校验提供的凭证是否可以访问目标 bucket 或容器。
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export BASE_URL="https://api.cloud.zilliz.com"
认证令牌,应为具备适当权限的 API 密钥。
创建 AWS 存储集成的请求体。需要指定 projectId、name、regionId 和 bucketName。
项目 ID。
Storage Integration 名称。
Storage Integration 描述。
地域 ID。服务器会根据该字段推断云厂商。
Bucket、容器或存储名称。对于 Azure Blob Storage,该字段表示容器名称。
云厂商相关的凭证字段。
AWS IAM 角色 ARN。
AWS 角色扮演使用的 external ID。
Azure 存储账号名称。
Azure 联合身份客户端 ID。
Azure 租户 ID。
用户侧 GCP 项目 ID。
用户创建的 GCP 服务账号邮箱,用于授予 bucket 访问权限。
创建 AWS 存储集成的请求体。需要指定 projectId、name、regionId 和 bucketName。
项目 ID。
Storage Integration 名称。
Storage Integration 描述。
地域 ID。服务器会根据该字段推断云厂商。
Bucket、容器或存储名称。对于 Azure Blob Storage,该字段表示容器名称。
云厂商相关的凭证字段。
AWS IAM 角色 ARN。
AWS 角色扮演使用的 external ID。
Azure 存储账号名称。
Azure 联合身份客户端 ID。
Azure 租户 ID。
用户侧 GCP 项目 ID。
用户创建的 GCP 服务账号邮箱,用于授予 bucket 访问权限。
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/storageIntegrations" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxx",
"name": "analytics-s3",
"description": "S3 bucket for external tables",
"regionId": "aws-cn-northwest-1",
"bucketName": "my-bucket",
"externalCred": {
"roleArn": "arn:aws:iam::123456789012:role/zilliz-bucket-role",
"externalId": "zilliz-external-AbCdEf12345678"
}
}'
返回创建的 Storage Integration。
成功响应。
响应码。
返回创建的 Storage Integration。
Storage Integration ID。
Storage Integration 名称。
失败响应。
响应码。
错误信息。
{
"code": 0,
"data": {
"integrationId": "integ-xxxxxxxxxxxxxxxxxxx",
"name": "analytics-oss"
}
}