listFindings method

Future<ListFindingsResponse> listFindings({
  1. FindingCriteria? findingCriteria,
  2. int? maxResults,
  3. String? nextToken,
  4. SortCriteria? sortCriteria,
})

Retrieves a subset of information about one or more findings.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter findingCriteria : The criteria to use to filter the results.

Parameter maxResults : The maximum number of items to include in each page of the response.

Parameter nextToken : The nextToken string that specifies which page of results to return in a paginated response.

Parameter sortCriteria : The criteria to use to sort the results.

Implementation

Future<ListFindingsResponse> listFindings({
  FindingCriteria? findingCriteria,
  int? maxResults,
  String? nextToken,
  SortCriteria? sortCriteria,
}) async {
  final $payload = <String, dynamic>{
    if (findingCriteria != null) 'findingCriteria': findingCriteria,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (sortCriteria != null) 'sortCriteria': sortCriteria,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/findings',
    exceptionFnMap: _exceptionFns,
  );
  return ListFindingsResponse.fromJson(response);
}