createTableBucket method

Future<CreateTableBucketResponse> createTableBucket({
  1. required String name,
  2. EncryptionConfiguration? encryptionConfiguration,
  3. StorageClassConfiguration? storageClassConfiguration,
  4. Map<String, String>? tags,
})

Creates a table bucket. For more information, see Creating a table bucket in the Amazon Simple Storage Service User Guide.

Permissions
  • You must have the s3tables:CreateTableBucket permission to use this operation.
  • If you use this operation with the optional encryptionConfiguration parameter you must have the s3tables:PutTableBucketEncryption permission.
  • If you use this operation with the storageClassConfiguration request parameter, you must have the s3tables:PutTableBucketStorageClass permission.
  • To create a table bucket with tags, you must have the s3tables:TagResource permission in addition to s3tables:CreateTableBucket permission.

May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter name : The name for the table bucket.

Parameter encryptionConfiguration : The encryption configuration to use for the table bucket. This configuration specifies the default encryption settings that will be applied to all tables created in this bucket unless overridden at the table level. The configuration includes the encryption algorithm and, if using SSE-KMS, the KMS key to use.

Parameter storageClassConfiguration : The default storage class configuration for the table bucket. This configuration will be applied to all new tables created in this bucket unless overridden at the table level. If not specified, the service default storage class will be used.

Parameter tags : A map of user-defined tags that you would like to apply to the table bucket that you are creating. A tag is a key-value pair that you apply to your resources. Tags can help you organize and control access to resources. For more information, see Tagging for cost allocation or attribute-based access control (ABAC).

Implementation

Future<CreateTableBucketResponse> createTableBucket({
  required String name,
  EncryptionConfiguration? encryptionConfiguration,
  StorageClassConfiguration? storageClassConfiguration,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    if (encryptionConfiguration != null)
      'encryptionConfiguration': encryptionConfiguration,
    if (storageClassConfiguration != null)
      'storageClassConfiguration': storageClassConfiguration,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/buckets',
    exceptionFnMap: _exceptionFns,
  );
  return CreateTableBucketResponse.fromJson(response);
}