describeMalwareScans method
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 the member accounts.
There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.
May throw BadRequestException.
May throw InternalServerErrorException.
Parameter detectorId :
The unique ID of the detector that the request is associated with.
To find the detectorId in the current Region, see the
Settings page in the GuardDuty console, or run the ListDetectors
API.
Parameter filterCriteria :
Represents the criteria to be used in the filter for describing 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 data.
Parameter sortCriteria :
Represents the criteria used for sorting scan entries. The
attributeName is required and it must be
scanStartTime.
Implementation
Future<DescribeMalwareScansResponse> describeMalwareScans({
required String detectorId,
FilterCriteria? filterCriteria,
int? maxResults,
String? nextToken,
SortCriteria? sortCriteria,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $payload = <String, dynamic>{
if (filterCriteria != null) 'filterCriteria': filterCriteria,
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: '/detector/${Uri.encodeComponent(detectorId)}/malware-scans',
exceptionFnMap: _exceptionFns,
);
return DescribeMalwareScansResponse.fromJson(response);
}