:doc:`ElasticLoadBalancing <../../elb>` / Client / add_tags

********
add_tags
********



.. py:method:: ElasticLoadBalancing.Client.add_tags(**kwargs)

  

  Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

   

  Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, ``AddTags`` updates its value.

   

  For more information, see `Tag Your Classic Load Balancer <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html>`__ in the *Classic Load Balancers Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags>`_  


  **Request Syntax**
  ::

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

    The name of the load balancer. You can specify one load balancer only.

    

  
    - *(string) --* 

    

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

    The tags.

    

  
    - *(dict) --* 

      Information about a tag.

      

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

        The key of the tag.

        

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

        The value of the tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the output of AddTags.

      
  
  **Exceptions**
  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.AccessPointNotFoundException`

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

  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.DuplicateTagKeysException`

  

  **Examples**

  This example adds two tags to the specified load balancer.
  ::

    response = client.add_tags(
        LoadBalancerNames=[
            'my-load-balancer',
        ],
        Tags=[
            {
                'Key': 'project',
                'Value': 'lima',
            },
            {
                'Key': 'department',
                'Value': 'digital-media',
            },
        ],
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  