defineIndexField method
Future<DefineIndexFieldResponse>
defineIndexField({
- required String domainName,
- required IndexField indexField,
Configures an IndexField
for the search domain. Used to
create new fields and modify existing ones. If the field exists, the new
configuration replaces the old one. You can configure a maximum of 200
index fields.
May throw BaseException. May throw InternalException. May throw LimitExceededException. May throw InvalidTypeException. May throw ResourceNotFoundException.
Implementation
Future<DefineIndexFieldResponse> defineIndexField({
required String domainName,
required IndexField indexField,
}) async {
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
3,
28,
isRequired: true,
);
ArgumentError.checkNotNull(indexField, 'indexField');
final $request = <String, dynamic>{};
$request['DomainName'] = domainName;
$request['IndexField'] = indexField;
final $result = await _protocol.send(
$request,
action: 'DefineIndexField',
version: '2011-02-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DefineIndexFieldRequest'],
shapes: shapes,
resultWrapper: 'DefineIndexFieldResult',
);
return DefineIndexFieldResponse.fromXml($result);
}