Skip to content

list_import_jobs async

list_import_jobs(
    knowledge_base_id: UuidOrArn,
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
    next_token: Optional[NonEmptyString] = None,
    max_results: Optional[MaxResults] = None,
) -> ListImportJobsResponse

Lists information about import jobs.

Parameters:

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

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

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

    The maximum number of results to return per page.

  • knowledge_base_id (UuidOrArn) –

    The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

Raises:

Source code in docs_src/capo_qconnect/_services/async_q_connect.py
async def list_import_jobs(
    self,
    knowledge_base_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
    next_token: Optional[
        "capo_qconnect.types.non_empty_string.NonEmptyString"
    ] = None,
    max_results: Optional["capo_qconnect.types.max_results.MaxResults"] = None,
) -> "capo_qconnect.types.list_import_jobs_response.ListImportJobsResponse":
    """<p>Lists information about import jobs.</p>

    Args:
        next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
        max_results: <p>The maximum number of results to return per page.</p>
        knowledge_base_id: <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>

    Raises:
        capo_qconnect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qconnect.types.list_import_jobs_request.ListImportJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_qconnect.types.list_import_jobs_response.ListImportJobsResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.list_import_jobs

        (
            output,
            http_response,
        ) = await capo_qconnect._operations.wisdom_service.list_import_jobs.async_list_import_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListImportJobs")
    )
    input_: capo_qconnect.types.list_import_jobs_request.ListImportJobsRequest = {
        "knowledge_base_id": knowledge_base_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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