:doc:`Personalize <../../personalize>` / Client / tag_resource

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



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

  

  Add a list of tags to a resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/TagResource>`_  


  **Request Syntax**
  ::

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

    The resource's Amazon Resource Name (ARN).

    

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

    Tags to apply to the resource. For more information see `Tagging Amazon Personalize resources <https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html>`__.

    

  
    - *(dict) --* 

      The optional metadata that you apply to resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information see `Tagging Amazon Personalize resources <https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html>`__.

      

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

        One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

        

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

        The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key).

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Personalize.Client.exceptions.InvalidInputException`

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

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

  
  *   :py:class:`Personalize.Client.exceptions.ResourceInUseException`

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

  