Creates a Table Bucket with optional server-side encryption.
Usage notes
-
Table Bucket names must be globally unique within a region.
Command format
ossutil tables-api create-table-bucket --name value [--encryption-configuration value] [flags]
|
Parameter |
Type |
Description |
|
--name |
string |
Table Bucket name. Globally unique within a region, 3–63 characters, lowercase letters, digits, and hyphens only. Must start and end with a lowercase letter or digit. |
|
--encryption-configuration |
string |
Server-side encryption configuration (JSON string). |
Note
-
This command maps to the CreateTableBucket API operation.
-
Supported global options: ossutil global options.
--encryption-configuration
JSON format:
{
"sseAlgorithm": "AES256"
}
For KMS encryption, add a key ID:
{
"sseAlgorithm": "KMS",
"kmsKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
}
Examples
-
Create a Table Bucket named my-table-bucket.
ossutil tables-api create-table-bucket --name my-table-bucket -
Create a Table Bucket with AES256 encryption (inline JSON).
ossutil tables-api create-table-bucket --name my-table-bucket --encryption-configuration '{"sseAlgorithm":"AES256"}' -
Create an encrypted Table Bucket from a config file (encryption-config.json):
{ "sseAlgorithm": "KMS", "kmsKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" }Command:
ossutil tables-api create-table-bucket --name my-table-bucket --encryption-configuration file://encryption-config.json
该文章对您有帮助吗?