listJobExecutionsForJob method
Lists the job executions for a job.
Requires permission to access the ListJobExecutionsForJob action.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter jobId :
The unique identifier you assigned to this job when it was created.
Parameter maxResults :
The maximum number of results to be returned per request.
Parameter nextToken :
The token to retrieve the next set of results.
Parameter status :
The status of the job.
Implementation
Future<ListJobExecutionsForJobResponse> listJobExecutionsForJob({
required String jobId,
int? maxResults,
String? nextToken,
JobExecutionStatus? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (status != null) 'status': [status.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/jobs/${Uri.encodeComponent(jobId)}/things',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListJobExecutionsForJobResponse.fromJson(response);
}