defineExpression method
Future<DefineExpressionResponse>
defineExpression({
- required String domainName,
- required Expression expression,
Configures an Expression
for the search domain. Used
to create new expressions and modify existing ones. If the expression
exists, the new configuration replaces the old one. For more information,
see Configuring Expressions in the Amazon CloudSearch
Developer Guide.
May throw BaseException. May throw InternalException. May throw LimitExceededException. May throw InvalidTypeException. May throw ResourceNotFoundException.
Implementation
Future<DefineExpressionResponse> defineExpression({
required String domainName,
required Expression expression,
}) async {
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
3,
28,
isRequired: true,
);
ArgumentError.checkNotNull(expression, 'expression');
final $request = <String, dynamic>{};
$request['DomainName'] = domainName;
$request['Expression'] = expression;
final $result = await _protocol.send(
$request,
action: 'DefineExpression',
version: '2013-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DefineExpressionRequest'],
shapes: shapes,
resultWrapper: 'DefineExpressionResult',
);
return DefineExpressionResponse.fromXml($result);
}