PutBucketEncryption
更新时间:2023-03-17
接口描述
本接口用于开启指定Bucket的加密开关。
请求(Request)
-
请求语法
PUT /?encryption HTTP/1.1 Host: <BucketName>.bj.bcebos.com Date: <Date> Authorization: <AuthorizationString> Content-Length: <ContentLength> { "encryptionAlgorithm":"AES256" }
-
请求参数
无
-
请求头域
名称 类型 描述 是否必须 encryptionAlgorithm String 指定Bucket的服务器端加密类型,当前支持AES256和SM4加密。 是
响应(Response)
-
响应元素
无
-
响应头域
无
示例
-
请求示例1
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" }
-
返回示例1
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
-
请求示例2
PUT /?encryption HTTP/1.1 Host: bucket.bj.bcebos.com Date: Thu, 16 Mar 2023 07:53:05 GMT Authorization: AuthorizationString Content-Length: 11431 { "encryptionAlgorithm":"SM4" }
-
返回示例2
HTTP/1.1 200 OK x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 Date: Thu, 16 Mar 2023 07:53:06 GMT Content-Length: 11431 Server: BceBos