describeTags
inline suspend fun Ec2Client.describeTags(crossinline block: DescribeTagsRequest.Builder.() -> Unit): DescribeTagsResponse
Describes the specified tags for your EC2 resources.
For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.
We strongly recommend using only paginated requests. Unpaginated requests are susceptible to throttling and timeouts.
The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.
Samples
import aws.sdk.kotlin.services.ec2.model.Filter
fun main() {
//sampleStart
// This example describes the tags for the specified instance.
val resp = ec2Client.describeTags {
filters = listOf<Filter>(
Filter {
name = "resource-id"
values = listOf<String>(
"i-1234567890abcdef8"
)
}
)
}
//sampleEnd
}