listNodesSummary
inline suspend fun SsmClient.listNodesSummary(crossinline block: ListNodesSummaryRequest.Builder.() -> Unit): ListNodesSummaryResponse
Generates a summary of managed instance/node metadata based on the filters and aggregators you specify. Results are grouped by the input aggregator you specify.
Samples
import aws.sdk.kotlin.services.ssm.model.NodeAggregator
import aws.sdk.kotlin.services.ssm.model.NodeAggregatorType
import aws.sdk.kotlin.services.ssm.model.NodeAttributeName
import aws.sdk.kotlin.services.ssm.model.NodeFilter
import aws.sdk.kotlin.services.ssm.model.NodeFilterKey
import aws.sdk.kotlin.services.ssm.model.NodeFilterOperatorType
import aws.sdk.kotlin.services.ssm.model.NodeTypeName
fun main() {
//sampleStart
// This example illustrates one usage of ListNodesSummary
val resp = ssmClient.listNodesSummary {
syncName = "AWS-QuickSetup-ManagedNode"
aggregators = listOf<NodeAggregator>(
NodeAggregator {
aggregatorType = NodeAggregatorType.fromValue("Count")
typeName = NodeTypeName.fromValue("Instance")
attributeName = NodeAttributeName.fromValue("Region")
}
)
filters = listOf<NodeFilter>(
NodeFilter {
key = NodeFilterKey.fromValue("InstanceStatus")
values = listOf<String>(
"Active"
)
type = NodeFilterOperatorType.fromValue("Equal")
}
)
maxResults = 2
nextToken = "A9lT8CAxj9aDFRi+MNAoFq08I---EXAMPLE"
}
//sampleEnd
}