:doc:`IoTSiteWise <../../iotsitewise>` / Client / tag_resource

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



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

  

  Adds tags to an IoT SiteWise resource. If a tag already exists for the resource, this operation updates the tag's value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/TagResource>`_  


  **Request Syntax**
  ::

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

    The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the resource to tag.

    

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

    A list of key-value pairs that contain metadata for the resource. For more information, see `Tagging your IoT SiteWise resources <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html>`__ in the *IoT SiteWise User Guide*.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`IoTSiteWise.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ConflictingOperationException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.LimitExceededException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.TooManyTagsException`

  