createReceiptRule method
- required ReceiptRule rule,
- required String ruleSetName,
- String? after,
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 InvalidSnsTopicException. May throw InvalidS3ConfigurationException. May throw InvalidLambdaFunctionException. May throw AlreadyExistsException. May throw RuleDoesNotExistException. May throw RuleSetDoesNotExistException. May throw LimitExceededException.
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 that the receipt rule will be added to.
Parameter after
:
The name of an existing rule after which the new rule will be placed. If
this parameter is null, the new rule will be inserted at the beginning of
the rule list.
Implementation
Future<void> createReceiptRule({
required ReceiptRule rule,
required String ruleSetName,
String? after,
}) async {
ArgumentError.checkNotNull(rule, 'rule');
ArgumentError.checkNotNull(ruleSetName, 'ruleSetName');
final $request = <String, dynamic>{};
$request['Rule'] = rule;
$request['RuleSetName'] = ruleSetName;
after?.also((arg) => $request['After'] = arg);
await _protocol.send(
$request,
action: 'CreateReceiptRule',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateReceiptRuleRequest'],
shapes: shapes,
resultWrapper: 'CreateReceiptRuleResult',
);
}