:doc:`kendra <../../kendra>` / Client / tag_resource

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



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

  

  Adds the specified tag to the specified index, FAQ, data source, or other resource. If the tag already exists, the existing value is replaced with the new value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/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 index, FAQ, data source, or other resource to add a tag. For example, the ARN of an index is constructed as follows: *arn:aws:kendra:your-region:your-account-id:index/index-id* For information on how to construct an ARN for all types of Amazon Kendra resources, see `Resource types <https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkendra.html#amazonkendra-resources-for-iam-policies>`__.

    

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

    A list of tag keys to add to the index, FAQ, data source, or other resource. If a tag already exists, the existing value is replaced with the new value.

    

  
    - *(dict) --* 

      A key-value pair that identifies or categorizes an index, FAQ, data source, or other resource. TA tag key and value can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

      

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

        The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, data source, or other resource.

        

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

        The value associated with the tag. The value may be an empty string but it can't be null.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`kendra.Client.exceptions.ValidationException`

  
  *   :py:class:`kendra.Client.exceptions.ResourceUnavailableException`

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

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

  
  *   :py:class:`kendra.Client.exceptions.InternalServerException`

  