updateSynonymOptions method

Future<UpdateSynonymOptionsResponse> updateSynonymOptions({
  1. required String domainName,
  2. required String synonyms,
})

Configures a synonym dictionary for the search domain. The synonym dictionary is used during indexing to configure mappings for terms that occur in text fields. The maximum size of the synonym dictionary is 100 KB.

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

Implementation

Future<UpdateSynonymOptionsResponse> updateSynonymOptions({
  required String domainName,
  required String synonyms,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(synonyms, 'synonyms');
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  $request['Synonyms'] = synonyms;
  final $result = await _protocol.send(
    $request,
    action: 'UpdateSynonymOptions',
    version: '2011-02-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['UpdateSynonymOptionsRequest'],
    shapes: shapes,
    resultWrapper: 'UpdateSynonymOptionsResult',
  );
  return UpdateSynonymOptionsResponse.fromXml($result);
}