:doc:`ElasticLoadBalancingv2 <../../elbv2>` / Client / add_tags

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



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

  

  Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, trust stores, listeners, and rules.

   

  Each tag consists of a key and an optional value. If a resource already has a tag with the same key, ``AddTags`` updates its value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) of the resource.

    

  
    - *(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) --* 
  
  **Exceptions**
  
  *   :py:class:`ElasticLoadBalancingv2.Client.exceptions.DuplicateTagKeysException`

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

  
  *   :py:class:`ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundException`

  
  *   :py:class:`ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundException`

  
  *   :py:class:`ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundException`

  
  *   :py:class:`ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException`

  
  *   :py:class:`ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundException`

  

  **Examples**

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

    response = client.add_tags(
        ResourceArns=[
            'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
        ],
        Tags=[
            {
                'Key': 'project',
                'Value': 'lima',
            },
            {
                'Key': 'department',
                'Value': 'digital-media',
            },
        ],
    )
    
    print(response)

  
  Expected Output:
  ::

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

  