listAuditMitigationActionsExecutions method

Future<ListAuditMitigationActionsExecutionsResponse> listAuditMitigationActionsExecutions({
  1. required String findingId,
  2. required String taskId,
  3. AuditMitigationActionsExecutionStatus? actionStatus,
  4. int? maxResults,
  5. String? nextToken,
})

Gets the status of audit mitigation action tasks that were executed.

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

Parameter findingId : Specify this filter to limit results to those that were applied to a specific audit finding.

Parameter taskId : Specify this filter to limit results to actions for a specific audit mitigation actions task.

Parameter actionStatus : Specify this filter to limit results to those with a specific status.

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<ListAuditMitigationActionsExecutionsResponse>
    listAuditMitigationActionsExecutions({
  required String findingId,
  required String taskId,
  AuditMitigationActionsExecutionStatus? actionStatus,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(findingId, 'findingId');
  _s.validateStringLength(
    'findingId',
    findingId,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(taskId, 'taskId');
  _s.validateStringLength(
    'taskId',
    taskId,
    1,
    128,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    'findingId': [findingId],
    'taskId': [taskId],
    if (actionStatus != null) 'actionStatus': [actionStatus.toValue()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/audit/mitigationactions/executions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAuditMitigationActionsExecutionsResponse.fromJson(response);
}