getCisScanReport method

Future<GetCisScanReportResponse> getCisScanReport({
  1. required String scanArn,
  2. CisReportFormat? reportFormat,
  3. List<String>? targetAccounts,
})

Retrieves a CIS scan report.

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

Parameter scanArn : The scan ARN.

Parameter reportFormat : The format of the report. Valid values are PDF and CSV. If no value is specified, the report format defaults to PDF.

Parameter targetAccounts : The target accounts.

Implementation

Future<GetCisScanReportResponse> getCisScanReport({
  required String scanArn,
  CisReportFormat? reportFormat,
  List<String>? targetAccounts,
}) async {
  final $payload = <String, dynamic>{
    'scanArn': scanArn,
    if (reportFormat != null) 'reportFormat': reportFormat.value,
    if (targetAccounts != null) 'targetAccounts': targetAccounts,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/cis/scan/report/get',
    exceptionFnMap: _exceptionFns,
  );
  return GetCisScanReportResponse.fromJson(response);
}