Baidu AI Cloud
中国站

百度智能云

Object Storage

PutBucketCopyrightProtection

Interface Description

With this interface, you can enable the copyright protection feature of the bucket, and specify the resource field to indicate the effective resource range. For the file with copyright protection enabled, the anonymous download and access to this file or the access with custom photo processing parameters are not allowed. Only the style access or the access with legal signature is allowed.

Request Syntax

PUT /?copyrightProtection HTTP/1.1
Host: <BucketName>.bj.bcebos.com
x-bce-date: date
Content-Length: request-body length
Content-Type: application/json; charset=utf-8
Authorization: AuthorizationString

(request body: json string)

Request Example

PUT /?copyrightProtection HTTP/1.1
Host: <BucketName>.bj.bcebos.com
x-bce-date: 2016-04-06T06:34:40Z 
Content-Length: request-body length
Content-Type: application/json; charset=utf-8
Authorization: AuthorizationString

{	
    "resource":[
            "bucket/prefix/*",
            "bucket/*/suffix"
    ]
}

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

Description: The user must have the FULL_CONTROL permission.

Previous
GetCopyrightProtection
Next
Cross-region Access