cancelAuditMitigationActionsTask method

Future<void> cancelAuditMitigationActionsTask({
  1. required String taskId,
})

Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException occurs.

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

Parameter taskId : The unique identifier for the task that you want to cancel.

Implementation

Future<void> cancelAuditMitigationActionsTask({
  required String taskId,
}) async {
  ArgumentError.checkNotNull(taskId, 'taskId');
  _s.validateStringLength(
    'taskId',
    taskId,
    1,
    128,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'PUT',
    requestUri:
        '/audit/mitigationactions/tasks/${Uri.encodeComponent(taskId)}/cancel',
    exceptionFnMap: _exceptionFns,
  );
}