deleteDocumentClassifier method

Future<void> deleteDocumentClassifier({
  1. required String documentClassifierArn,
})

Deletes a previously created document classifier

Only those classifiers 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 classifier into a DELETING state, and it is then removed by a background job. Once removed, the classifier 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 documentClassifierArn : The Amazon Resource Name (ARN) that identifies the document classifier.

Implementation

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