AWS::SES::ReceiptRule - AWS CloudFormation
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

AWS::SES::ReceiptRule

指定接收规则。

有关设置接收规则的信息,请参阅 Amazon SES 开发人员指南

您每秒执行此操作的次数不得超过一次。

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::SES::ReceiptRule", "Properties" : { "After" : String, "Rule" : Rule, "RuleSetName" : String } }

YAML

Type: AWS::SES::ReceiptRule Properties: After: String Rule: Rule RuleSetName: String

属性

After

要在其后放置当前规则的现有规则的名称。如果此参数为 null,新规则将作为接收规则集中的第一个条目添加。

必需:否

类型:字符串

Update requires: No interruption

Rule

一个包含指定规则的名称、操作、收件人、域、已启用状态、扫描状态和 TLS 策略的数据结构。

必需:是

类型规则

Update requires: No interruption

RuleSetName

要将接收规则添加到的规则集的名称。

必需:是

类型:字符串

Update requires: Replacement

返回值

Ref

在将此资源的逻辑 ID 传递给内部 Ref 函数时,Ref 返回 资源名称。例如:

For more information about using the Ref function, see Ref.

示例

指定传入电子邮件的接收规则。

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