listJobExecutionsForJob method
Future<ListJobExecutionsForJobResponse>
listJobExecutionsForJob({
- required String jobId,
- int? maxResults,
- String? nextToken,
- JobExecutionStatus? status,
Lists the job executions for a job.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ServiceUnavailableException.
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 {
ArgumentError.checkNotNull(jobId, 'jobId');
_s.validateStringLength(
'jobId',
jobId,
1,
64,
isRequired: true,
);
_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.toValue()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/jobs/${Uri.encodeComponent(jobId)}/things',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListJobExecutionsForJobResponse.fromJson(response);
}