:doc:`IoTThingsGraph <../../iotthingsgraph>` / Client / tag_resource

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



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

  

  Creates a tag for the specified resource.

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotthingsgraph-2018-09-06/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 whose tags are returned.

    

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

    A list of tags to add to the resource.>

    

  
    - *(dict) --* 

      Metadata assigned to an AWS IoT Things Graph resource consisting of a key-value pair.

      

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

        The required name of the tag. The string value can be from 1 to 128 Unicode characters in length.

        

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

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

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

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.ResourceAlreadyExistsException`

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

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

  