deleteExpression method

Future<DeleteExpressionResponse> deleteExpression({
  1. required String domainName,
  2. required String expressionName,
})

Removes an Expression from the search domain. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.

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

Parameter expressionName : The name of the Expression to delete.

Implementation

Future<DeleteExpressionResponse> deleteExpression({
  required String domainName,
  required String expressionName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(expressionName, 'expressionName');
  _s.validateStringLength(
    'expressionName',
    expressionName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  $request['ExpressionName'] = expressionName;
  final $result = await _protocol.send(
    $request,
    action: 'DeleteExpression',
    version: '2013-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteExpressionRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteExpressionResult',
  );
  return DeleteExpressionResponse.fromXml($result);
}