:doc:`WorkspacesInstances <../../workspaces-instances>` / Client / tag_resource

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



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

  

  Adds tags to a WorkSpace Instance.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-instances-2022-07-26/TagResource>`_  


  **Request Syntax**
  ::

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

    Unique identifier of the WorkSpace Instance to tag.

    

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

    Tags to be added to the WorkSpace Instance.

    

  
    - *(dict) --* 

      Represents a key-value metadata tag.

      

    
      - **Key** *(string) --* 

        Unique identifier for the tag.

        

      
      - **Value** *(string) --* 

        Value associated with the tag key.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      Confirms successful tag addition.

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

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

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

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

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

  