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 InvalidTypeException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ValidationException.
Implementation
Future<DefineExpressionResponse> defineExpression({
required String domainName,
required Expression expression,
}) async {
final $request = <String, String>{
'DomainName': domainName,
for (var e1 in expression.toQueryMap().entries)
'Expression.${e1.key}': e1.value,
};
final $result = await _protocol.send(
$request,
action: 'DefineExpression',
version: '2013-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DefineExpressionResult',
);
return DefineExpressionResponse.fromXml($result);
}