deleteSuggester method

Future<DeleteSuggesterResponse> deleteSuggester({
  1. required String domainName,
  2. required String suggesterName,
})

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

May throw BaseException. May throw InternalException. May throw InvalidTypeException. May throw ResourceNotFoundException.

Parameter suggesterName : Specifies the name of the suggester you want to delete.

Implementation

Future<DeleteSuggesterResponse> deleteSuggester({
  required String domainName,
  required String suggesterName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(suggesterName, 'suggesterName');
  _s.validateStringLength(
    'suggesterName',
    suggesterName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  $request['SuggesterName'] = suggesterName;
  final $result = await _protocol.send(
    $request,
    action: 'DeleteSuggester',
    version: '2013-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteSuggesterRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteSuggesterResult',
  );
  return DeleteSuggesterResponse.fromXml($result);
}