tagResource
inline suspend fun ServiceDiscoveryClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse
Adds one or more tags to the specified resource.
Samples
import aws.sdk.kotlin.services.servicediscovery.model.Tag
fun main() {
//sampleStart
// This example adds "Department" and "Project" tags to a resource.
val resp = serviceDiscoveryClient.tagResource {
resourceArn = "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"
tags = listOf<Tag>(
Tag {
key = "Department"
value = "Engineering"
},
Tag {
key = "Project"
value = "Zeta"
}
)
}
//sampleEnd
}