createReceiptRule method
Creates a receipt rule.
For information about setting up receipt rules, see the Amazon SES Developer Guide.
You can execute this operation no more than once per second.
May throw AlreadyExistsException.
May throw InvalidLambdaFunctionException.
May throw InvalidS3ConfigurationException.
May throw InvalidSnsTopicException.
May throw LimitExceededException.
May throw RuleDoesNotExistException.
May throw RuleSetDoesNotExistException.
Parameter rule :
A data structure that contains the specified rule's name, actions,
recipients, domains, enabled status, scan status, and TLS policy.
Parameter ruleSetName :
The name of the rule set where the receipt rule is added.
Parameter after :
The name of an existing rule after which the new rule is placed. If this
parameter is null, the new rule is inserted at the beginning of the rule
list.
Implementation
Future<void> createReceiptRule({
required ReceiptRule rule,
required String ruleSetName,
String? after,
}) async {
final $request = <String, String>{
for (var e1 in rule.toQueryMap().entries) 'Rule.${e1.key}': e1.value,
'RuleSetName': ruleSetName,
if (after != null) 'After': after,
};
await _protocol.send(
$request,
action: 'CreateReceiptRule',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'CreateReceiptRuleResult',
);
}