deleteEntityRecognizer method

Future<void> deleteEntityRecognizer({
  1. required String entityRecognizerArn,
})

Deletes an entity recognizer.

Only those recognizers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned.

This is an asynchronous action that puts the recognizer into a DELETING state, and it is then removed by a background job. Once removed, the recognizer disappears from your account and is no longer available for use.

May throw InvalidRequestException. May throw TooManyRequestsException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw ResourceInUseException. May throw InternalServerException.

Parameter entityRecognizerArn : The Amazon Resource Name (ARN) that identifies the entity recognizer.

Implementation

Future<void> deleteEntityRecognizer({
  required String entityRecognizerArn,
}) async {
  ArgumentError.checkNotNull(entityRecognizerArn, 'entityRecognizerArn');
  _s.validateStringLength(
    'entityRecognizerArn',
    entityRecognizerArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Comprehend_20171127.DeleteEntityRecognizer'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'EntityRecognizerArn': entityRecognizerArn,
    },
  );
}