getScan method

Future<GetScanResponse> getScan({
  1. required String scanName,
  2. String? runId,
})

Returns details about a scan, including whether or not a scan has completed.

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

Parameter scanName : The name of the scan you want to view details about.

Parameter runId : UUID that identifies the individual scan run you want to view details about. You retrieve this when you call the CreateScan operation. Defaults to the latest scan run if missing.

Implementation

Future<GetScanResponse> getScan({
  required String scanName,
  String? runId,
}) async {
  final $query = <String, List<String>>{
    if (runId != null) 'runId': [runId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/scans/${Uri.encodeComponent(scanName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetScanResponse.fromJson(response);
}