AWS::SES::ReceiptRule
Specifies a receipt rule.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::SES::ReceiptRule", "Properties" : { "After" :
String
, "Rule" :Rule
, "RuleSetName" :String
} }
YAML
Type: AWS::SES::ReceiptRule Properties: After:
String
Rule:Rule
RuleSetName:String
Properties
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.
Required: No
Type: String
Update requires: No interruption
Rule
-
A data structure that contains the specified rule's name, actions, recipients, domains, enabled status, scan status, and TLS policy.
Required: Yes
Type: Rule
Update requires: No interruption
RuleSetName
-
The name of the rule set where the receipt rule is added.
Required: Yes
Type: String
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the resource name.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
Examples
Specifies a receipt rule for incoming email.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "AWS SES ReceiptRule Sample Template", "Parameters": { "RuleSetName": { "Type": "String" }, "ReceiptRuleName1": { "Type": "String" }, "ReceiptRuleName2": { "Type": "String" }, "TlsPolicy": { "Type": "String" }, "HeaderName": { "Type": "String" }, "HeaderValue": { "Type": "String" } }, "Resources": { "ReceiptRule1": { "Type": "AWS::SES::ReceiptRule", "Properties": { "RuleSetName": { "Ref": "RuleSetName" }, "Rule": { "Name": { "Ref": "ReceiptRuleName1" }, "Enabled": true, "ScanEnabled": true, "TlsPolicy": { "Ref": "TlsPolicy" }, "Actions": [ { "AddHeaderAction": { "HeaderName": { "Ref": "HeaderName" }, "HeaderValue": { "Ref": "HeaderValue" } } } ] } } }, "ReceiptRule2": { "Type": "AWS::SES::ReceiptRule", "Properties": { "RuleSetName": { "Ref": "RuleSetName" }, "After": { "Ref": "ReceiptRule1" }, "Rule": { "Name": { "Ref": "ReceiptRuleName2" } } } } } }
YAML
AWSTemplateFormatVersion: 2010-09-09 Description: AWS SES ReceiptRule Sample Template Parameters: RuleSetName: Type: String ReceiptRuleName1: Type: String ReceiptRuleName2: Type: String TlsPolicy: Type: String HeaderName: Type: String HeaderValue: Type: String Resources: ReceiptRule1: Type: 'AWS::SES::ReceiptRule' Properties: RuleSetName: !Ref RuleSetName Rule: Name: !Ref ReceiptRuleName1 Enabled: true ScanEnabled: true TlsPolicy: !Ref TlsPolicy Actions: - AddHeaderAction: HeaderName: !Ref HeaderName HeaderValue: !Ref HeaderValue ReceiptRule2: Type: 'AWS::SES::ReceiptRule' Properties: RuleSetName: !Ref RuleSetName After: !Ref ReceiptRule1 Rule: Name: !Ref ReceiptRuleName2