addTags
inline suspend fun ElasticLoadBalancingClient.addTags(crossinline block: AddTagsRequest.Builder.() -> Unit): AddTagsResponse
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 in the Classic Load Balancers Guide.
Samples
import aws.sdk.kotlin.services.elasticloadbalancing.model.Tag
fun main() {
//sampleStart
// This example adds two tags to the specified load balancer.
elasticLoadBalancingClient.addTags {
loadBalancerNames = listOf<String>(
"my-load-balancer"
)
tags = listOf<Tag>(
Tag {
key = "project"
value = "lima"
},
Tag {
key = "department"
value = "digital-media"
}
)
}
//sampleEnd
}