Skip to content

Creates a receipt rule

Description

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.

Usage

ses_create_receipt_rule(RuleSetName, After, Rule)

Arguments

  • RuleSetName

    [required] The name of the rule set where the receipt rule is added.

  • 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.

  • Rule

    [required] A data structure that contains the specified rule's name, actions, recipients, domains, enabled status, scan status, and TLS policy.

Value

An empty list.

Request syntax

svc$create_receipt_rule(
  RuleSetName = "string",
  After = "string",
  Rule = list(
    Name = "string",
    Enabled = TRUE|FALSE,
    TlsPolicy = "Require"|"Optional",
    Recipients = list(
      "string"
    ),
    Actions = list(
      list(
        S3Action = list(
          TopicArn = "string",
          BucketName = "string",
          ObjectKeyPrefix = "string",
          KmsKeyArn = "string",
          IamRoleArn = "string"
        ),
        BounceAction = list(
          TopicArn = "string",
          SmtpReplyCode = "string",
          StatusCode = "string",
          Message = "string",
          Sender = "string"
        ),
        WorkmailAction = list(
          TopicArn = "string",
          OrganizationArn = "string"
        ),
        LambdaAction = list(
          TopicArn = "string",
          FunctionArn = "string",
          InvocationType = "Event"|"RequestResponse"
        ),
        StopAction = list(
          Scope = "RuleSet",
          TopicArn = "string"
        ),
        AddHeaderAction = list(
          HeaderName = "string",
          HeaderValue = "string"
        ),
        SNSAction = list(
          TopicArn = "string",
          Encoding = "UTF-8"|"Base64"
        ),
        ConnectAction = list(
          InstanceARN = "string",
          IAMRoleARN = "string"
        )
      )
    ),
    ScanEnabled = TRUE|FALSE
  )
)

Examples

# The following example creates a new receipt rule:
svc$create_receipt_rule(
  After = "",
  Rule = list(
    Actions = list(
      list(
        S3Action = list(
          BucketName = "MyBucket",
          ObjectKeyPrefix = "email"
        )
      )
    ),
    Enabled = TRUE,
    Name = "MyRule",
    ScanEnabled = TRUE,
    TlsPolicy = "Optional"
  ),
  RuleSetName = "MyRuleSet"
)