run_schedule¶
- SchedulesApi.run_schedule(role_id, id, schedule_run_arguments=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Run a schedule now
Starts an on-demand run for an ENABLED job schedule.
- Parameters:
role_id (str) – Amorphic role ID used for authorization. (required)
id (str) – Schedule ID to run. (required)
schedule_run_arguments (ScheduleRunArguments) – Optional. When present, include Arguments as a list of Key/Value pairs. Empty body runs with the schedule’s stored arguments.
_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}/run
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
header |
|
|
path |
|
Request¶
Optional. When present, include `Arguments` as a list of Key/Value pairs. Empty body runs with the schedule’s stored arguments.
The request body is optional.
Override worker settings for this run
{
"Arguments": [
{
"Key": "NumberOfWorkers",
"Value": "2"
},
{
"Key": "WorkerType",
"Value": "G.1X"
}
]
}
Empty body uses stored schedule arguments
{}
Success (HTTP 200)¶
Run started.
glueOrEtlRun
{
"resource": "my-etl-job",
"executionId": "jr_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"Message": "Successfully started Glue Job Run"
}
dataPipelineRun
{
"resource": "dp-11111111-2222-3333-4444-555555555555",
"Message": "Data Pipeline run starting"
}
Errors¶
HTTP 400
Validation or authorization failure
notEnabled
{
"Message": "Schedule is not ENABLED to run it"
}
HTTP 500
Unexpected server error while starting the run.
runFailed
{
"Message": "Unable to execute schedule, error - ..."
}