:doc:`DirectConnect <../../directconnect>` / Client / tag_resource

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



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

  

  Adds the specified tags to the specified Direct Connect resource. Each resource can have a maximum of 50 tags.

   

  Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/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.

    

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

    The tags to add.

    

  
    - *(dict) --* 

      Information about a tag.

      

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

        The key.

        

      
      - **value** *(string) --* 

        The value.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`DirectConnect.Client.exceptions.DuplicateTagKeysException`

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

  
  *   :py:class:`DirectConnect.Client.exceptions.DirectConnectServerException`

  
  *   :py:class:`DirectConnect.Client.exceptions.DirectConnectClientException`

  