cos:GetBucketEncryption.cos:PutBucketEncryption.cos:DeleteBucketEncryption../coscli bucket-encryption --method [method] cos://<bucket-name>
Parameter Format | Description | Example |
cos://<bucket-name> | Specify the target bucket. Supports using the bucket alias in configuration parameters or the bucket name for access. If using the bucket name for access, you must also include the endpoint flag. | Access with the bucket alias: cos://example-alias Access with the bucket name: cos://examplebucket-1250000000 |
Flag Abbreviation | Flag Name | Description |
-h | --help | Views the usage of this command. |
None | --method | Specify the required operation, including put (configure bucket encryption), get (query bucket encryption), delete (delete bucket encryption). |
None | --sse-algorithm | Encryption Algorithm (AES256, SM4, KMS) |
None | --kms-master-key-id | KMS master key ID |
None | --kms-algorithm | KMS Encryption Algorithm (AES256, SM4) |
./coscli bucket-encryption --method put cos://example-alias --sse-algorithm KMS
./coscli bucket-encryption --method get cos://example-alias
SECTION | KEY | VALUE-------------+------------+---------------------------------------Encryption | Algorithm | KMS+ +------------+--------------------------------------+| KMS Key ID | **********-****-****-****-**********+ +------------+--------------------------------------+| Status | Enabled-------------+------------+---------------------------------------COS Bucket Encryption ConfigurationEncryption Details:- Type: Server-Side Encryption with KMS-Managed Keys (SSE-KMS)- Description: Tencent Cloud Key Management System (KMS) manages encryption keys- KMS Key ID: **********-****-****-****-**********- Key Type: Customer Master Key (CMK)
./coscli bucket-encryption --method delete cos://example-alias
Feedback