Skip to content

get_dicom_import_job async

get_dicom_import_job(
    datastore_id: DatastoreId,
    job_id: JobId,
    *,
    config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
) -> GetDICOMImportJobResponse

Get the import job properties to learn more about the job or job progress.

The jobStatus refers to the execution of the import job. Therefore, an import job can return a jobStatus as COMPLETED even if validation issues are discovered during the import process. If a jobStatus returns as COMPLETED, we still recommend you review the output manifests written to S3, as they provide details on the success or failure of individual P10 object imports.

Parameters:

  • datastore_id (DatastoreId) –

    The data store identifier.

  • job_id (JobId) –

    The import job identifier.

Raises:

Source code in docs_src/capo_medical_imaging/_services/async_medical_imaging.py
async def get_dicom_import_job(
    self,
    datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
    job_id: "capo_medical_imaging.types.job_id.JobId",
    *,
    config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
) -> "capo_medical_imaging.types.get_dicom_import_job_response.GetDICOMImportJobResponse":
    """<p>Get the import job properties to learn more about the job or job progress.</p> <note> <p>The <code>jobStatus</code> refers to the execution of the import job. Therefore, an import job can return a <code>jobStatus</code> as <code>COMPLETED</code> even if validation issues are discovered during the import process. If a <code>jobStatus</code> returns as <code>COMPLETED</code>, we still recommend you review the output manifests written to S3, as they provide details on the success or failure of individual P10 object imports.</p> </note>

    Args:
        datastore_id: <p>The data store identifier.</p>
        job_id: <p>The import job identifier.</p>

    Raises:
        capo_medical_imaging.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_medical_imaging.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_medical_imaging.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling.</p>
        capo_medical_imaging.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints set by the service.</p>
        capo_medical_imaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_medical_imaging.types.get_dicom_import_job_request.GetDICOMImportJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_medical_imaging.types.get_dicom_import_job_response.GetDICOMImportJobResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.get_dicom_import_job

        (
            output,
            http_response,
        ) = await capo_medical_imaging._operations.ahi_gateway_service.get_dicom_import_job.async_get_dicom_import_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_medical_imaging.types.get_dicom_import_job_response.GetDICOMImportJobResponse",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.get_dicom_import_job_response

        return capo_medical_imaging.types.get_dicom_import_job_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetDICOMImportJob", redact_output=_redact_output),
    )
    input_: capo_medical_imaging.types.get_dicom_import_job_request.GetDICOMImportJobRequest = {
        "datastore_id": datastore_id,
        "job_id": job_id,
    }

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