batchStopJobRun method

Future<BatchStopJobRunResponse> batchStopJobRun({
  1. required String jobName,
  2. required List<String> jobRunIds,
})

Stops one or more job runs for a specified job definition.

May throw InvalidInputException. May throw InternalServiceException. May throw OperationTimeoutException.

Parameter jobName : The name of the job definition for which to stop job runs.

Parameter jobRunIds : A list of the JobRunIds that should be stopped for that job definition.

Implementation

Future<BatchStopJobRunResponse> batchStopJobRun({
  required String jobName,
  required List<String> jobRunIds,
}) async {
  ArgumentError.checkNotNull(jobName, 'jobName');
  _s.validateStringLength(
    'jobName',
    jobName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(jobRunIds, 'jobRunIds');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.BatchStopJobRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'JobName': jobName,
      'JobRunIds': jobRunIds,
    },
  );

  return BatchStopJobRunResponse.fromJson(jsonResponse.body);
}