Skip to main content

findings_statistics

Creates, updates, deletes, gets or lists a findings_statistics resource.

Overview

Namefindings_statistics
TypeResource
Idaws.guardduty.findings_statistics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
count_by_severityobjectRepresents a list of map of severity to count statistics for a set of findings.
grouped_by_accountarrayRepresents a list of map of accounts with a findings count associated with each account.
grouped_by_datearrayRepresents a list of map of dates with a count of total findings generated on each date per severity level.
grouped_by_finding_typearrayRepresents a list of map of finding types with a count of total findings generated for each type. Based on the orderBy parameter, this request returns either the most occurring finding types or the least occurring finding types. If the orderBy parameter is ASC, this will represent the least occurring finding types in your account; otherwise, this will represent the most occurring finding types. The default value of orderBy is DESC.
grouped_by_resourcearrayRepresents a list of map of top resources with a count of total findings.
grouped_by_severityarrayRepresents a list of map of total findings for each severity level.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_findings_statisticsselectdetector_id, regionLists GuardDuty findings statistics for the specified detector ID. You must provide either findingStatisticTypes or groupBy parameter, and not both. You can use the maxResults and orderBy parameters only when using groupBy. There might be regional differences because some flags might not be available in all the Regions where GuardDuty is currently supported. For more information, see Regions and endpoints.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
detector_idstringThe ID of the detector whose findings statistics you want to retrieve. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.
regionstringAWS region (default: us-east-1)

SELECT examples

Lists GuardDuty findings statistics for the specified detector ID. You must provide either findingStatisticTypes or groupBy parameter, and not both. You can use the maxResults and orderBy parameters only when using groupBy. There might be regional differences because some flags might not be available in all the Regions where GuardDuty is currently supported. For more information, see Regions and endpoints.

SELECT
count_by_severity,
grouped_by_account,
grouped_by_date,
grouped_by_finding_type,
grouped_by_resource,
grouped_by_severity
FROM aws.guardduty.findings_statistics
WHERE detector_id = '{{ detector_id }}' -- required
AND region = '{{ region }}' -- required
;