Skip to content

list_job_executions_for_job

list_job_executions_for_job(
    job_id: JobId,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    status: Optional[JobExecutionStatus] = None,
    max_results: Optional[LaserMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListJobExecutionsForJobResponse

Lists the job executions for a job.

Requires permission to access the ListJobExecutionsForJob action.

Parameters:

  • job_id (JobId) –

    The unique identifier you assigned to this job when it was created.

  • status (Optional[JobExecutionStatus], default: None ) –

    The status of the job.

  • max_results (Optional[LaserMaxResults], default: None ) –

    The maximum number of results to be returned per request.

  • next_token (Optional[NextToken], default: None ) –

    The token to retrieve the next set of results.

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def list_job_executions_for_job(
    self,
    job_id: "capo_iot.types.job_id.JobId",
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    status: Optional[
        "capo_iot.types.job_execution_status.JobExecutionStatus"
    ] = None,
    max_results: Optional[
        "capo_iot.types.laser_max_results.LaserMaxResults"
    ] = None,
    next_token: Optional["capo_iot.types.next_token.NextToken"] = None,
) -> "capo_iot.types.list_job_executions_for_job_response.ListJobExecutionsForJobResponse":
    """<p>Lists the job executions for a job.</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">ListJobExecutionsForJob</a> action.</p>

    Args:
        job_id: <p>The unique identifier you assigned to this job when it was created.</p>
        status: <p>The status of the job.</p>
        max_results: <p>The maximum number of results to be returned per request.</p>
        next_token: <p>The token to retrieve the next set of results.</p>

    Raises:
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot.types.list_job_executions_for_job_request.ListJobExecutionsForJobRequest]",
    ) -> OperationResponse[
        "capo_iot.types.list_job_executions_for_job_response.ListJobExecutionsForJobResponse"
    ]:
        import capo_iot._operations.aws_iot_service.list_job_executions_for_job

        output, http_response = (
            capo_iot._operations.aws_iot_service.list_job_executions_for_job.list_job_executions_for_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListJobExecutionsForJob")
    )
    input_: capo_iot.types.list_job_executions_for_job_request.ListJobExecutionsForJobRequest = {
        "job_id": job_id
    }
    if status is not None:
        input_["status"] = status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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