ElasticLoadBalancingv2 / Client / remove_tags

remove_tags#

ElasticLoadBalancingv2.Client.remove_tags(**kwargs)#

Removes the specified tags from the specified Elastic Load Balancing resources. You can remove the tags for one or more Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, listeners, or rules.

See also: AWS API Documentation

Request Syntax

response = client.remove_tags(
    ResourceArns=[
        'string',
    ],
    TagKeys=[
        'string',
    ]
)
Parameters:
  • ResourceArns (list) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource.

    • (string) –

  • TagKeys (list) –

    [REQUIRED]

    The tag keys for the tags to remove.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundException

  • ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundException

  • ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundException

  • ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException

  • ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException

  • ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundException

Examples

This example removes the specified tags from the specified load balancer.

response = client.remove_tags(
    ResourceArns=[
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    ],
    TagKeys=[
        'project',
        'department',
    ],
)

print(response)

Expected Output:

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