Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
Requires permission to access the StartNextPendingJobExecution action.
Parameters:
-
thing_name
(ThingName)
–
The name of the thing associated with the device.
-
status_details
(Optional[DetailsMap], default:
None
)
–
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.
-
step_timeout_in_minutes
(Optional[StepTimeoutInMinutes], default:
None
)
–
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 to IN_PROGRESS, and specifying a new timeout value in field stepTimeoutInMinutes) the job execution status will be automatically set to TIMED_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 field timeoutConfig).
Valid values for this parameter range from 1 to 10080 (1 minute to 7 days).
Raises:
Source code in docs_src/capo_iot_jobs_data_plane/_services/async_io_t_jobs_data_plane.py
| async def start_next_pending_job_execution(
self,
thing_name: "capo_iot_jobs_data_plane.types.thing_name.ThingName",
*,
config_overrides: Optional[AsyncIoTJobsDataPlaneClientConfig] = None,
status_details: Optional[
"capo_iot_jobs_data_plane.types.details_map.DetailsMap"
] = None,
step_timeout_in_minutes: Optional[
"capo_iot_jobs_data_plane.types.step_timeout_in_minutes.StepTimeoutInMinutes"
] = None,
) -> "capo_iot_jobs_data_plane.types.start_next_pending_job_execution_response.StartNextPendingJobExecutionResponse":
"""<p>Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">StartNextPendingJobExecution</a> action.</p>
Args:
thing_name: <p>The name of the thing associated with the device.</p>
status_details: <p>A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.</p> <p>The maximum length of the value in the name/value pair is 1,024 characters.</p>
step_timeout_in_minutes: <p>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 <code>UpdateJobExecution</code>, setting the status to <code>IN_PROGRESS</code>, and specifying a new timeout value in field <code>stepTimeoutInMinutes</code>) the job execution status will be automatically set to <code>TIMED_OUT</code>. Note that setting the step timeout has no effect on the in progress timeout that may have been specified when the job was created (<code>CreateJob</code> using field <code>timeoutConfig</code>).</p> <p>Valid values for this parameter range from 1 to 10080 (1 minute to 7 days).</p>
Raises:
capo_iot_jobs_data_plane.errors.certificate_validation_exception.CertificateValidationException: <p>The certificate is invalid.</p>
capo_iot_jobs_data_plane.errors.invalid_request_exception.InvalidRequestException: <p>The contents of the request were invalid.</p>
capo_iot_jobs_data_plane.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_iot_jobs_data_plane.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
capo_iot_jobs_data_plane.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
capo_iot_jobs_data_plane.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iot_jobs_data_plane.types.start_next_pending_job_execution_request.StartNextPendingJobExecutionRequest]",
) -> AsyncOperationResponse[
"capo_iot_jobs_data_plane.types.start_next_pending_job_execution_response.StartNextPendingJobExecutionResponse"
]:
import capo_iot_jobs_data_plane._operations.iot_laser_thing_job_manager_external_service.start_next_pending_job_execution
(
output,
http_response,
) = await capo_iot_jobs_data_plane._operations.iot_laser_thing_job_manager_external_service.start_next_pending_job_execution.async_start_next_pending_job_execution(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartNextPendingJobExecution")
)
input_: capo_iot_jobs_data_plane.types.start_next_pending_job_execution_request.StartNextPendingJobExecutionRequest = {
"thing_name": thing_name
}
if status_details is not None:
input_["status_details"] = status_details
if step_timeout_in_minutes is not None:
input_["step_timeout_in_minutes"] = step_timeout_in_minutes
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|