ReceiptRule

Provides an SES receipt rule resource

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // Add a header to the email and store it in S3
        var store = new Aws.Ses.ReceiptRule("store", new Aws.Ses.ReceiptRuleArgs
        {
            AddHeaderActions = 
            {
                new Aws.Ses.Inputs.ReceiptRuleAddHeaderActionArgs
                {
                    HeaderName = "Custom-Header",
                    HeaderValue = "Added by SES",
                    Position = 1,
                },
            },
            Enabled = true,
            Recipients = 
            {
                "karen@example.com",
            },
            RuleSetName = "default-rule-set",
            S3Actions = 
            {
                new Aws.Ses.Inputs.ReceiptRuleS3ActionArgs
                {
                    BucketName = "emails",
                    Position = 2,
                },
            },
            ScanEnabled = true,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ses"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ses.NewReceiptRule(ctx, "store", &ses.ReceiptRuleArgs{
            AddHeaderActions: ses.ReceiptRuleAddHeaderActionArray{
                &ses.ReceiptRuleAddHeaderActionArgs{
                    HeaderName:  pulumi.String("Custom-Header"),
                    HeaderValue: pulumi.String("Added by SES"),
                    Position:    pulumi.Int(1),
                },
            },
            Enabled: pulumi.Bool(true),
            Recipients: pulumi.StringArray{
                pulumi.String("karen@example.com"),
            },
            RuleSetName: pulumi.String("default-rule-set"),
            S3Actions: ses.ReceiptRuleS3ActionArray{
                &ses.ReceiptRuleS3ActionArgs{
                    BucketName: pulumi.String("emails"),
                    Position:   pulumi.Int(2),
                },
            },
            ScanEnabled: pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

# Add a header to the email and store it in S3
store = aws.ses.ReceiptRule("store",
    add_header_actions=[{
        "headerName": "Custom-Header",
        "headerValue": "Added by SES",
        "position": 1,
    }],
    enabled=True,
    recipients=["karen@example.com"],
    rule_set_name="default-rule-set",
    s3_actions=[{
        "bucket_name": "emails",
        "position": 2,
    }],
    scan_enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Add a header to the email and store it in S3
const store = new aws.ses.ReceiptRule("store", {
    addHeaderActions: [{
        headerName: "Custom-Header",
        headerValue: "Added by SES",
        position: 1,
    }],
    enabled: true,
    recipients: ["karen@example.com"],
    ruleSetName: "default-rule-set",
    s3Actions: [{
        bucketName: "emails",
        position: 2,
    }],
    scanEnabled: true,
});

Create a ReceiptRule Resource

def ReceiptRule(resource_name, opts=None, add_header_actions=None, after=None, bounce_actions=None, enabled=None, lambda_actions=None, name=None, recipients=None, rule_set_name=None, s3_actions=None, scan_enabled=None, sns_actions=None, stop_actions=None, tls_policy=None, workmail_actions=None, __props__=None);
func NewReceiptRule(ctx *Context, name string, args ReceiptRuleArgs, opts ...ResourceOption) (*ReceiptRule, error)
public ReceiptRule(string name, ReceiptRuleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ReceiptRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ReceiptRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ReceiptRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ReceiptRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ReceiptRule resource accepts the following input properties:

RuleSetName string

The name of the rule set

AddHeaderActions List<ReceiptRuleAddHeaderActionArgs>

A list of Add Header Action blocks. Documented below.

After string

The name of the rule to place this rule after

BounceActions List<ReceiptRuleBounceActionArgs>

A list of Bounce Action blocks. Documented below.

Enabled bool

If true, the rule will be enabled

LambdaActions List<ReceiptRuleLambdaActionArgs>

A list of Lambda Action blocks. Documented below.

Name string

The name of the rule

Recipients List<string>

A list of email addresses

S3Actions List<ReceiptRuleS3ActionArgs>

A list of S3 Action blocks. Documented below.

ScanEnabled bool

If true, incoming emails will be scanned for spam and viruses

SnsActions List<ReceiptRuleSnsActionArgs>

A list of SNS Action blocks. Documented below.

StopActions List<ReceiptRuleStopActionArgs>

A list of Stop Action blocks. Documented below.

TlsPolicy string

Require or Optional

WorkmailActions List<ReceiptRuleWorkmailActionArgs>

A list of WorkMail Action blocks. Documented below.

RuleSetName string

The name of the rule set

AddHeaderActions []ReceiptRuleAddHeaderAction

A list of Add Header Action blocks. Documented below.

After string

The name of the rule to place this rule after

BounceActions []ReceiptRuleBounceAction

A list of Bounce Action blocks. Documented below.

Enabled bool

If true, the rule will be enabled

LambdaActions []ReceiptRuleLambdaAction

A list of Lambda Action blocks. Documented below.

Name string

The name of the rule

Recipients []string

A list of email addresses

S3Actions []ReceiptRuleS3Action

A list of S3 Action blocks. Documented below.

ScanEnabled bool

If true, incoming emails will be scanned for spam and viruses

SnsActions []ReceiptRuleSnsAction

A list of SNS Action blocks. Documented below.

StopActions []ReceiptRuleStopAction

A list of Stop Action blocks. Documented below.

TlsPolicy string

Require or Optional

WorkmailActions []ReceiptRuleWorkmailAction

A list of WorkMail Action blocks. Documented below.

ruleSetName string

The name of the rule set

addHeaderActions ReceiptRuleAddHeaderAction[]

A list of Add Header Action blocks. Documented below.

after string

The name of the rule to place this rule after

bounceActions ReceiptRuleBounceAction[]

A list of Bounce Action blocks. Documented below.

enabled boolean

If true, the rule will be enabled

lambdaActions ReceiptRuleLambdaAction[]

A list of Lambda Action blocks. Documented below.

name string

The name of the rule

recipients string[]

A list of email addresses

s3Actions ReceiptRuleS3Action[]

A list of S3 Action blocks. Documented below.

scanEnabled boolean

If true, incoming emails will be scanned for spam and viruses

snsActions ReceiptRuleSnsAction[]

A list of SNS Action blocks. Documented below.

stopActions ReceiptRuleStopAction[]

A list of Stop Action blocks. Documented below.

tlsPolicy string

Require or Optional

workmailActions ReceiptRuleWorkmailAction[]

A list of WorkMail Action blocks. Documented below.

rule_set_name str

The name of the rule set

add_header_actions List[ReceiptRuleAddHeaderAction]

A list of Add Header Action blocks. Documented below.

after str

The name of the rule to place this rule after

bounce_actions List[ReceiptRuleBounceAction]

A list of Bounce Action blocks. Documented below.

enabled bool

If true, the rule will be enabled

lambda_actions List[ReceiptRuleLambdaAction]

A list of Lambda Action blocks. Documented below.

name str

The name of the rule

recipients List[str]

A list of email addresses

s3_actions List[ReceiptRuleS3Action]

A list of S3 Action blocks. Documented below.

scan_enabled bool

If true, incoming emails will be scanned for spam and viruses

sns_actions List[ReceiptRuleSnsAction]

A list of SNS Action blocks. Documented below.

stop_actions List[ReceiptRuleStopAction]

A list of Stop Action blocks. Documented below.

tls_policy str

Require or Optional

workmail_actions List[ReceiptRuleWorkmailAction]

A list of WorkMail Action blocks. Documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the ReceiptRule resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ReceiptRule Resource

Get an existing ReceiptRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ReceiptRuleState, opts?: CustomResourceOptions): ReceiptRule
static get(resource_name, id, opts=None, add_header_actions=None, after=None, bounce_actions=None, enabled=None, lambda_actions=None, name=None, recipients=None, rule_set_name=None, s3_actions=None, scan_enabled=None, sns_actions=None, stop_actions=None, tls_policy=None, workmail_actions=None, __props__=None);
func GetReceiptRule(ctx *Context, name string, id IDInput, state *ReceiptRuleState, opts ...ResourceOption) (*ReceiptRule, error)
public static ReceiptRule Get(string name, Input<string> id, ReceiptRuleState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AddHeaderActions List<ReceiptRuleAddHeaderActionArgs>

A list of Add Header Action blocks. Documented below.

After string

The name of the rule to place this rule after

BounceActions List<ReceiptRuleBounceActionArgs>

A list of Bounce Action blocks. Documented below.

Enabled bool

If true, the rule will be enabled

LambdaActions List<ReceiptRuleLambdaActionArgs>

A list of Lambda Action blocks. Documented below.

Name string

The name of the rule

Recipients List<string>

A list of email addresses

RuleSetName string

The name of the rule set

S3Actions List<ReceiptRuleS3ActionArgs>

A list of S3 Action blocks. Documented below.

ScanEnabled bool

If true, incoming emails will be scanned for spam and viruses

SnsActions List<ReceiptRuleSnsActionArgs>

A list of SNS Action blocks. Documented below.

StopActions List<ReceiptRuleStopActionArgs>

A list of Stop Action blocks. Documented below.

TlsPolicy string

Require or Optional

WorkmailActions List<ReceiptRuleWorkmailActionArgs>

A list of WorkMail Action blocks. Documented below.

AddHeaderActions []ReceiptRuleAddHeaderAction

A list of Add Header Action blocks. Documented below.

After string

The name of the rule to place this rule after

BounceActions []ReceiptRuleBounceAction

A list of Bounce Action blocks. Documented below.

Enabled bool

If true, the rule will be enabled

LambdaActions []ReceiptRuleLambdaAction

A list of Lambda Action blocks. Documented below.

Name string

The name of the rule

Recipients []string

A list of email addresses

RuleSetName string

The name of the rule set

S3Actions []ReceiptRuleS3Action

A list of S3 Action blocks. Documented below.

ScanEnabled bool

If true, incoming emails will be scanned for spam and viruses

SnsActions []ReceiptRuleSnsAction

A list of SNS Action blocks. Documented below.

StopActions []ReceiptRuleStopAction

A list of Stop Action blocks. Documented below.

TlsPolicy string

Require or Optional

WorkmailActions []ReceiptRuleWorkmailAction

A list of WorkMail Action blocks. Documented below.

addHeaderActions ReceiptRuleAddHeaderAction[]

A list of Add Header Action blocks. Documented below.

after string

The name of the rule to place this rule after

bounceActions ReceiptRuleBounceAction[]

A list of Bounce Action blocks. Documented below.

enabled boolean

If true, the rule will be enabled

lambdaActions ReceiptRuleLambdaAction[]

A list of Lambda Action blocks. Documented below.

name string

The name of the rule

recipients string[]

A list of email addresses

ruleSetName string

The name of the rule set

s3Actions ReceiptRuleS3Action[]

A list of S3 Action blocks. Documented below.

scanEnabled boolean

If true, incoming emails will be scanned for spam and viruses

snsActions ReceiptRuleSnsAction[]

A list of SNS Action blocks. Documented below.

stopActions ReceiptRuleStopAction[]

A list of Stop Action blocks. Documented below.

tlsPolicy string

Require or Optional

workmailActions ReceiptRuleWorkmailAction[]

A list of WorkMail Action blocks. Documented below.

add_header_actions List[ReceiptRuleAddHeaderAction]

A list of Add Header Action blocks. Documented below.

after str

The name of the rule to place this rule after

bounce_actions List[ReceiptRuleBounceAction]

A list of Bounce Action blocks. Documented below.

enabled bool

If true, the rule will be enabled

lambda_actions List[ReceiptRuleLambdaAction]

A list of Lambda Action blocks. Documented below.

name str

The name of the rule

recipients List[str]

A list of email addresses

rule_set_name str

The name of the rule set

s3_actions List[ReceiptRuleS3Action]

A list of S3 Action blocks. Documented below.

scan_enabled bool

If true, incoming emails will be scanned for spam and viruses

sns_actions List[ReceiptRuleSnsAction]

A list of SNS Action blocks. Documented below.

stop_actions List[ReceiptRuleStopAction]

A list of Stop Action blocks. Documented below.

tls_policy str

Require or Optional

workmail_actions List[ReceiptRuleWorkmailAction]

A list of WorkMail Action blocks. Documented below.

Supporting Types

ReceiptRuleAddHeaderAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

HeaderName string

The name of the header to add

HeaderValue string

The value of the header to add

Position int

The position of the action in the receipt rule

HeaderName string

The name of the header to add

HeaderValue string

The value of the header to add

Position int

The position of the action in the receipt rule

headerName string

The name of the header to add

headerValue string

The value of the header to add

position number

The position of the action in the receipt rule

headerName str

The name of the header to add

headerValue str

The value of the header to add

position float

The position of the action in the receipt rule

ReceiptRuleBounceAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Message string

The message to send

Position int

The position of the action in the receipt rule

Sender string

The email address of the sender

SmtpReplyCode string

The RFC 5321 SMTP reply code

StatusCode string

The RFC 3463 SMTP enhanced status code

TopicArn string

The ARN of an SNS topic to notify

Message string

The message to send

Position int

The position of the action in the receipt rule

Sender string

The email address of the sender

SmtpReplyCode string

The RFC 5321 SMTP reply code

StatusCode string

The RFC 3463 SMTP enhanced status code

TopicArn string

The ARN of an SNS topic to notify

message string

The message to send

position number

The position of the action in the receipt rule

sender string

The email address of the sender

smtpReplyCode string

The RFC 5321 SMTP reply code

statusCode string

The RFC 3463 SMTP enhanced status code

topicArn string

The ARN of an SNS topic to notify

message str

The message to send

position float

The position of the action in the receipt rule

sender str

The email address of the sender

smtpReplyCode str

The RFC 5321 SMTP reply code

status_code str

The RFC 3463 SMTP enhanced status code

topic_arn str

The ARN of an SNS topic to notify

ReceiptRuleLambdaAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

FunctionArn string

The ARN of the Lambda function to invoke

Position int

The position of the action in the receipt rule

InvocationType string

Event or RequestResponse

TopicArn string

The ARN of an SNS topic to notify

FunctionArn string

The ARN of the Lambda function to invoke

Position int

The position of the action in the receipt rule

InvocationType string

Event or RequestResponse

TopicArn string

The ARN of an SNS topic to notify

functionArn string

The ARN of the Lambda function to invoke

position number

The position of the action in the receipt rule

invocationType string

Event or RequestResponse

topicArn string

The ARN of an SNS topic to notify

function_arn str

The ARN of the Lambda function to invoke

position float

The position of the action in the receipt rule

invocationType str

Event or RequestResponse

topic_arn str

The ARN of an SNS topic to notify

ReceiptRuleS3Action

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

BucketName string

The name of the S3 bucket

Position int

The position of the action in the receipt rule

KmsKeyArn string

The ARN of the KMS key

ObjectKeyPrefix string

The key prefix of the S3 bucket

TopicArn string

The ARN of an SNS topic to notify

BucketName string

The name of the S3 bucket

Position int

The position of the action in the receipt rule

KmsKeyArn string

The ARN of the KMS key

ObjectKeyPrefix string

The key prefix of the S3 bucket

TopicArn string

The ARN of an SNS topic to notify

bucketName string

The name of the S3 bucket

position number

The position of the action in the receipt rule

kmsKeyArn string

The ARN of the KMS key

objectKeyPrefix string

The key prefix of the S3 bucket

topicArn string

The ARN of an SNS topic to notify

bucket_name str

The name of the S3 bucket

position float

The position of the action in the receipt rule

kms_key_arn str

The ARN of the KMS key

objectKeyPrefix str

The key prefix of the S3 bucket

topic_arn str

The ARN of an SNS topic to notify

ReceiptRuleSnsAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Position int

The position of the action in the receipt rule

TopicArn string

The ARN of an SNS topic to notify

Position int

The position of the action in the receipt rule

TopicArn string

The ARN of an SNS topic to notify

position number

The position of the action in the receipt rule

topicArn string

The ARN of an SNS topic to notify

position float

The position of the action in the receipt rule

topic_arn str

The ARN of an SNS topic to notify

ReceiptRuleStopAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Position int

The position of the action in the receipt rule

Scope string

The scope to apply

TopicArn string

The ARN of an SNS topic to notify

Position int

The position of the action in the receipt rule

Scope string

The scope to apply

TopicArn string

The ARN of an SNS topic to notify

position number

The position of the action in the receipt rule

scope string

The scope to apply

topicArn string

The ARN of an SNS topic to notify

position float

The position of the action in the receipt rule

scope str

The scope to apply

topic_arn str

The ARN of an SNS topic to notify

ReceiptRuleWorkmailAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

OrganizationArn string

The ARN of the WorkMail organization

Position int

The position of the action in the receipt rule

TopicArn string

The ARN of an SNS topic to notify

OrganizationArn string

The ARN of the WorkMail organization

Position int

The position of the action in the receipt rule

TopicArn string

The ARN of an SNS topic to notify

organizationArn string

The ARN of the WorkMail organization

position number

The position of the action in the receipt rule

topicArn string

The ARN of an SNS topic to notify

organizationArn str

The ARN of the WorkMail organization

position float

The position of the action in the receipt rule

topic_arn str

The ARN of an SNS topic to notify

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.