deleteIndexField method

Future<DeleteIndexFieldResponse> deleteIndexField({
  1. required String domainName,
  2. required String indexFieldName,
})

Removes an IndexField from the search domain. For more information, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

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

Parameter indexFieldName : The name of the index field your want to remove from the domain's indexing options.

Implementation

Future<DeleteIndexFieldResponse> deleteIndexField({
  required String domainName,
  required String indexFieldName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(indexFieldName, 'indexFieldName');
  _s.validateStringLength(
    'indexFieldName',
    indexFieldName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  $request['IndexFieldName'] = indexFieldName;
  final $result = await _protocol.send(
    $request,
    action: 'DeleteIndexField',
    version: '2013-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteIndexFieldRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteIndexFieldResult',
  );
  return DeleteIndexFieldResponse.fromXml($result);
}