You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Vector bucket
PutVectorBucketPolicy
Copy page
Download PDF
PutVectorBucketPolicy
Description​
Set the IAM policy for the vector bucket.​
Request syntax​
The endpoint must use the bucket endpoint.​
​
POST /PutVectorBucketPolicy HTTP/1.1​
Host: {VectorBucketName}-{AccountID}.tosvectors-cn-beijing.volces.com​
Authorization: authorization string​
Date: Mon, 10 Dec 2025 12:49:14 GMT​
​
​
{​
"policy": "{\"Version\": \"2025-12-01\", \"Statement\": [{\"Effect\": \"Allow\",\"Principal\":[\"*\"],\"Action\":[\"tosvectors:ListVectorBuckets\"],\"Resource\":[\"trn:tosvectors:cn-beijing:2106764132:bucket/test-vector-bucket\"]}]}",​
"vectorBucketName": "test-vector-bucket"​
}​
​
Request parameters and headers ​
None.​
Request body elements​
​
Field name​
Type​
Required​
Example value​
Description​
policy​
String​
Yes​
'{​
"Version": "2025-12-01",​
"Statement": [{​
"Effect": "Allow",​
"Principal": [​
"210004xxxx/testuser"​
],​
"Action": [​
"tosvectors:*"​
],​
"Resource": [​
"trn:tosvectors:cn-beijing:11111:bucket/test-vector-bucket"​
]​
}]​
}'​
JSON text defining the policy.​
TRN definition:​
  • Vector bucket: trn:tosvectors:<region>:<account-id>:bucket/<bucket-name>​
  • Vector index: trn:tosvectors:<region>:<account-id>:bucket/<bucket-name>/index/<index-name>​
vectorBucketName​
String​
Yes​
test-vector-bucket​
Name of the vector storage bucket.​
Length limit: minimum 3, maximum 32. vectorBucketName is required.​
​
Response headers​
For common response headers, see Common parameters.​
Response body elements​
If the operation succeeds, the service returns an HTTP 200 response with an empty response body elements.​
If the operation fails, it returns the error codes defined in the Response code.​
Sample request​
​
POST /PutVectorBucketPolicy HTTP/1.1​
Host: test-vector-bucket-1111.tosvectors-cn-beijing.volces.com​
Authorization: authorization string​
Date: Mon, 10 Dec 2025 12:49:14 GMT​
​
​
{​
"policy": "{\"Version\": \"2025-12-10\", \"Statement\": [{\"Effect\": \"Allow\",\"Principal\":[\"*\"],\"Action\":[\"tosvectors:ListVectorBuckets\"],\"Resource\":[\"trn:tosvectors:cn-beijing:1111:bucket/test-vector-bucket\"]}]}",​
"vectorBucketName": "test-vector-bucket"​
}​
​
Sample response​
​
HTTP/1.1 200 OK​
x-tos-id-2: 797014003c90a9b694003c9-b15a995-1vV80n-CVB-cb-tos-1az-front-azd-vectors-2 ​
x-tos-request-id: 797014003c90a9b694003c9-b15a995-1vV80n-CVB-cb-tos-1az-front-azd-vectors-2 ​
Date: Mon, 10 Dec 2025 12:49:14 GMT​
server: TosServer​
Content-Length: 0​
​
​
Last updated: 2026.01.04 14:21:24