Retrieves the specified schedule.
Parameters:
-
name
(Name)
–
The name of the schedule to retrieve.
-
group_name
(Optional[ScheduleGroupName], default:
None
)
–
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.
Raises:
Source code in docs_src/capo_scheduler/_services/scheduler.py
| def get_schedule(
self,
name: "capo_scheduler.types.name.Name",
*,
config_overrides: Optional[SchedulerClientConfig] = None,
group_name: Optional[
"capo_scheduler.types.schedule_group_name.ScheduleGroupName"
] = None,
) -> "capo_scheduler.types.get_schedule_output.GetScheduleOutput":
"""<p>Retrieves the specified schedule.</p>
Args:
name: <p>The name of the schedule to retrieve.</p>
group_name: <p>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.</p>
Raises:
capo_scheduler.errors.internal_server_exception.InternalServerException: <p>Unexpected error encountered while processing the request.</p>
capo_scheduler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
capo_scheduler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_scheduler.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_scheduler.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_scheduler.types.get_schedule_input.GetScheduleInput]",
) -> OperationResponse[
"capo_scheduler.types.get_schedule_output.GetScheduleOutput"
]:
import capo_scheduler._operations.aws_chronos_service.get_schedule
output, http_response = (
capo_scheduler._operations.aws_chronos_service.get_schedule.get_schedule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetSchedule")
)
input_: capo_scheduler.types.get_schedule_input.GetScheduleInput = {
"name": name
}
if group_name is not None:
input_["group_name"] = group_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|