listMalwareScans method

Future<ListMalwareScansResponse> listMalwareScans({
  1. ListMalwareScansFilterCriteria? filterCriteria,
  2. int? maxResults,
  3. String? nextToken,
  4. SortCriteria? sortCriteria,
})

Returns a list of malware scans. Each member account can view the malware scans for their own accounts. An administrator can view the malware scans for all of its members' accounts.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter filterCriteria : Represents the criteria used to filter the malware scan entries.

Parameter maxResults : You can use this parameter to indicate the maximum number of items that you want in the response. The default value is 50. The maximum value is 50.

Parameter nextToken : You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing results.

Parameter sortCriteria : Represents the criteria used for sorting malware scan entries.

Implementation

Future<ListMalwareScansResponse> listMalwareScans({
  ListMalwareScansFilterCriteria? filterCriteria,
  int? maxResults,
  String? nextToken,
  SortCriteria? sortCriteria,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final $payload = <String, dynamic>{
    if (filterCriteria != null) 'filterCriteria': filterCriteria,
    if (sortCriteria != null) 'sortCriteria': sortCriteria,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/malware-scan',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListMalwareScansResponse.fromJson(response);
}