ExtendBucketObjectLock
Updated at:2025-11-03
API description
This API is intended to extend the protection period of the compliance retention policy.
Request
-
Request syntax
Plain Text1POST /?extendobjectlock HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> 5Content-Type: application/json; charset=utf-8 6Content-Length: <ContentLength> 7{ 8 "extendRetentionDays" : 34 9} -
Request headers
No special request headers
-
Request parameters
| Name | Types | Description | Required or not |
|---|---|---|---|
| extendRetentionDays | int | The new protection period in days. The protection period cannot be shortened. | Yes |
Response
Example
-
Request example
Plain Text1POST /?extendobjectlock HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3x-bce-date: 2016-04-06T06:34:40Z 4Authorization: AuthorizationString 5{ 6 "extendRetentionDays" : 34 7} -
Response example
Plain Text1HTTP/1.1 200 OK 2x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 3Content-Length: 0 4Date: Wed, 06 Apr 2016 06:34:40 GMT 5Server: BceBos -
Return codes
| Result | http code | error code | Description |
|---|---|---|---|
| Succeeded | 200 | - | - |
| No compliance retention policy is configured; locking cannot be executed. | 404 | NoSuchObjectLock | - |
| The compliance policy is not locked and cannot be extended. | 400 | ObjectLockNotLocked | - |
| The compliance retention policy is locked; the Protection Period cannot be shortened | 400 | NotAllowShortenRetentionday | - |
