Skip to content

describe_job_execution async

describe_job_execution(
    job_id: DescribeJobExecutionJobId,
    thing_name: ThingName,
    *,
    config_overrides: Optional[AsyncIoTJobsDataPlaneClientConfig] = None,
    include_job_document: Optional[IncludeJobDocument] = None,
    execution_number: Optional[ExecutionNumber] = None,
) -> DescribeJobExecutionResponse

Gets details of a job execution.

Requires permission to access the DescribeJobExecution action.

Parameters:

  • job_id (DescribeJobExecutionJobId) –

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

  • thing_name (ThingName) –

    The thing name associated with the device the job execution is running on.

  • include_job_document (Optional[IncludeJobDocument], default: None ) –

    Optional. Unless set to false, the response contains the job document. The default is true.

  • execution_number (Optional[ExecutionNumber], default: None ) –

    Optional. A number that identifies a particular job execution on a particular device. If not specified, the latest job execution is returned.

Raises:

Source code in docs_src/capo_iot_jobs_data_plane/_services/async_io_t_jobs_data_plane.py
async def describe_job_execution(
    self,
    job_id: "capo_iot_jobs_data_plane.types.describe_job_execution_job_id.DescribeJobExecutionJobId",
    thing_name: "capo_iot_jobs_data_plane.types.thing_name.ThingName",
    *,
    config_overrides: Optional[AsyncIoTJobsDataPlaneClientConfig] = None,
    include_job_document: Optional[
        "capo_iot_jobs_data_plane.types.include_job_document.IncludeJobDocument"
    ] = None,
    execution_number: Optional[
        "capo_iot_jobs_data_plane.types.execution_number.ExecutionNumber"
    ] = None,
) -> "capo_iot_jobs_data_plane.types.describe_job_execution_response.DescribeJobExecutionResponse":
    """<p>Gets details of a job execution.</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">DescribeJobExecution</a> action.</p>

    Args:
        job_id: <p>The unique identifier assigned to this job when it was created.</p>
        thing_name: <p>The thing name associated with the device the job execution is running on.</p>
        include_job_document: <p>Optional. Unless set to false, the response contains the job document. The default is true.</p>
        execution_number: <p>Optional. A number that identifies a particular job execution on a particular device. If not specified, the latest job execution is returned.</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.terminal_state_exception.TerminalStateException: <p>The job is in a terminal state.</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.describe_job_execution_request.DescribeJobExecutionRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_jobs_data_plane.types.describe_job_execution_response.DescribeJobExecutionResponse"
    ]:
        import capo_iot_jobs_data_plane._operations.iot_laser_thing_job_manager_external_service.describe_job_execution

        (
            output,
            http_response,
        ) = await capo_iot_jobs_data_plane._operations.iot_laser_thing_job_manager_external_service.describe_job_execution.async_describe_job_execution(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeJobExecution")
    )
    input_: capo_iot_jobs_data_plane.types.describe_job_execution_request.DescribeJobExecutionRequest = {
        "job_id": job_id,
        "thing_name": thing_name,
    }
    if include_job_document is not None:
        input_["include_job_document"] = include_job_document
    if execution_number is not None:
        input_["execution_number"] = execution_number

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output