addTags

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.

Samples

import aws.sdk.kotlin.services.elasticloadbalancingv2.model.Tag
fun main() { 
   //sampleStart 
   // This example adds the specified tags to the specified load balancer.
elasticLoadBalancingV2Client.addTags {
    resourceArns = listOf<String>(
        "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188"
    )
    tags = listOf<Tag>(
        Tag {
            key = "project"
            value = "lima"
        },
        Tag {
            key = "department"
            value = "digital-media"
        }            
    )
} 
   //sampleEnd
}