batchUpdateJob method
Updates multiple jobs in a single request. This is a batch version of the
UpdateJob API.
The result of updating each job is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
When you change the status of a job to ARCHIVED, the job
can't be scheduled or archived.
May throw AccessDeniedException.
May throw InternalServerErrorException.
May throw ThrottlingException.
May throw ValidationException.
Parameter jobs :
The list of jobs to update. You can specify up to 100 jobs per request.
Parameter clientToken :
The unique token which the server uses to recognize retries of the same
request.
Implementation
Future<BatchUpdateJobResponse> batchUpdateJob({
required List<BatchUpdateJobItem> jobs,
String? clientToken,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Amz-Client-Token': clientToken.toString(),
};
final $payload = <String, dynamic>{
'jobs': jobs,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/2023-10-12/batch-update-job',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return BatchUpdateJobResponse.fromJson(response);
}