cancelJob method

Future<void> cancelJob({
  1. required String id,
})

The CancelJob operation cancels an unfinished job.

May throw ValidationException. May throw IncompatibleVersionException. May throw ResourceNotFoundException. May throw ResourceInUseException. May throw AccessDeniedException. May throw InternalServiceException.

Parameter id : The identifier of the job that you want to cancel.

To get a list of the jobs (including their jobId) that have a status of Submitted, use the ListJobsByStatus API action.

Implementation

Future<void> cancelJob({
  required String id,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/2012-09-25/jobs/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
}