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

***********************************
put_table_maintenance_configuration
***********************************



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

  

  Creates a new maintenance configuration or replaces an existing maintenance configuration for a table. For more information, see `S3 Tables maintenance <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html>`__ in the *Amazon Simple Storage Service User Guide*.

    Permissions  

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

  

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


  **Request Syntax**
  ::

    response = client.put_table_maintenance_configuration(
        tableBucketARN='string',
        namespace='string',
        name='string',
        type='icebergCompaction'|'icebergSnapshotManagement',
        value={
            'status': 'enabled'|'disabled',
            'settings': {
                'icebergCompaction': {
                    'targetFileSizeMB': 123,
                    'strategy': 'auto'|'binpack'|'sort'|'z-order'
                },
                'icebergSnapshotManagement': {
                    'minSnapshotsToKeep': 123,
                    'maxSnapshotAgeHours': 123
                }
            }
        }
    )
    
  :type tableBucketARN: string
  :param tableBucketARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the table associated with the maintenance configuration.

    

  
  :type namespace: string
  :param namespace: **[REQUIRED]** 

    The namespace of the table.

    

  
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the table.

    

  
  :type type: string
  :param type: **[REQUIRED]** 

    The type of the maintenance configuration.

    

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

    Defines the values of the maintenance configuration for the table.

    

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

      The status of the maintenance configuration.

      

    
    - **settings** *(dict) --* 

      Contains details about the settings for the maintenance configuration.

      .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``icebergCompaction``, ``icebergSnapshotManagement``. 

    
      - **icebergCompaction** *(dict) --* 

        Contains details about the Iceberg compaction settings for the table.

        

      
        - **targetFileSizeMB** *(integer) --* 

          The target file size for the table in MB.

          

        
        - **strategy** *(string) --* 

          The compaction strategy to use for the table. This determines how files are selected and combined during compaction operations.

          

        
      
      - **icebergSnapshotManagement** *(dict) --* 

        Contains details about the Iceberg snapshot management settings for the table.

        

      
        - **minSnapshotsToKeep** *(integer) --* 

          The minimum number of snapshots to keep.

          

        
        - **maxSnapshotAgeHours** *(integer) --* 

          The maximum age of a snapshot before it can be expired.

          

        
      
    
  
  
  :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`

  