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
new ReceiptRule(name: string, args: ReceiptRuleArgs, opts?: CustomResourceOptions);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:
- Rule
Set stringName The name of the rule set
- Add
Header List<ReceiptActions Rule Add Header Action Args> A list of Add Header Action blocks. Documented below.
- After string
The name of the rule to place this rule after
- Bounce
Actions List<ReceiptRule Bounce Action Args> A list of Bounce Action blocks. Documented below.
- Enabled bool
If true, the rule will be enabled
- Lambda
Actions List<ReceiptRule Lambda Action Args> 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<Receipt
Rule S3Action Args> 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<ReceiptRule Sns Action Args> A list of SNS Action blocks. Documented below.
- Stop
Actions List<ReceiptRule Stop Action Args> A list of Stop Action blocks. Documented below.
- Tls
Policy string Require or Optional
- Workmail
Actions List<ReceiptRule Workmail Action Args> A list of WorkMail Action blocks. Documented below.
- Rule
Set stringName The name of the rule set
- Add
Header []ReceiptActions Rule Add Header Action A list of Add Header Action blocks. Documented below.
- After string
The name of the rule to place this rule after
- Bounce
Actions []ReceiptRule Bounce Action A list of Bounce Action blocks. Documented below.
- Enabled bool
If true, the rule will be enabled
- Lambda
Actions []ReceiptRule Lambda Action A list of Lambda Action blocks. Documented below.
- Name string
The name of the rule
- Recipients []string
A list of email addresses
- S3Actions
[]Receipt
Rule S3Action A list of S3 Action blocks. Documented below.
- Scan
Enabled bool If true, incoming emails will be scanned for spam and viruses
- Sns
Actions []ReceiptRule Sns Action A list of SNS Action blocks. Documented below.
- Stop
Actions []ReceiptRule Stop Action A list of Stop Action blocks. Documented below.
- Tls
Policy string Require or Optional
- Workmail
Actions []ReceiptRule Workmail Action A list of WorkMail Action blocks. Documented below.
- rule
Set stringName The name of the rule set
- add
Header ReceiptActions Rule Add Header Action[] A list of Add Header Action blocks. Documented below.
- after string
The name of the rule to place this rule after
- bounce
Actions ReceiptRule Bounce Action[] A list of Bounce Action blocks. Documented below.
- enabled boolean
If true, the rule will be enabled
- lambda
Actions ReceiptRule Lambda Action[] A list of Lambda Action blocks. Documented below.
- name string
The name of the rule
- recipients string[]
A list of email addresses
- s3Actions
Receipt
Rule S3Action[] A list of S3 Action blocks. Documented below.
- scan
Enabled boolean If true, incoming emails will be scanned for spam and viruses
- sns
Actions ReceiptRule Sns Action[] A list of SNS Action blocks. Documented below.
- stop
Actions ReceiptRule Stop Action[] A list of Stop Action blocks. Documented below.
- tls
Policy string Require or Optional
- workmail
Actions ReceiptRule Workmail Action[] A list of WorkMail Action blocks. Documented below.
- rule_
set_ strname The name of the rule set
- add_
header_ List[Receiptactions Rule Add Header Action] A list of Add Header Action blocks. Documented below.
- after str
The name of the rule to place this rule after
- bounce_
actions List[ReceiptRule Bounce Action] A list of Bounce Action blocks. Documented below.
- enabled bool
If true, the rule will be enabled
- lambda_
actions List[ReceiptRule Lambda Action] 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[ReceiptRule S3Action] 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[ReceiptRule Sns Action] A list of SNS Action blocks. Documented below.
- stop_
actions List[ReceiptRule Stop Action] A list of Stop Action blocks. Documented below.
- tls_
policy str Require or Optional
- workmail_
actions List[ReceiptRule Workmail Action] 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:
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): ReceiptRulestatic 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:
- Add
Header List<ReceiptActions Rule Add Header Action Args> A list of Add Header Action blocks. Documented below.
- After string
The name of the rule to place this rule after
- Bounce
Actions List<ReceiptRule Bounce Action Args> A list of Bounce Action blocks. Documented below.
- Enabled bool
If true, the rule will be enabled
- Lambda
Actions List<ReceiptRule Lambda Action Args> A list of Lambda Action blocks. Documented below.
- Name string
The name of the rule
- Recipients List<string>
A list of email addresses
- Rule
Set stringName The name of the rule set
- S3Actions
List<Receipt
Rule S3Action Args> 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<ReceiptRule Sns Action Args> A list of SNS Action blocks. Documented below.
- Stop
Actions List<ReceiptRule Stop Action Args> A list of Stop Action blocks. Documented below.
- Tls
Policy string Require or Optional
- Workmail
Actions List<ReceiptRule Workmail Action Args> A list of WorkMail Action blocks. Documented below.
- Add
Header []ReceiptActions Rule Add Header Action A list of Add Header Action blocks. Documented below.
- After string
The name of the rule to place this rule after
- Bounce
Actions []ReceiptRule Bounce Action A list of Bounce Action blocks. Documented below.
- Enabled bool
If true, the rule will be enabled
- Lambda
Actions []ReceiptRule Lambda Action A list of Lambda Action blocks. Documented below.
- Name string
The name of the rule
- Recipients []string
A list of email addresses
- Rule
Set stringName The name of the rule set
- S3Actions
[]Receipt
Rule S3Action A list of S3 Action blocks. Documented below.
- Scan
Enabled bool If true, incoming emails will be scanned for spam and viruses
- Sns
Actions []ReceiptRule Sns Action A list of SNS Action blocks. Documented below.
- Stop
Actions []ReceiptRule Stop Action A list of Stop Action blocks. Documented below.
- Tls
Policy string Require or Optional
- Workmail
Actions []ReceiptRule Workmail Action A list of WorkMail Action blocks. Documented below.
- add
Header ReceiptActions Rule Add Header Action[] A list of Add Header Action blocks. Documented below.
- after string
The name of the rule to place this rule after
- bounce
Actions ReceiptRule Bounce Action[] A list of Bounce Action blocks. Documented below.
- enabled boolean
If true, the rule will be enabled
- lambda
Actions ReceiptRule Lambda Action[] A list of Lambda Action blocks. Documented below.
- name string
The name of the rule
- recipients string[]
A list of email addresses
- rule
Set stringName The name of the rule set
- s3Actions
Receipt
Rule S3Action[] A list of S3 Action blocks. Documented below.
- scan
Enabled boolean If true, incoming emails will be scanned for spam and viruses
- sns
Actions ReceiptRule Sns Action[] A list of SNS Action blocks. Documented below.
- stop
Actions ReceiptRule Stop Action[] A list of Stop Action blocks. Documented below.
- tls
Policy string Require or Optional
- workmail
Actions ReceiptRule Workmail Action[] A list of WorkMail Action blocks. Documented below.
- add_
header_ List[Receiptactions Rule Add Header Action] A list of Add Header Action blocks. Documented below.
- after str
The name of the rule to place this rule after
- bounce_
actions List[ReceiptRule Bounce Action] A list of Bounce Action blocks. Documented below.
- enabled bool
If true, the rule will be enabled
- lambda_
actions List[ReceiptRule Lambda Action] 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_ strname The name of the rule set
- s3_
actions List[ReceiptRule S3Action] 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[ReceiptRule Sns Action] A list of SNS Action blocks. Documented below.
- stop_
actions List[ReceiptRule Stop Action] A list of Stop Action blocks. Documented below.
- tls_
policy str Require or Optional
- workmail_
actions List[ReceiptRule Workmail Action] A list of WorkMail Action blocks. Documented below.
Supporting Types
ReceiptRuleAddHeaderAction
- Header
Name string The name of the header to add
- Header
Value string The value of the header to add
- Position int
The position of the action in the receipt rule
- Header
Name string The name of the header to add
- Header
Value string The value of the header to add
- Position int
The position of the action in the receipt rule
- header
Name string The name of the header to add
- header
Value string The value of the header to add
- position number
The position of the action in the receipt rule
- header
Name str The name of the header to add
- header
Value str The value of the header to add
- position float
The position of the action in the receipt rule
ReceiptRuleBounceAction
ReceiptRuleLambdaAction
- Function
Arn string The ARN of the Lambda function to invoke
- Position int
The position of the action in the receipt rule
- Invocation
Type string Event or RequestResponse
- Topic
Arn string The ARN of an SNS topic to notify
- Function
Arn string The ARN of the Lambda function to invoke
- Position int
The position of the action in the receipt rule
- Invocation
Type string Event or RequestResponse
- Topic
Arn string The ARN of an SNS topic to notify
- function
Arn string The ARN of the Lambda function to invoke
- position number
The position of the action in the receipt rule
- invocation
Type string Event or RequestResponse
- topic
Arn 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
- invocation
Type str Event or RequestResponse
- topic_
arn str The ARN of an SNS topic to notify
ReceiptRuleS3Action
- Bucket
Name string The name of the S3 bucket
- Position int
The position of the action in the receipt rule
- Kms
Key stringArn The ARN of the KMS key
- Object
Key stringPrefix The key prefix of the S3 bucket
- Topic
Arn string The ARN of an SNS topic to notify
- Bucket
Name string The name of the S3 bucket
- Position int
The position of the action in the receipt rule
- Kms
Key stringArn The ARN of the KMS key
- Object
Key stringPrefix The key prefix of the S3 bucket
- Topic
Arn string The ARN of an SNS topic to notify
- bucket
Name string The name of the S3 bucket
- position number
The position of the action in the receipt rule
- kms
Key stringArn The ARN of the KMS key
- object
Key stringPrefix The key prefix of the S3 bucket
- topic
Arn 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_ strarn The ARN of the KMS key
- object
Key strPrefix The key prefix of the S3 bucket
- topic_
arn str The ARN of an SNS topic to notify
ReceiptRuleSnsAction
ReceiptRuleStopAction
ReceiptRuleWorkmailAction
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.