getJobRuns method
Retrieves metadata for all runs of a given job definition.
GetJobRuns returns the job runs in chronological order, with
the newest jobs returned first.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter jobName :
The name of the job definition for which to retrieve all job runs.
Parameter maxResults :
The maximum size of the response.
Parameter nextToken :
A continuation token, if this is a continuation call.
Implementation
Future<GetJobRunsResponse> getJobRuns({
required String jobName,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
200,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.GetJobRuns'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'JobName': jobName,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return GetJobRunsResponse.fromJson(jsonResponse.body);
}