Sets the encryption configuration for a table bucket.
- Permissions
-
You must have the s3tables:PutTableBucketEncryption permission to use this operation.
If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption in the Amazon Simple Storage Service User Guide.
Parameters:
-
table_bucket_arn
(TableBucketARN)
–
The Amazon Resource Name (ARN) of the table bucket.
-
encryption_configuration
(EncryptionConfiguration)
–
The encryption configuration to apply to the table bucket.
Raises:
Source code in docs_src/capo_s3tables/_services/async_s3_tables.py
| async def put_table_bucket_encryption(
self,
table_bucket_arn: "capo_s3tables.types.table_bucket_arn.TableBucketARN",
encryption_configuration: "capo_s3tables.types.encryption_configuration.EncryptionConfiguration",
*,
config_overrides: Optional[AsyncS3TablesClientConfig] = None,
) -> None:
"""<p>Sets the encryption configuration for a table bucket.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:PutTableBucketEncryption</code> permission to use this operation.</p> <note> <p>If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-kms-permissions.html">Permissions requirements for S3 Tables SSE-KMS encryption</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> </note> </dd> </dl>
Args:
table_bucket_arn: <p>The Amazon Resource Name (ARN) of the table bucket.</p>
encryption_configuration: <p>The encryption configuration to apply to the table bucket.</p>
Raises:
capo_s3tables.errors.bad_request_exception.BadRequestException: <p>The request is invalid or malformed.</p>
capo_s3tables.errors.conflict_exception.ConflictException: <p>The request failed because there is a conflict with a previous write. You can retry the request.</p>
capo_s3tables.errors.forbidden_exception.ForbiddenException: <p>The caller isn't authorized to make the request.</p>
capo_s3tables.errors.internal_server_error_exception.InternalServerErrorException: <p>The request failed due to an internal server error.</p>
capo_s3tables.errors.not_found_exception.NotFoundException: <p>The request was rejected because the specified resource could not be found.</p>
capo_s3tables.errors.too_many_requests_exception.TooManyRequestsException: <p>The limit on the number of requests per second was exceeded.</p>
capo_s3tables.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3tables.types.put_table_bucket_encryption_request.PutTableBucketEncryptionRequest]",
) -> AsyncOperationResponse[None]:
import capo_s3tables._operations.s3_table_buckets.put_table_bucket_encryption
(
output,
http_response,
) = await capo_s3tables._operations.s3_table_buckets.put_table_bucket_encryption.async_put_table_bucket_encryption(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutTableBucketEncryption")
)
input_: capo_s3tables.types.put_table_bucket_encryption_request.PutTableBucketEncryptionRequest = {
"table_bucket_arn": table_bucket_arn,
"encryption_configuration": encryption_configuration,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|