deleteTags
inline suspend fun Ec2Client.deleteTags(crossinline block: DeleteTagsRequest.Builder.() -> Unit): DeleteTagsResponse
Deletes the specified set of tags from the specified set of resources.
To list the current tags, use DescribeTags. For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.
Samples
import aws.sdk.kotlin.services.ec2.model.Tag
fun main() {
//sampleStart
// This example deletes the tag Stack test from the specified image.
ec2Client.deleteTags {
resources = listOf<String>(
"ami-78a54011"
)
tags = listOf<Tag>(
Tag {
key = "Stack"
value = "test"
}
)
}
//sampleEnd
}