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

Torch Object Storage

Copy page
Download PDF
Retention Policy
GetBucketObjectLockConfiguration
Copy page
Download PDF
GetBucketObjectLockConfiguration
Function Description​
This interface is used to obtain the retention policy of a bucket.​
Request syntax​
​
GET /?object-lock HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: GMT Date​
Authorization: authorization string​
​
Request parameters and headers​
The public message header used by this request; see Common parameters.​
​
Name​
Location​
Type​
Required​
Sample Value​
Description​
object-lock​
Query​
String​
Yes​
-​
Represents a special identifier for the GetBucketObjectLockConfiguration request.​
​
Request body elements​
This request does not use message elements.​
Response headers​
This request returns public response message headers.​
Response body elements​
​
Name​
Type​
Sample Value​
Description​
ObjectLockEnabled​
String​
Enabled​
Whether to enable the retention policy; the only valid value is Enabled, which indicates that the retention policy is enabled.​
Rule​
Object​
-​
Bucket retention strategy rules.​
DefaultRetention​
Object​
-​
The default retention policy for the bucket.​
Parent node: Rule.​
Days​
Integer​
1​
Object lock duration (days): During the specified period, the object cannot be deleted or overwritten. The duration is measured in days.​
Parent Node: DefaultRetention​
Years​
Integer​
1​
Object lock duration (in years): During the specified number of years, the object cannot be deleted or overwritten. The unit is years, and one year equals 365 days.​
Parent Node: DefaultRetention​
Mode​
String​
COMPLIANCE​
Retention policy mode, with the value limited to COMPLIANCE, indicates compliance mode, in which no user can delete or overwrite locked objects during the retention period.​
Parent Node: DefaultRetention​
​
Sample request 1​
​
GET /?object-lock HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
Authorization: authorization string​
​
Sample response 1​
​
HTTP/1.1 200 OK​
x-tos-id-2: f91b0c03a01300c1-a444ed0​
x-tos-request-id: f91b0c03a01300c1-a444ed0​
Date: Fri, 30 Jul 2021 06:45:39 GMT​
server: TosServer​
Content-Length: 31​
​
{ ​
"ObjectLockEnabled": "Enabled"​
}​
​
Sample request 2​
​
GET /?object-lock HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
Authorization: authorization string​
​
Sample response2​
​
HTTP/1.1 200 OK​
x-tos-id-2: f91b0c03a01300c1-a444ed0​
x-tos-request-id: f91b0c03a01300c1-a444ed0​
Date: Fri, 30 Jul 2021 06:45:39 GMT​
server: TosServer​
Content-Length: 92​
​
{ ​
"ObjectLockEnabled": "Enabled",​
"Rule": {​
"DefaultRetention": {​
"Days": 100,​
"Mode": "COMPLIANCE"​
}​
} ​
}​
​
​
Last updated: 2025.09.29 17:27:02