Enable Encryption for a Bucket
Updated at:2025-11-03
API description
This API enables encryption for specified buckets.
Request URI
PUT /v1/{bucketName}/?encryption
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
Parameters of request body
Description of the data structure of request body fields
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| encryptionAlgorithm | String | Yes | For a given bucket’s server-side encryption, the AES256 and SM4 encryption algorithms are currently supported. | AES256 |
Response body parameters
Description of the data structure of response body fields
Request example
JSON
1PUT /v1/bucketName_example/?encryption
2 <Common request headers>
3{
4 "encryptionAlgorithm" : "AES256"
5}
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{ }
Error code
Please refer to the general error codes
