Skip to content

get_import_job

get_import_job(
    import_job_id: Uuid,
    knowledge_base_id: UuidOrArn,
    *,
    config_overrides: Optional[QConnectClientConfig] = None,
) -> GetImportJobResponse

Retrieves the started import job.

Parameters:

  • import_job_id (Uuid) –

    The identifier of the import job to retrieve.

  • knowledge_base_id (UuidOrArn) –

    The identifier of the knowledge base that the import job belongs to.

Raises:

Source code in docs_src/capo_qconnect/_services/q_connect.py
def get_import_job(
    self,
    import_job_id: "capo_qconnect.types.uuid.Uuid",
    knowledge_base_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    *,
    config_overrides: Optional[QConnectClientConfig] = None,
) -> "capo_qconnect.types.get_import_job_response.GetImportJobResponse":
    """<p>Retrieves the started import job.</p>

    Args:
        import_job_id: <p>The identifier of the import job to retrieve.</p>
        knowledge_base_id: <p>The identifier of the knowledge base that the import job belongs to.</p>

    Raises:
        capo_qconnect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_qconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_qconnect.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_qconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_qconnect.types.get_import_job_request.GetImportJobRequest]",
    ) -> OperationResponse[
        "capo_qconnect.types.get_import_job_response.GetImportJobResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.get_import_job

        output, http_response = (
            capo_qconnect._operations.wisdom_service.get_import_job.get_import_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_qconnect.types.get_import_job_response.GetImportJobResponse",
    ) -> dict[str, Any]:
        import capo_qconnect.types.get_import_job_response

        return capo_qconnect.types.get_import_job_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetImportJob", redact_output=_redact_output),
    )
    input_: capo_qconnect.types.get_import_job_request.GetImportJobRequest = {
        "import_job_id": import_job_id,
        "knowledge_base_id": knowledge_base_id,
    }

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