IoTJobsDataPlane / Client / start_next_pending_job_execution
start_next_pending_job_execution#
- IoTJobsDataPlane.Client.start_next_pending_job_execution(**kwargs)#
Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
Requires permission to access the StartNextPendingJobExecution action.
See also: AWS API Documentation
Request Syntax
response = client.start_next_pending_job_execution( thingName='string', statusDetails={ 'string': 'string' }, stepTimeoutInMinutes=123 )
- Parameters:
thingName (string) –
[REQUIRED]
The name of the thing associated with the device.
statusDetails (dict) –
A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
The maximum length of the value in the name/value pair is 1,024 characters.
(string) –
(string) –
stepTimeoutInMinutes (integer) –
Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by calling
UpdateJobExecution
, setting the status toIN_PROGRESS
, and specifying a new timeout value in fieldstepTimeoutInMinutes
) the job execution status will be automatically set toTIMED_OUT
. Note that setting the step timeout has no effect on the in progress timeout that may have been specified when the job was created (CreateJob
using fieldtimeoutConfig
).Valid values for this parameter range from 1 to 10080 (1 minute to 7 days).
- Return type:
dict
- Returns:
Response Syntax
{ 'execution': { 'jobId': 'string', 'thingName': 'string', 'status': 'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'REJECTED'|'REMOVED'|'CANCELED', 'statusDetails': { 'string': 'string' }, 'queuedAt': 123, 'startedAt': 123, 'lastUpdatedAt': 123, 'approximateSecondsBeforeTimedOut': 123, 'versionNumber': 123, 'executionNumber': 123, 'jobDocument': 'string' } }
Response Structure
(dict) –
execution (dict) –
A JobExecution object.
jobId (string) –
The unique identifier you assigned to this job when it was created.
thingName (string) –
The name of the thing that is executing the job.
status (string) –
The status of the job execution. Can be one of: “QUEUED”, “IN_PROGRESS”, “FAILED”, “SUCCESS”, “CANCELED”, “TIMED_OUT”, “REJECTED”, or “REMOVED”.
statusDetails (dict) –
A collection of name/value pairs that describe the status of the job execution.
The maximum length of the value in the name/value pair is 1,024 characters.
(string) –
(string) –
queuedAt (integer) –
The time, in seconds since the epoch, when the job execution was enqueued.
startedAt (integer) –
The time, in seconds since the epoch, when the job execution was started.
lastUpdatedAt (integer) –
The time, in seconds since the epoch, when the job execution was last updated.
approximateSecondsBeforeTimedOut (integer) –
The estimated number of seconds that remain before the job execution status will be changed to
TIMED_OUT
. The actual job execution timeout can occur up to 60 seconds later than the estimated duration.versionNumber (integer) –
The version of the job execution. Job execution versions are incremented each time they are updated by a device.
executionNumber (integer) –
A number that identifies a particular job execution on a particular device. It can be used later in commands that return or update job execution information.
jobDocument (string) –
The content of the job document.
Exceptions
IoTJobsDataPlane.Client.exceptions.InvalidRequestException
IoTJobsDataPlane.Client.exceptions.ResourceNotFoundException
IoTJobsDataPlane.Client.exceptions.ThrottlingException
IoTJobsDataPlane.Client.exceptions.ServiceUnavailableException
IoTJobsDataPlane.Client.exceptions.CertificateValidationException