Skip to content

get_ingestion_job async

get_ingestion_job(
    collection_id: CollectionId,
    ingestion_job_id: IngestionJobId,
    *,
    config_overrides: Optional[AsyncOpenSearchServerlessClientConfig] = None,
) -> GetIngestionJobResponse

Returns information about an ingestion job, including its configuration, status, and processing state.

Parameters:

  • collection_id (CollectionId) –

    The unique identifier of the collection that the ingestion job belongs to.

  • ingestion_job_id (IngestionJobId) –

    The unique identifier of the ingestion job to retrieve.

Raises:

Source code in docs_src/capo_opensearchserverless/_services/async_open_search_serverless.py
async def get_ingestion_job(
    self,
    collection_id: "capo_opensearchserverless.types.collection_id.CollectionId",
    ingestion_job_id: "capo_opensearchserverless.types.ingestion_job_id.IngestionJobId",
    *,
    config_overrides: Optional[AsyncOpenSearchServerlessClientConfig] = None,
) -> "capo_opensearchserverless.types.get_ingestion_job_response.GetIngestionJobResponse":
    """<p>Returns information about an ingestion job, including its configuration, status, and processing state.</p>

    Args:
        collection_id: <p>The unique identifier of the collection that the ingestion job belongs to.</p>
        ingestion_job_id: <p>The unique identifier of the ingestion job to retrieve.</p>

    Raises:
        capo_opensearchserverless.errors.internal_server_exception.InternalServerException: <p>Thrown when an error internal to the service occurs while processing a request.</p>
        capo_opensearchserverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when accessing or deleting a resource that does not exist.</p>
        capo_opensearchserverless.errors.validation_exception.ValidationException: <p>Thrown when the HTTP request contains invalid input or is missing required input.</p>
        capo_opensearchserverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_opensearchserverless.types.get_ingestion_job_request.GetIngestionJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_opensearchserverless.types.get_ingestion_job_response.GetIngestionJobResponse"
    ]:
        import capo_opensearchserverless._operations.open_search_serverless.get_ingestion_job

        (
            output,
            http_response,
        ) = await capo_opensearchserverless._operations.open_search_serverless.get_ingestion_job.async_get_ingestion_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetIngestionJob")
    )
    input_: capo_opensearchserverless.types.get_ingestion_job_request.GetIngestionJobRequest = {
        "collection_id": collection_id,
        "ingestion_job_id": ingestion_job_id,
    }

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