Sets the server-side encryption configuration for a Table Bucket.
Usage notes
If you use KMS encryption, ensure you have activated KMS and have the required permissions to use the key.
Command format
ossutil tables-api put-table-bucket-encryption --table-bucket-arn value --encryption-configuration value [flags]
Parameter | Type | Description |
--table-bucket-arn | string | The ARN of the Table Bucket. The format is acs:osstables:{region}:{accountId}:bucket/{name}. |
--encryption-configuration | string | The server-side encryption configuration for the Table Bucket, specified as a JSON string. This configuration includes the encryption algorithm sseAlgorithm and an optional KMS key ID kmsKeyId. |
For details on the API parameters, see PutTableBucketEncryption.
For details on supported global command-line options, see ossutil global options.
--encryption-configuration
The --encryption-configuration option supports the following JSON syntax:
To use AES256 encryption:
{ "sseAlgorithm": "AES256" }To use KMS encryption:
{ "sseAlgorithm": "KMS", "kmsKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" }
Examples
Set AES256 as the encryption method for a Table Bucket.
ossutil tables-api put-table-bucket-encryption --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --encryption-configuration '{"sseAlgorithm":"AES256"}'Set KMS as the encryption method for a Table Bucket and specify a key ID.
ossutil tables-api put-table-bucket-encryption --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --encryption-configuration '{"sseAlgorithm":"KMS","kmsKeyId":"1234abcd-12ab-34cd-56ef-1234567890ab"}'Set the encryption configuration for a Table Bucket from a configuration file. The encryption-config.json file contains:
{ "sseAlgorithm": "AES256" }Command example:
ossutil tables-api put-table-bucket-encryption --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --encryption-configuration file://encryption-config.json