Skip to content

get_pending_job_executions

get_pending_job_executions(
    thing_name: ThingName,
    *,
    config_overrides: Optional[IoTJobsDataPlaneClientConfig] = None,
) -> GetPendingJobExecutionsResponse

Gets the list of all jobs for a thing that are not in a terminal status.

Requires permission to access the GetPendingJobExecutions action.

Parameters:

  • thing_name (ThingName) –

    The name of the thing that is executing the job.

Raises:

Source code in docs_src/capo_iot_jobs_data_plane/_services/io_t_jobs_data_plane.py
def get_pending_job_executions(
    self,
    thing_name: "capo_iot_jobs_data_plane.types.thing_name.ThingName",
    *,
    config_overrides: Optional[IoTJobsDataPlaneClientConfig] = None,
) -> "capo_iot_jobs_data_plane.types.get_pending_job_executions_response.GetPendingJobExecutionsResponse":
    """<p>Gets the list of all jobs for a thing that are not in a terminal status.</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">GetPendingJobExecutions</a> action.</p>

    Args:
        thing_name: <p>The name of the thing that is executing the job.</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.
    """

    def _handler(
        req: "OperationRequest[capo_iot_jobs_data_plane.types.get_pending_job_executions_request.GetPendingJobExecutionsRequest]",
    ) -> OperationResponse[
        "capo_iot_jobs_data_plane.types.get_pending_job_executions_response.GetPendingJobExecutionsResponse"
    ]:
        import capo_iot_jobs_data_plane._operations.iot_laser_thing_job_manager_external_service.get_pending_job_executions

        output, http_response = (
            capo_iot_jobs_data_plane._operations.iot_laser_thing_job_manager_external_service.get_pending_job_executions.get_pending_job_executions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPendingJobExecutions")
    )
    input_: capo_iot_jobs_data_plane.types.get_pending_job_executions_request.GetPendingJobExecutionsRequest = {
        "thing_name": thing_name
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output