DeleteSuggesterCommand

Deletes a suggester. For more information, see Getting Search Suggestions  in the Amazon CloudSearch Developer Guide.

Example Syntax

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

import { CloudSearchClient, DeleteSuggesterCommand } from "@aws-sdk/client-cloudsearch"; // ES Modules import
// const { CloudSearchClient, DeleteSuggesterCommand } = require("@aws-sdk/client-cloudsearch"); // CommonJS import
const client = new CloudSearchClient(config);
const input = { // DeleteSuggesterRequest
  DomainName: "STRING_VALUE", // required
  SuggesterName: "STRING_VALUE", // required
};
const command = new DeleteSuggesterCommand(input);
const response = await client.send(command);
// { // DeleteSuggesterResponse
//   Suggester: { // SuggesterStatus
//     Options: { // Suggester
//       SuggesterName: "STRING_VALUE", // required
//       DocumentSuggesterOptions: { // DocumentSuggesterOptions
//         SourceField: "STRING_VALUE", // required
//         FuzzyMatching: "none" || "low" || "high",
//         SortExpression: "STRING_VALUE",
//       },
//     },
//     Status: { // OptionStatus
//       CreationDate: new Date("TIMESTAMP"), // required
//       UpdateDate: new Date("TIMESTAMP"), // required
//       UpdateVersion: Number("int"),
//       State: "RequiresIndexDocuments" || "Processing" || "Active" || "FailedToValidate", // required
//       PendingDeletion: true || false,
//     },
//   },
// };

DeleteSuggesterCommand Input

See DeleteSuggesterCommandInput for more details

Parameter
Type
Description
DomainName
Required
string | undefined

A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

SuggesterName
Required
string | undefined

Specifies the name of the suggester you want to delete.

DeleteSuggesterCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Suggester
Required
SuggesterStatus | undefined

The status of the suggester being deleted.

Throws

Name
Fault
Details
BaseException
client

An error occurred while processing the request.

InternalException
server

An internal error occurred while processing the request. If this problem persists, report an issue from the Service Health Dashboard .

InvalidTypeException
client

The request was rejected because it specified an invalid type definition.

ResourceNotFoundException
client

The request was rejected because it attempted to reference a resource that does not exist.

ValidationException
client

The request was rejected because it has invalid parameters.

CloudSearchServiceException
Base exception class for all service exceptions from CloudSearch service.