listDetectMitigationActionsExecutions method

Future<ListDetectMitigationActionsExecutionsResponse> listDetectMitigationActionsExecutions({
  1. DateTime? endTime,
  2. int? maxResults,
  3. String? nextToken,
  4. DateTime? startTime,
  5. String? taskId,
  6. String? thingName,
  7. String? violationId,
})

Lists mitigation actions executions for a Device Defender ML Detect Security Profile.

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

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

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.

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 taskId : The unique identifier of the task.

Parameter thingName : The name of the thing whose mitigation actions are listed.

Parameter violationId : The unique identifier of the violation.

Implementation

Future<ListDetectMitigationActionsExecutionsResponse>
    listDetectMitigationActionsExecutions({
  DateTime? endTime,
  int? maxResults,
  String? nextToken,
  DateTime? startTime,
  String? taskId,
  String? thingName,
  String? violationId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  _s.validateStringLength(
    'taskId',
    taskId,
    1,
    128,
  );
  _s.validateStringLength(
    'thingName',
    thingName,
    1,
    128,
  );
  _s.validateStringLength(
    'violationId',
    violationId,
    1,
    128,
  );
  final $query = <String, List<String>>{
    if (endTime != null) 'endTime': [_s.iso8601ToJson(endTime).toString()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (startTime != null)
      'startTime': [_s.iso8601ToJson(startTime).toString()],
    if (taskId != null) 'taskId': [taskId],
    if (thingName != null) 'thingName': [thingName],
    if (violationId != null) 'violationId': [violationId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/detect/mitigationactions/executions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDetectMitigationActionsExecutionsResponse.fromJson(response);
}