listDetectMitigationActionsTasks method

Future<ListDetectMitigationActionsTasksResponse> listDetectMitigationActionsTasks({
  1. required DateTime endTime,
  2. required DateTime startTime,
  3. int? maxResults,
  4. String? nextToken,
})

List of Device Defender ML Detect mitigation actions tasks.

May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException.

Parameter endTime : The end of the time period for which ML Detect mitigation actions tasks are returned.

Parameter startTime : A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.

Parameter maxResults : The maximum number of results to return at one time. The default is 25.

Parameter nextToken : The token for the next set of results.

Implementation

Future<ListDetectMitigationActionsTasksResponse>
    listDetectMitigationActionsTasks({
  required DateTime endTime,
  required DateTime startTime,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(endTime, 'endTime');
  ArgumentError.checkNotNull(startTime, 'startTime');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    'endTime': [_s.iso8601ToJson(endTime).toString()],
    'startTime': [_s.iso8601ToJson(startTime).toString()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/detect/mitigationactions/tasks',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDetectMitigationActionsTasksResponse.fromJson(response);
}