stopEventsDetectionJob method

Future<StopEventsDetectionJobResponse> stopEventsDetectionJob({
  1. required String jobId,
})

Stops an events detection job in progress.

May throw InternalServerException. May throw InvalidRequestException. May throw JobNotFoundException.

Parameter jobId : The identifier of the events detection job to stop.

Implementation

Future<StopEventsDetectionJobResponse> stopEventsDetectionJob({
  required String jobId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Comprehend_20171127.StopEventsDetectionJob'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'JobId': jobId,
    },
  );

  return StopEventsDetectionJobResponse.fromJson(jsonResponse.body);
}