deleteIndexField method

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

Removes an IndexField from the search domain.

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

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: '2011-02-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteIndexFieldRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteIndexFieldResult',
  );
  return DeleteIndexFieldResponse.fromXml($result);
}