Skip to content

list_entity_recognizers

list_entity_recognizers(
    *,
    config_overrides: Optional[ComprehendClientConfig] = None,
    filter: Optional[EntityRecognizerFilter] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResultsInteger] = None,
) -> ListEntityRecognizersResponse

Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training. Allows you to filter the list of recognizers based on criteria such as status and submission time. This call returns up to 500 entity recognizers in the list, with a default number of 100 recognizers in the list.

The results of this list are not in any particular order. Please get the list and sort locally if needed.

Parameters:

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

    Filters the list of entities returned. You can filter on Status, SubmitTimeBefore, or SubmitTimeAfter. 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 on each page. The default is 100.

Raises:

Source code in docs_src/capo_comprehend/_services/comprehend.py
def list_entity_recognizers(
    self,
    *,
    config_overrides: Optional[ComprehendClientConfig] = None,
    filter: Optional[
        "capo_comprehend.types.entity_recognizer_filter.EntityRecognizerFilter"
    ] = None,
    next_token: Optional["capo_comprehend.types.string.String"] = None,
    max_results: Optional[
        "capo_comprehend.types.max_results_integer.MaxResultsInteger"
    ] = None,
) -> "capo_comprehend.types.list_entity_recognizers_response.ListEntityRecognizersResponse":
    """<p>Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training. Allows you to filter the list of recognizers based on criteria such as status and submission time. This call returns up to 500 entity recognizers in the list, with a default number of 100 recognizers in the list.</p> <p>The results of this list are not in any particular order. Please get the list and sort locally if needed.</p>

    Args:
        filter: <p>Filters the list of entities returned. You can filter on <code>Status</code>, <code>SubmitTimeBefore</code>, or <code>SubmitTimeAfter</code>. 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 on each page. The default is 100.</p>

    Raises:
        capo_comprehend.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_comprehend.errors.invalid_filter_exception.InvalidFilterException: <p>The filter specified for the operation is invalid. Specify a different filter.</p>
        capo_comprehend.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_comprehend.errors.too_many_requests_exception.TooManyRequestsException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_comprehend.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_comprehend.types.list_entity_recognizers_request.ListEntityRecognizersRequest]",
    ) -> OperationResponse[
        "capo_comprehend.types.list_entity_recognizers_response.ListEntityRecognizersResponse"
    ]:
        import capo_comprehend._operations.comprehend_20171127.list_entity_recognizers

        output, http_response = (
            capo_comprehend._operations.comprehend_20171127.list_entity_recognizers.list_entity_recognizers(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_comprehend.types.list_entity_recognizers_response.ListEntityRecognizersResponse",
    ) -> dict[str, Any]:
        import capo_comprehend.types.list_entity_recognizers_response

        return (
            capo_comprehend.types.list_entity_recognizers_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListEntityRecognizers", redact_output=_redact_output),
    )
    input_: capo_comprehend.types.list_entity_recognizers_request.ListEntityRecognizersRequest = {}
    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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output