listSchedules method
Returns a paginated list of your EventBridge Scheduler schedules.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter groupName :
If specified, only lists the schedules whose associated schedule group
matches the given filter.
Parameter maxResults :
If specified, limits the number of results returned by this operation. The
operation also returns a NextToken which you can use in a
subsequent operation to retrieve the next set of results.
Parameter namePrefix :
Schedule name prefix to return the filtered list of resources.
Parameter nextToken :
The token returned by a previous call to retrieve the next set of results.
Parameter state :
If specified, only lists the schedules whose current state matches the
given filter.
Implementation
Future<ListSchedulesOutput> listSchedules({
String? groupName,
int? maxResults,
String? namePrefix,
String? nextToken,
ScheduleState? state,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (groupName != null) 'ScheduleGroup': [groupName],
if (maxResults != null) 'MaxResults': [maxResults.toString()],
if (namePrefix != null) 'NamePrefix': [namePrefix],
if (nextToken != null) 'NextToken': [nextToken],
if (state != null) 'State': [state.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/schedules',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListSchedulesOutput.fromJson(response);
}