Sets the server-side encryption configuration for a Table Bucket.
Usage notes
To use KMS encryption, activate KMS and make sure you have the required permissions to use the target key.
Command format
ossutil tables-api put-table-bucket-encryption --table-bucket-arn value --encryption-configuration value [flags]
|
Parameter |
Type |
Required |
Description |
|
--table-bucket-arn |
string |
Yes |
The ARN of the Table Bucket. Format: |
|
--encryption-configuration |
string |
Yes |
The server-side encryption configuration, specified as a JSON string or a file path (using |
For details on the API parameters, see PutTableBucketEncryption.
For details on supported global command-line options, see ossutil global options.
--encryption-configuration
Pass the encryption configuration as an inline JSON string or a file:// path. The JSON object supports the following fields:
|
Field |
Type |
Required |
Valid values |
|
|
string |
Yes |
|
|
|
string |
Required when |
A KMS key ID |
-
To use AES256 encryption:
{ "sseAlgorithm": "AES256" } -
To use KMS encryption with a specific key:
{ "sseAlgorithm": "KMS", "kmsKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" }
Examples
-
Set AES256 encryption on 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 encryption on 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"}' -
Load the encryption configuration from a file. The
encryption-config.jsonfile 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