update_schedule¶
- SchedulesApi.update_schedule(role_id, id, schedule_job_edit, datalab_id=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update a schedule
Updates a job/event/external-trigger schedule (editor access), or a notebook datalab schedule when DatalabId is provided.
- Parameters:
role_id (str) – Amorphic role ID used for authorization. (required)
id (str) – Schedule ID to update. (required)
schedule_job_edit (ScheduleJobEdit) – Job schedule edit fields and/or datalab notebook schedule fields. (required)
datalab_id (str) – When set, updates a notebook datalab schedule for this datalab. Omit for job/event schedules.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /schedules/{id}
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
header |
|
|
path |
|
|
query |
|
Request¶
Job schedule edit fields and/or datalab notebook schedule fields.
Update description/keywords/cron
{
"Description": "Nightly ETL (updated)",
"Keywords": [
"etl",
"nightly"
],
"ScheduleParam": {
"ScheduleExpression": "cron(0 3 * * ? *)"
}
}
Success (HTTP 200)¶
Schedule updated.
jobUpdated
{
"Message": "Successfully updated the schedule"
}
Errors¶
HTTP 400
Validation or authorization failure
HTTP 500
Unexpected server error while updating the schedule.