:doc:`S3Tables <../../s3tables>` / Client / put_table_bucket_encryption

***************************
put_table_bucket_encryption
***************************



.. py:method:: S3Tables.Client.put_table_bucket_encryption(**kwargs)

  

  Sets the encryption configuration for a table bucket.

    Permissions  

  You must have the ``s3tables:PutTableBucketEncryption`` permission to use this operation.

   

  .. note::

    

    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 <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-kms-permissions.html>`__ in the *Amazon Simple Storage Service User Guide*.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/s3tables-2018-05-10/PutTableBucketEncryption>`_  


  **Request Syntax**
  ::

    response = client.put_table_bucket_encryption(
        tableBucketARN='string',
        encryptionConfiguration={
            'sseAlgorithm': 'AES256'|'aws:kms',
            'kmsKeyArn': 'string'
        }
    )
    
  :type tableBucketARN: string
  :param tableBucketARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the table bucket.

    

  
  :type encryptionConfiguration: dict
  :param encryptionConfiguration: **[REQUIRED]** 

    The encryption configuration to apply to the table bucket.

    

  
    - **sseAlgorithm** *(string) --* **[REQUIRED]** 

      The server-side encryption algorithm to use. Valid values are ``AES256`` for S3-managed encryption keys, or ``aws:kms`` for Amazon Web Services KMS-managed encryption keys. 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 <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-kms-permissions.html>`__.

      

    
    - **kmsKeyArn** *(string) --* 

      The Amazon Resource Name (ARN) of the KMS key to use for encryption. This field is required only when ``sseAlgorithm`` is set to ``aws:kms``.

      

    
  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`S3Tables.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`S3Tables.Client.exceptions.ForbiddenException`

  
  *   :py:class:`S3Tables.Client.exceptions.NotFoundException`

  
  *   :py:class:`S3Tables.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`S3Tables.Client.exceptions.ConflictException`

  
  *   :py:class:`S3Tables.Client.exceptions.BadRequestException`

  