:doc:`WorkSpacesWeb <../../workspaces-web>` / Client / tag_resource

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



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

  

  Adds or overwrites one or more tags for the specified resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-web-2020-07-08/TagResource>`_  


  **Request Syntax**
  ::

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

    The ARN of the resource.

    

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

    The tags of the resource.

    

  
    - *(dict) --* 

      The tag.

      

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

        The key of the tag.

        

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

        The value of the tag

        

      
    

  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.

     

    If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

    This field is autopopulated if not provided.

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

    
    ::

      {}
      
    **Response Structure**

    

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

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

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

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

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

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

  