DeleteDocumentClassifierCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ComprehendClient, DeleteDocumentClassifierCommand } from "@aws-sdk/client-comprehend"; // ES Modules import
// const { ComprehendClient, DeleteDocumentClassifierCommand } = require("@aws-sdk/client-comprehend"); // CommonJS import
const client = new ComprehendClient(config);
const input = { // DeleteDocumentClassifierRequest
  DocumentClassifierArn: "STRING_VALUE", // required
};
const command = new DeleteDocumentClassifierCommand(input);
const response = await client.send(command);
// {};

DeleteDocumentClassifierCommand Input

Parameter
Type
Description
DocumentClassifierArn
Required
string | undefined

The Amazon Resource Name (ARN) that identifies the document classifier.

DeleteDocumentClassifierCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalServerException
server

An internal server error occurred. Retry your request.

InvalidRequestException
client

The request is invalid.

ResourceInUseException
client

The specified resource name is already in use. Use a different name and try your request again.

ResourceNotFoundException
client

The specified resource ARN was not found. Check the ARN and try your request again.

ResourceUnavailableException
client

The specified resource is not available. Check the resource and try your request again.

TooManyRequestsException
client

The number of requests exceeds the limit. Resubmit your request later.

ComprehendServiceException
Base exception class for all service exceptions from Comprehend service.