listBatch method
Returns a list of run batches in your account, with optional filtering by status, name, or run group. Results are paginated. Only one filter per call is supported.
May throw AccessDeniedException.
May throw InternalServerException.
May throw RequestTimeoutException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxItems :
The maximum number of batches to return. If not specified, defaults to
100.
Parameter name :
Filter batches by name.
Parameter runGroupId :
Filter batches by run group ID.
Parameter startingToken :
A pagination token returned from a prior ListBatch call.
Parameter status :
Filter batches by status.
Implementation
Future<ListBatchResponse> listBatch({
int? maxItems,
String? name,
String? runGroupId,
String? startingToken,
BatchStatus? status,
}) async {
final $query = <String, List<String>>{
if (maxItems != null) 'maxItems': [maxItems.toString()],
if (name != null) 'name': [name],
if (runGroupId != null) 'runGroupId': [runGroupId],
if (startingToken != null) 'startingToken': [startingToken],
if (status != null) 'status': [status.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/runBatch',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListBatchResponse.fromJson(response);
}