listEntityRecognizers method

Future<ListEntityRecognizersResponse> listEntityRecognizers({
  1. EntityRecognizerFilter? filter,
  2. int? maxResults,
  3. String? nextToken,
})

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.

May throw InvalidRequestException. May throw TooManyRequestsException. May throw InvalidFilterException. May throw InternalServerException.

Parameter filter : Filters the list of entities returned. You can filter on Status, SubmitTimeBefore, or SubmitTimeAfter. You can only set one filter at a time.

Parameter maxResults : The maximum number of results to return on each page. The default is 100.

Parameter nextToken : Identifies the next page of results to return.

Implementation

Future<ListEntityRecognizersResponse> listEntityRecognizers({
  EntityRecognizerFilter? filter,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Comprehend_20171127.ListEntityRecognizers'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filter != null) 'Filter': filter,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListEntityRecognizersResponse.fromJson(jsonResponse.body);
}