deleteRankExpression method

Future<DeleteRankExpressionResponse> deleteRankExpression({
  1. required String domainName,
  2. required String rankName,
})

Removes a RankExpression from the search domain.

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

Parameter rankName : The name of the RankExpression to delete.

Implementation

Future<DeleteRankExpressionResponse> deleteRankExpression({
  required String domainName,
  required String rankName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  ArgumentError.checkNotNull(rankName, 'rankName');
  _s.validateStringLength(
    'rankName',
    rankName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  $request['RankName'] = rankName;
  final $result = await _protocol.send(
    $request,
    action: 'DeleteRankExpression',
    version: '2011-02-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteRankExpressionRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteRankExpressionResult',
  );
  return DeleteRankExpressionResponse.fromXml($result);
}