createFindingsReport method

Future<CreateFindingsReportResponse> createFindingsReport({
  1. required ReportFormat reportFormat,
  2. required Destination s3Destination,
  3. FilterCriteria? filterCriteria,
})

Creates a finding report. By default only ACTIVE findings are returned in the report. To see SUPRESSED or CLOSED findings you must specify a value for the findingStatus filter criteria.

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

Parameter reportFormat : The format to generate the report in.

Parameter s3Destination : The Amazon S3 export destination for the report.

Parameter filterCriteria : The filter criteria to apply to the results of the finding report.

Implementation

Future<CreateFindingsReportResponse> createFindingsReport({
  required ReportFormat reportFormat,
  required Destination s3Destination,
  FilterCriteria? filterCriteria,
}) async {
  final $payload = <String, dynamic>{
    'reportFormat': reportFormat.value,
    's3Destination': s3Destination,
    if (filterCriteria != null) 'filterCriteria': filterCriteria,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/reporting/create',
    exceptionFnMap: _exceptionFns,
  );
  return CreateFindingsReportResponse.fromJson(response);
}