Baidu AI Cloud
中国站

百度智能云

Object Storage

ExtendBucketObjectLock

Interface Description

This interface is used to extend the protection period of the compliance retention policy.

Request

  • Request syntax

    POST /?extendobjectlock HTTP/1.1
    Host: <BucketName>.bj.bcebos.com
    Date: <Date>
    Authorization: <AuthorizationString>
    Content-Type: application/json; charset=utf-8
    Content-Length: <ContentLength>
    
    { 
       "extendRetentionDays" : 34
    }
  • Request header field

    No special request header field.

  • Request parameters

Name Type Description Required?
extendRetentionDays int New protection period (days). The protection period cannot be shortened. Yes

Response

  • Response header field

    No special parameters.

  • Response element

    No special parameters.

Example

  • Request example

    POST /?extendobjectlock HTTP/1.1
    Host: <BucketName>.bj.bcebos.com
    x-bce-date: 2016-04-06T06:34:40Z
    Authorization: AuthorizationString
    
    { 
        "extendRetentionDays" : 34
    }
  • Response example

    HTTP/1.1 200 OK
    x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409
    Content-Length: 0
    Date: Wed, 06 Apr 2016 06:34:40 GMT
    Server: BceBos
  • Return code

Results Http Code Error Code Description
Success 200 - -
The compliance retention policy is not configured and cannot be locked. 404 NoSuchObjectLock -
The compliance policy is not locked and cannot be extended. 400 ObjectLockNotLocked -
The compliance retention policy is locked, and the protection period cannot be shortened. 400 NotAllowShortenRetentionday -
Previous
DeleteBucketObjectLock
Next
GetBucketObjectLock