创建 Storage Integration (V2)
This operation creates a bucket storage integration after validating that the supplied credential can access the target bucket or container.
POST/v2/storageIntegrations
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
Authorizationstringheader必填项
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
请求体application/json
projectIdstring必填项
项目 ID。
namestring必填项
Storage Integration 名称。
descriptionstring
Storage Integration 描述。
regionIdstring必填项
地域 ID。服务器会根据该字段推断云厂商。
bucketNamestring必填项
Bucket、容器或存储名称。对于 Azure Blob Storage,该字段表示容器名称。
externalCredobject
云厂商相关的凭证字段。
roleArnstring
AWS IAM 角色 ARN。
externalIdstring
AWS 角色扮演使用的 external ID。
projectIdstring必填项
项目 ID。
namestring必填项
Storage Integration 名称。
descriptionstring
Storage Integration 描述。
regionIdstring必填项
地域 ID。服务器会根据该字段推断云厂商。
bucketNamestring必填项
Bucket、容器或存储名称。对于 Azure Blob Storage,该字段表示容器名称。
externalCredobject
云厂商相关的凭证字段。
roleArnstring
AWS IAM 角色 ARN。
externalIdstring
AWS 角色扮演使用的 external ID。
Amazon S3bash
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"
}
}'
响应200 OK - application/json
返回创建的 Storage Integration。
成功响应。
codeinteger
响应码。
示例值:0
dataobject
返回创建的 Storage Integration。
integrationIdstring
Storage Integration ID。
namestring
Storage Integration 名称。
失败响应。
codeinteger
响应码。
示例值:1800
messagestring
错误信息。
示例值:User hasn't authenticated
Successjson
{
"code": 0,
"data": {
"integrationId": "integ-xxxxxxxxxxxxxxxxxxx",
"name": "analytics-oss"
}
}