listAttributes

Lists the attributes for Amazon ECS resources within a specified target type and cluster. When you specify a target type and cluster, ListAttributes returns a list of attribute objects, one for each attribute on each resource. You can filter the list of results to a single attribute name to only return results that have that name. You can also filter the results by attribute name and value. You can do this, for example, to see which container instances in a cluster are running a Linux AMI (ecs.os-type=linux).

Samples

import aws.sdk.kotlin.services.ecs.model.TargetType
fun main() { 
   //sampleStart 
   // This example lists attributes for a container instance with the attribute "stack" equal to the value
// "production".
val resp = ecsClient.listAttributes {
    cluster = "MyCluster"
    targetType = TargetType.fromValue("container-instance")
    attributeName = "stack"
    attributeValue = "production"
} 
   //sampleEnd
}