:doc:`CodeDeploy <../../codedeploy>` / Client / tag_resource

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



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

  

  Associates the list of tags in the input ``Tags`` parameter with the resource identified by the ``ResourceArn`` input parameter.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/TagResource>`_  


  **Request Syntax**
  ::

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

    The ARN of a resource, such as a CodeDeploy application or deployment group.

    

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

    A list of tags that ``TagResource`` associates with a resource. The resource is identified by the ``ResourceArn`` input parameter.

    

  
    - *(dict) --* 

      Information about a tag.

      

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

        The tag's key.

        

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

        The tag's value.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.ResourceArnRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.ApplicationDoesNotExistException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentGroupDoesNotExistException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentConfigDoesNotExistException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.TagRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidTagsToAddException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.ArnNotSupportedException`

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

  