:doc:`SNS <../../sns>` / Client / tag_resource

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



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

  

  Add tags to the specified Amazon SNS topic. For an overview, see `Amazon SNS Tags <https://docs.aws.amazon.com/sns/latest/dg/sns-tags.html>`__ in the *Amazon SNS Developer Guide*.

   

  When you use topic tags, keep the following guidelines in mind:

   

  
  * Adding more than 50 tags to a topic isn't recommended.
   
  * Tags don't have any semantic meaning. Amazon SNS interprets tags as character strings.
   
  * Tags are case-sensitive.
   
  * A new tag with a key identical to that of an existing tag overwrites the existing tag.
   
  * Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your application requires a higher throughput, file a `technical support request <https://console.aws.amazon.com/support/home#/case/create?issueType=technical>`__.
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/TagResource>`_  


  **Request Syntax**
  ::

    response = client.tag_resource(
        ResourceArn='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    The ARN of the topic to which to add tags.

    

  
  :type Tags: list
  :param Tags: **[REQUIRED]** 

    The tags to be added to the specified topic. A tag consists of a required key and an optional value.

    

  
    - *(dict) --* 

      The list of tags to be added to the specified topic.

      

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

        The required key portion of the tag.

        

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

        The optional value portion of the tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SNS.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`SNS.Client.exceptions.TagLimitExceededException`

  
  *   :py:class:`SNS.Client.exceptions.StaleTagException`

  
  *   :py:class:`SNS.Client.exceptions.TagPolicyException`

  
  *   :py:class:`SNS.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`SNS.Client.exceptions.AuthorizationErrorException`

  
  *   :py:class:`SNS.Client.exceptions.ConcurrentAccessException`

  