getFindings

abstract suspend fun getFindings(input: GetFindingsRequest = GetFindingsRequest { }): GetFindingsResponse

Returns a list of findings that match the specified criteria.

If finding aggregation is enabled, then when you call GetFindings from the aggregation Region, the results include all of the matching findings from both the aggregation Region and the linked Regions.

Samples

import aws.sdk.kotlin.services.securityhub.model.StringFilter
fun main() { 
   //sampleStart 
   // The following example returns a filtered and sorted list of Security Hub findings.
val resp = securityHubClient.getFindings {
    filters = AwsSecurityFindingFilters {
        awsAccountId = listOf<StringFilter>(
            StringFilter {
                value = "123456789012"
                comparison = StringFilterComparison.fromValue("PREFIX")
            }                
        )
    }
    maxResults = 1
} 
   //sampleEnd
}