Skip to content

list_entities_detection_v2_jobs async

list_entities_detection_v2_jobs(
    *,
    config_overrides: Optional[AsyncComprehendMedicalClientConfig] = None,
    filter: Optional[ComprehendMedicalAsyncJobFilter] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResultsInteger] = None,
) -> ListEntitiesDetectionV2JobsResponse

Gets a list of medical entity detection jobs that you have submitted.

Parameters:

  • filter (Optional[ComprehendMedicalAsyncJobFilter], default: None ) –

    Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.

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

    Identifies the next page of results to return.

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

    The maximum number of results to return in each page. The default is 100.

Raises:

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • InvalidRequestException –

    The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.

  • TooManyRequestsException –

    You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase.

  • ValidationException –

    The filter that you specified for the operation is invalid. Check the filter values that you entered and try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_comprehendmedical/_services/async_comprehend_medical.py
async def list_entities_detection_v2_jobs(
    self,
    *,
    config_overrides: Optional[AsyncComprehendMedicalClientConfig] = None,
    filter: Optional[
        "capo_comprehendmedical.types.comprehend_medical_async_job_filter.ComprehendMedicalAsyncJobFilter"
    ] = None,
    next_token: Optional["capo_comprehendmedical.types.string.String"] = None,
    max_results: Optional[
        "capo_comprehendmedical.types.max_results_integer.MaxResultsInteger"
    ] = None,
) -> "capo_comprehendmedical.types.list_entities_detection_v2_jobs_response.ListEntitiesDetectionV2JobsResponse":
    """<p>Gets a list of medical entity detection jobs that you have submitted.</p>

    Args:
        filter: <p>Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.</p>
        next_token: <p>Identifies the next page of results to return.</p>
        max_results: <p>The maximum number of results to return in each page. The default is 100.</p>

    Raises:
        capo_comprehendmedical.errors.internal_server_exception.InternalServerException: <p> An internal server error occurred. Retry your request. </p>
        capo_comprehendmedical.errors.invalid_request_exception.InvalidRequestException: <p> The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.</p>
        capo_comprehendmedical.errors.too_many_requests_exception.TooManyRequestsException: <p> You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase. </p>
        capo_comprehendmedical.errors.validation_exception.ValidationException: <p>The filter that you specified for the operation is invalid. Check the filter values that you entered and try your request again.</p>
        capo_comprehendmedical.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_comprehendmedical.types.list_entities_detection_v2_jobs_request.ListEntitiesDetectionV2JobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_comprehendmedical.types.list_entities_detection_v2_jobs_response.ListEntitiesDetectionV2JobsResponse"
    ]:
        import capo_comprehendmedical._operations.comprehend_medical_20181030.list_entities_detection_v2_jobs

        (
            output,
            http_response,
        ) = await capo_comprehendmedical._operations.comprehend_medical_20181030.list_entities_detection_v2_jobs.async_list_entities_detection_v2_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEntitiesDetectionV2Jobs")
    )
    input_: capo_comprehendmedical.types.list_entities_detection_v2_jobs_request.ListEntitiesDetectionV2JobsRequest = {}
    if filter is not None:
        input_["filter"] = filter
    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