跳到主要内容

校验 Storage Integration (V2)

This operation validates whether the supplied storage credential can access the target bucket or container without creating an integration record.

POST/v2/storageIntegrations/validate
连接端点

该 API 的 Base URL 格式如下:

https://api.cloud.zilliz.com

📘说明

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

shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
Authorizationstringheader必填项

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

示例值:Bearer {{TOKEN}}
请求体
projectIdstring必填项

项目 ID。

regionIdstring必填项

地域 ID。服务器会根据该字段推断云厂商。

bucketNamestring必填项

需要校验的 bucket、容器或存储名称。

externalCredundefined

云厂商相关的凭证字段。

Alibaba Cloud OSSbash
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/storageIntegrations/validate" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxx",
"regionId": "ali-cn-hangzhou",
"bucketName": "my-oss-bucket",
"externalCred": {
"roleArn": "acs:ram::1234567890123456:role/zilliz-bucket-role",
"externalId": "zilliz-external-AbCdEf12345678"
}
}'
响应

返回校验结果。

成功响应。

codeinteger

响应码。

示例值:0
dataobject

返回校验结果。

successboolean

凭证是否可以访问目标存储。

messagestring

校验失败时的原因。校验成功时为空字符串。

失败响应。

codeinteger

响应码。

示例值:1800
messagestring

错误信息。

示例值:User hasn't authenticated
Successjson
{
"code": 0,
"data": {
"success": true,
"message": ""
}
}
Ctrl I