- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteWatchlistCommand
Deletes the specified watchlist from Voice ID. This API throws an exception when there are fraudsters in the watchlist that you are trying to delete. You must delete the fraudsters, and then delete the watchlist. Every domain has a default watchlist which cannot be deleted.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { VoiceIDClient, DeleteWatchlistCommand } from "@aws-sdk/client-voice-id"; // ES Modules import
// const { VoiceIDClient, DeleteWatchlistCommand } = require("@aws-sdk/client-voice-id"); // CommonJS import
const client = new VoiceIDClient(config);
const input = { // DeleteWatchlistRequest
DomainId: "STRING_VALUE", // required
WatchlistId: "STRING_VALUE", // required
};
const command = new DeleteWatchlistCommand(input);
const response = await client.send(command);
// {};
DeleteWatchlistCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DomainId Required | string | undefined | The identifier of the domain that contains the watchlist. |
WatchlistId Required | string | undefined | The identifier of the watchlist to be deleted. |
DeleteWatchlistCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient permissions to perform this action. Check the error message and try again. |
ConflictException | client | The request failed due to a conflict. Check the |
InternalServerException | server | The request failed due to an unknown error on the server side. |
ResourceNotFoundException | client | The specified resource cannot be found. Check the |
ThrottlingException | client | The request was denied due to request throttling. Please slow down your request rate. Refer to Amazon Connect Voice ID Service API throttling quotas and try your request again. |
ValidationException | client | The request failed one or more validations; check the error message for more details. |
VoiceIDServiceException | Base exception class for all service exceptions from VoiceID service. |