:doc:`GreengrassV2 <../../greengrassv2>` / Client / tag_resource

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



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

  

  Adds tags to an IoT Greengrass 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/greengrassv2-2020-11-30/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 `Tag your resources <https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html>`__ in the *IoT Greengrass V2 Developer Guide*.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`GreengrassV2.Client.exceptions.InternalServerException`

  
  *   :py:class:`GreengrassV2.Client.exceptions.ValidationException`

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

  