describeSuggesters method

Future<DescribeSuggestersResponse> describeSuggesters({
  1. required String domainName,
  2. bool? deployed,
  3. List<String>? suggesterNames,
})

Gets the suggesters configured for a domain. A suggester enables you to display possible matches before users finish typing their queries. Can be limited to specific suggesters by name. By default, shows all suggesters and includes any pending changes to the configuration. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Getting Search Suggestions in the Amazon CloudSearch Developer Guide.

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

Parameter domainName : The name of the domain you want to describe.

Parameter deployed : Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Parameter suggesterNames : The suggesters you want to describe.

Implementation

Future<DescribeSuggestersResponse> describeSuggesters({
  required String domainName,
  bool? deployed,
  List<String>? suggesterNames,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  deployed?.also((arg) => $request['Deployed'] = arg);
  suggesterNames?.also((arg) => $request['SuggesterNames'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeSuggesters',
    version: '2013-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeSuggestersRequest'],
    shapes: shapes,
    resultWrapper: 'DescribeSuggestersResult',
  );
  return DescribeSuggestersResponse.fromXml($result);
}