getSchedule method

Future<GetScheduleOutput> getSchedule({
  1. required String name,
  2. String? groupName,
})

Retrieves the specified schedule.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the schedule to retrieve.

Parameter groupName : The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.

Implementation

Future<GetScheduleOutput> getSchedule({
  required String name,
  String? groupName,
}) async {
  final $query = <String, List<String>>{
    if (groupName != null) 'groupName': [groupName],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/schedules/${Uri.encodeComponent(name)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetScheduleOutput.fromJson(response);
}