indexDocuments method

Future<IndexDocumentsResponse> indexDocuments({
  1. required String domainName,
})

Tells the search domain to start indexing its documents using the latest indexing options. This operation must be invoked to activate options whose OptionStatus is RequiresIndexDocuments.

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

Implementation

Future<IndexDocumentsResponse> indexDocuments({
  required String domainName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  final $result = await _protocol.send(
    $request,
    action: 'IndexDocuments',
    version: '2013-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['IndexDocumentsRequest'],
    shapes: shapes,
    resultWrapper: 'IndexDocumentsResult',
  );
  return IndexDocumentsResponse.fromXml($result);
}