DeleteVocabularyCommand

Deletes the vocabulary that has the given identifier.

Example Syntax

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

import { ConnectClient, DeleteVocabularyCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, DeleteVocabularyCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // DeleteVocabularyRequest
  InstanceId: "STRING_VALUE", // required
  VocabularyId: "STRING_VALUE", // required
};
const command = new DeleteVocabularyCommand(input);
const response = await client.send(command);
// { // DeleteVocabularyResponse
//   VocabularyArn: "STRING_VALUE", // required
//   VocabularyId: "STRING_VALUE", // required
//   State: "CREATION_IN_PROGRESS" || "ACTIVE" || "CREATION_FAILED" || "DELETE_IN_PROGRESS", // required
// };

DeleteVocabularyCommand Input

See DeleteVocabularyCommandInput for more details

Parameter
Type
Description
InstanceId
Required
string | undefined

The identifier of the Amazon Connect instance. You can find the instance ID  in the Amazon Resource Name (ARN) of the instance.

VocabularyId
Required
string | undefined

The identifier of the custom vocabulary.

DeleteVocabularyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
State
Required
VocabularyState | undefined

The current state of the custom vocabulary.

VocabularyArn
Required
string | undefined

The Amazon Resource Name (ARN) of the custom vocabulary.

VocabularyId
Required
string | undefined

The identifier of the custom vocabulary.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient permissions to perform this action.

InternalServiceException
server

Request processing failed because of an error or failure with the service.

InvalidRequestException
client

The request is not valid.

ResourceInUseException
client

That resource is already in use. Please try another.

ResourceNotFoundException
client

The specified resource was not found.

ThrottlingException
client

The throttling limit has been exceeded.

ConnectServiceException
Base exception class for all service exceptions from Connect service.