listFindingsMetrics method
Returns metrics about all findings in an account within a specified time range.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter endDate :
The end date of the interval which you want to retrieve metrics from.
Round to the nearest day.
Parameter startDate :
The start date of the interval which you want to retrieve metrics from.
Rounds to the nearest day.
Parameter maxResults :
The 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.
Parameter nextToken :
A 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.
Implementation
Future<ListFindingsMetricsResponse> listFindingsMetrics({
required DateTime endDate,
required DateTime startDate,
int? maxResults,
String? nextToken,
}) async {
final $query = <String, List<String>>{
'endDate': [_s.iso8601ToJson(endDate).toString()],
'startDate': [_s.iso8601ToJson(startDate).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/metrics/findings',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListFindingsMetricsResponse.fromJson(response);
}