Skip to main content

findings_metrics

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

Overview

Namefindings_metrics
TypeResource
Idaws.codeguru_security.findings_metrics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
closed_findingsobjectThe number of closed findings of each severity on the specified date.
datestring (date-time)The date from which the findings metrics were retrieved.
mean_time_to_closeobjectThe average time in days it takes to close findings of each severity as of a specified date.
new_findingsobjectThe number of new findings of each severity on the specified date.
open_findingsobjectThe number of open findings of each severity as of the specified date.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_findings_metricsselectstartDate, endDate, regionnextToken, maxResultsReturns metrics about all findings in an account within a specified time range.

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
endDatestring (date-time)The end date of the interval which you want to retrieve metrics from. Round to the nearest day.
regionstringAWS region (default: us-east-1)
startDatestring (date-time)The start date of the interval which you want to retrieve metrics from. Rounds to the nearest day.
maxResultsintegerThe maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the nextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results. If not specified, returns 1000 results.
nextTokenstringA token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

SELECT examples

Returns metrics about all findings in an account within a specified time range.

SELECT
closed_findings,
date,
mean_time_to_close,
new_findings,
open_findings
FROM aws.codeguru_security.findings_metrics
WHERE startDate = '{{ startDate }}' -- required
AND endDate = '{{ endDate }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;