enable_schedule

SchedulesApi.enable_schedule(role_id, id, datalab_id=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Enables schedules

Enables schedule. For datalab notebook schedules, pass DatalabId or rely on schedule ID resolution.

Parameters:
  • role_id (str) – Amorphic role ID used for authorization. (required)

  • id (str) – Schedule ID to enable. (required)

  • datalab_id (str) – When set, enables a notebook datalab schedule for this datalab (sagemaker-notebook). 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:

ScheduleStateChangeResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /schedules/{id}/enable

Parameter examples

Name

In

Example

role_id

header

"role-admin"

id

path

"sch-11111111-aaaa-bbbb-cccc-222222222222"

DatalabId

query

"dl-11111111-2222-3333-4444-555555555555"

Success (HTTP 200)

Schedule enabled. Job schedules return `Schedule enabled`; datalab schedules return `Successfully enabled notebook schedule`.

jobScheduleEnabled

{
  "Message": "Schedule enabled"
}

datalabScheduleEnabled

{
  "Message": "Successfully enabled notebook schedule"
}

Errors

Documented error codes: IPV-1002.

HTTP 400

Validation or authorization failure (missing schedule, no editor access, or invalid datalab schedule).

notFound

{
  "Message": "IPV-1002 - Invalid value for parameter - ScheduleId"
}

HTTP 500

Unexpected server error while enabling the schedule.

enableFailed

{
  "Message": "Unable to enable schedule, error - ..."
}