:doc:`EndUserMessagingSocial <../../socialmessaging>` / Client / tag_resource

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



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

  

  Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/socialmessaging-2024-01-01/TagResource>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) of the resource to tag.

    

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

    The tags to add to the resource.

    

  
    - *(dict) --* 

      The tag for a resource.

      

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

        The tag key.

        

      
      - **value** *(string) --* 

        The tag value.

        

      
    

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

    
    ::

      {
          'statusCode': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **statusCode** *(integer) --* 

        The status code of the tag resource operation.

        
  
  **Exceptions**
  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ValidationException`

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

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InvalidParametersException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ThrottledRequestException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InternalServiceException`

  