createInsight
Creates a custom insight in Security Hub CSPM. An insight is a consolidation of findings that relate to a security issue that requires attention or remediation.
To group the related findings in the insight, use the GroupByAttribute.
Samples
// The following example creates a custom insight in Security Hub. An insight is a collection of
// findings that relate to a security issue.
val resp = securityHubClient.createInsight {
name = "Critical role findings"
filters = AwsSecurityFindingFilters {
resourceType = listOf<StringFilter>(
StringFilter {
comparison = StringFilterComparison.fromValue("EQUALS")
value = "AwsIamRole"
}
)
severityLabel = listOf<StringFilter>(
StringFilter {
comparison = StringFilterComparison.fromValue("EQUALS")
value = "CRITICAL"
}
)
}
groupByAttribute = "ResourceId"
}Content copied to clipboard