def update_schedule(
self,
cron_expression: "capo_databrew.types.cron_expression.CronExpression",
name: "capo_databrew.types.schedule_name.ScheduleName",
*,
config_overrides: Optional[DataBrewClientConfig] = None,
job_names: Optional["capo_databrew.types.job_name_list.JobNameList"] = None,
) -> "capo_databrew.types.update_schedule_response.UpdateScheduleResponse":
"""<p>Modifies the definition of an existing DataBrew schedule.</p>
Args:
job_names: <p>The name or names of one or more jobs to be run for this schedule.</p>
cron_expression: <p>The date or dates and time or times when the jobs are to be run. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/jobs.cron.html">Cron expressions</a> in the <i>Glue DataBrew Developer Guide</i>.</p>
name: <p>The name of the schedule to update.</p>
Raises:
capo_databrew.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
capo_databrew.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota is exceeded.</p>
capo_databrew.errors.validation_exception.ValidationException: <p>The input parameters for this request failed validation.</p>
capo_databrew.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_databrew.types.update_schedule_request.UpdateScheduleRequest]",
) -> OperationResponse[
"capo_databrew.types.update_schedule_response.UpdateScheduleResponse"
]:
import capo_databrew._operations.aws_glue_data_brew.update_schedule
output, http_response = (
capo_databrew._operations.aws_glue_data_brew.update_schedule.update_schedule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateSchedule")
)
input_: capo_databrew.types.update_schedule_request.UpdateScheduleRequest = {
"cron_expression": cron_expression,
"name": name,
}
if job_names is not None:
input_["job_names"] = job_names
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output