Skip to content

update_schedule async

update_schedule(
    cron_expression: CronExpression,
    name: ScheduleName,
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = None,
    job_names: Optional[JobNameList] = None,
) -> UpdateScheduleResponse

Modifies the definition of an existing DataBrew schedule.

Parameters:

  • job_names (Optional[JobNameList], default: None ) –

    The name or names of one or more jobs to be run for this schedule.

  • cron_expression (CronExpression) –

    The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue DataBrew Developer Guide.

  • name (ScheduleName) –

    The name of the schedule to update.

Raises:

Source code in docs_src/capo_databrew/_services/async_data_brew.py
async def update_schedule(
    self,
    cron_expression: "capo_databrew.types.cron_expression.CronExpression",
    name: "capo_databrew.types.schedule_name.ScheduleName",
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_databrew.types.update_schedule_request.UpdateScheduleRequest]",
    ) -> AsyncOperationResponse[
        "capo_databrew.types.update_schedule_response.UpdateScheduleResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.update_schedule

        (
            output,
            http_response,
        ) = await capo_databrew._operations.aws_glue_data_brew.update_schedule.async_update_schedule(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output