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

************
tag_resource
************



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

  

  Applies one or more user-defined tags to an Amazon S3 Tables resource or updates existing tags. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 tags for each S3 resource.

   

  .. note::

    

    For a list of S3 resources that support tagging, see `Managing tags for Amazon S3 resources <https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags>`__.

    

    Permissions  

  For tables and table buckets, you must have the ``s3tables:TagResource`` permission to use this operation.

  

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


  **Request Syntax**
  ::

    response = client.tag_resource(
        resourceArn='string',
        tags={
            'string': 'string'
        }
    )
    
  :type resourceArn: string
  :param resourceArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the Amazon S3 Tables resource that you're applying tags to. The tagged resource can be a table bucket or a table. For a list of all S3 resources that support tagging, see `Managing tags for Amazon S3 resources <https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags>`__.

    

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

    The user-defined tag that you want to add to the specified S3 Tables resource. For more information, see `Tagging for cost allocation or attribute-based access control (ABAC) <https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html>`__.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **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`

  