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

****************
put_table_policy
****************



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

  

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

    Permissions  

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

  

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


  **Request Syntax**
  ::

    response = client.put_table_policy(
        tableBucketARN='string',
        namespace='string',
        name='string',
        resourcePolicy='string'
    )
    
  :type tableBucketARN: string
  :param tableBucketARN: **[REQUIRED]** 

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

    

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

    The namespace associated with the table.

    

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

    The name of the table.

    

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

    The ``JSON`` that defines the policy.

    

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

  