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

****************************
put_table_bucket_replication
****************************



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

  

  Creates or updates the replication configuration for a table bucket. This operation defines how tables in the source bucket are replicated to destination buckets. Replication helps ensure data availability and disaster recovery across regions or accounts.

    Permissions  

  
  * You must have the ``s3tables:PutTableBucketReplication`` permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source bucket and write permissions to all destination buckets.
   
  * You must also have the following permissions: 

    
    * ``s3tables:GetTable`` permission on the source table.
     
    * ``s3tables:ListTables`` permission on the bucket containing the table.
     
    * ``s3tables:CreateTable`` permission for the destination.
     
    * ``s3tables:CreateNamespace`` permission for the destination.
     
    * ``s3tables:GetTableMaintenanceConfig`` permission for the source bucket.
     
    * ``s3tables:PutTableMaintenanceConfig`` permission for the destination bucket.
    

  
   
  * You must have ``iam:PassRole`` permission with condition allowing roles to be passed to ``replication.s3tables.amazonaws.com``.
  

  

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


  **Request Syntax**
  ::

    response = client.put_table_bucket_replication(
        tableBucketARN='string',
        versionToken='string',
        configuration={
            'role': 'string',
            'rules': [
                {
                    'destinations': [
                        {
                            'destinationTableBucketARN': 'string'
                        },
                    ]
                },
            ]
        }
    )
    
  :type tableBucketARN: string
  :param tableBucketARN: **[REQUIRED]** 

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

    

  
  :type versionToken: string
  :param versionToken: 

    A version token from a previous GetTableBucketReplication call. Use this token to ensure you're updating the expected version of the configuration.

    

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

    The replication configuration to apply, including the IAM role and replication rules.

    

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

      The Amazon Resource Name (ARN) of the IAM role that S3 Tables assumes to replicate tables on your behalf.

      

    
    - **rules** *(list) --* **[REQUIRED]** 

      An array of replication rules that define which tables to replicate and where to replicate them.

      

    
      - *(dict) --* 

        Defines a rule for replicating tables from a source table bucket to one or more destination table buckets.

        

      
        - **destinations** *(list) --* **[REQUIRED]** 

          An array of destination table buckets where tables should be replicated.

          

        
          - *(dict) --* 

            Specifies a destination table bucket for replication.

            

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

              The Amazon Resource Name (ARN) of the destination table bucket where tables will be replicated.

              

            
          
      
      
  
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'versionToken': 'string',
          'status': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **versionToken** *(string) --* 

        A new version token representing the updated replication configuration.

        
      

      - **status** *(string) --* 

        The status of the replication configuration operation.

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

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

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

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

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

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

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

  