:doc:`CloudDirectory <../../clouddirectory>` / Client / tag_resource

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



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

  

  An API operation for adding tags to a resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2017-01-11/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. Tagging is only supported for directories.

    

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

    A list of tag key-value pairs.

    

  
    - *(dict) --* 

      The tag structure that contains a tag key and value.

      

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

        The key that is associated with the tag.

        

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

        The value that is associated with the tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CloudDirectory.Client.exceptions.InternalServiceException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidArnException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.RetryableConflictException`

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

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

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

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

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidTaggingRequestException`

  