:doc:`BackupGateway <../../backup-gateway>` / Client / tag_resource

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



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

  

  Tag the resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/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 to tag.

    

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

    A list of tags to assign to the resource.

    

  
    - *(dict) --* 

      A key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.

      

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

        The key part of a tag's key-value pair. The key can't start with ``aws:``.

        

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

        The value part of a tag's key-value pair.

        

      
    

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

    
    ::

      {
          'ResourceARN': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ResourceARN** *(string) --* 

        The Amazon Resource Name (ARN) of the resource you tagged.

        
  
  **Exceptions**
  
  *   :py:class:`BackupGateway.Client.exceptions.ValidationException`

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

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

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

  