listBatchJobExecutions method
Lists historical, current, and scheduled batch job executions for a specific application.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The unique identifier of the application.
Parameter executionIds :
The unique identifier of each batch job execution.
Parameter jobName :
The name of each batch job execution.
Parameter maxResults :
The maximum number of batch job executions to return.
Parameter nextToken :
A pagination token to control the number of batch job executions displayed
in the list.
Parameter startedAfter :
The time after which the batch job executions started.
Parameter startedBefore :
The time before the batch job executions started.
Parameter status :
The status of the batch job executions.
Implementation
Future<ListBatchJobExecutionsResponse> listBatchJobExecutions({
required String applicationId,
List<String>? executionIds,
String? jobName,
int? maxResults,
String? nextToken,
DateTime? startedAfter,
DateTime? startedBefore,
BatchJobExecutionStatus? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
2000,
);
final $query = <String, List<String>>{
if (executionIds != null) 'executionIds': executionIds,
if (jobName != null) 'jobName': [jobName],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (startedAfter != null)
'startedAfter': [_s.iso8601ToJson(startedAfter).toString()],
if (startedBefore != null)
'startedBefore': [_s.iso8601ToJson(startedBefore).toString()],
if (status != null) 'status': [status.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/batch-job-executions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListBatchJobExecutionsResponse.fromJson(response);
}