PutBucketEncryption
Last Updated:2021-12-08
Interface Description
This interface is used to turn on the encryption switch of the specified bucket.
Request
-
Request syntax
PUT /?encryption HTTP/1.1 Host: <BucketName>.bj.bcebos.com Date: <Date> Authorization: <AuthorizationString> Content-Length: <ContentLength> { "encryptionAlgorithm":"AES256" }
-
Request parameters
None
-
Request header field
Name Type Description Required? encryptionAlgorithm String Server encryption type of the specified bucket. At present, only AES256 encryption is supported. Yes
Response
-
Response element
None
-
Response header field
None
Example
-
Request example
PUT /?encryption HTTP/1.1 Host: bucket.bj.bcebos.com Date: Wed, 06 Apr 2016 06:34:40 GMT Authorization: AuthorizationString Content-Length: 11434 { "encryptionAlgorithm":"AES256" }
-
Return example
HTTP/1.1 200 OK x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 Date: Wed, 06 Apr 2016 06:34:40 GMT Content-Length: 11434 Server: BceBos