cloneReceiptRuleSet method

Future<void> cloneReceiptRuleSet({
  1. required String originalRuleSetName,
  2. required String ruleSetName,
})

Creates a receipt rule set by cloning an existing one. All receipt rules and configurations are copied to the new receipt rule set and are completely independent of the source rule set.

For information about setting up rule sets, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

May throw RuleSetDoesNotExistException. May throw AlreadyExistsException. May throw LimitExceededException.

Parameter originalRuleSetName : The name of the rule set to clone.

Parameter ruleSetName : The name of the rule set to create. The name must:

  • This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).
  • Start and end with a letter or number.
  • Contain less than 64 characters.

Implementation

Future<void> cloneReceiptRuleSet({
  required String originalRuleSetName,
  required String ruleSetName,
}) async {
  ArgumentError.checkNotNull(originalRuleSetName, 'originalRuleSetName');
  ArgumentError.checkNotNull(ruleSetName, 'ruleSetName');
  final $request = <String, dynamic>{};
  $request['OriginalRuleSetName'] = originalRuleSetName;
  $request['RuleSetName'] = ruleSetName;
  await _protocol.send(
    $request,
    action: 'CloneReceiptRuleSet',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CloneReceiptRuleSetRequest'],
    shapes: shapes,
    resultWrapper: 'CloneReceiptRuleSetResult',
  );
}