Queries the encryption rules configured for a bucket.
Usage notes
By default, an Alibaba Cloud account has the permissions to query the encryption rules of a bucket. If you want to use a RAM user or Security Token Service (STS) to query the encryption rules of a bucket, you must have the oss:GetBucketEncryption permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-encryption --bucket value [flags]Parameter | Type | Description |
--bucket | string | The name of the bucket whose encryption rules you want to query. |
The get-bucket-encryption command corresponds to the GetBucketEncryption operation. For more information about the parameters in the GetBucketEncryption operation, see GetBucketEncryption.
For more information about supported global command-line options, see Command-line options.
Examples
Run the following command to query the encryption rules of a bucket named examplebucket:
ossutil api get-bucket-encryption --bucket examplebucketRun the following command to query the encryption rules of a bucket named examplebucket and display the encryption rules in the JSON format:
ossutil api get-bucket-encryption --bucket examplebucket --output-format jsonRun the following command to query the encryption rules of a bucket named examplebucket and display the encryption rules in the YAML format:
ossutil api get-bucket-encryption --bucket examplebucket --output-format yaml