interface RuleProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SES.CfnReceiptRule.RuleProperty |
Java | software.amazon.awscdk.services.ses.CfnReceiptRule.RuleProperty |
Python | aws_cdk.aws_ses.CfnReceiptRule.RuleProperty |
TypeScript | @aws-cdk/aws-ses » CfnReceiptRule » RuleProperty |
Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.
Each receipt rule defines a set of email addresses or domains that it applies to. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule's actions on the message.
For information about setting up receipt rules, see the Amazon SES Developer Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ses from '@aws-cdk/aws-ses';
const ruleProperty: ses.CfnReceiptRule.RuleProperty = {
actions: [{
addHeaderAction: {
headerName: 'headerName',
headerValue: 'headerValue',
},
bounceAction: {
message: 'message',
sender: 'sender',
smtpReplyCode: 'smtpReplyCode',
// the properties below are optional
statusCode: 'statusCode',
topicArn: 'topicArn',
},
lambdaAction: {
functionArn: 'functionArn',
// the properties below are optional
invocationType: 'invocationType',
topicArn: 'topicArn',
},
s3Action: {
bucketName: 'bucketName',
// the properties below are optional
kmsKeyArn: 'kmsKeyArn',
objectKeyPrefix: 'objectKeyPrefix',
topicArn: 'topicArn',
},
snsAction: {
encoding: 'encoding',
topicArn: 'topicArn',
},
stopAction: {
scope: 'scope',
// the properties below are optional
topicArn: 'topicArn',
},
workmailAction: {
organizationArn: 'organizationArn',
// the properties below are optional
topicArn: 'topicArn',
},
}],
enabled: false,
name: 'name',
recipients: ['recipients'],
scanEnabled: false,
tlsPolicy: 'tlsPolicy',
};
Properties
Name | Type | Description |
---|---|---|
actions? | IResolvable | IResolvable | Action [] | An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule. |
enabled? | boolean | IResolvable | If true , the receipt rule is active. |
name? | string | The name of the receipt rule. The name must meet the following requirements:. |
recipients? | string[] | The recipient domains and email addresses that the receipt rule applies to. |
scan | boolean | IResolvable | If true , then messages that this receipt rule applies to are scanned for spam and viruses. |
tls | string | Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). |
actions?
Type:
IResolvable
|
IResolvable
|
Action
[]
(optional)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
enabled?
Type:
boolean |
IResolvable
(optional)
If true
, the receipt rule is active.
The default value is false
.
name?
Type:
string
(optional)
The name of the receipt rule. The name must meet the following requirements:.
- Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), or periods (.).
- Start and end with a letter or number.
- Contain 64 characters or fewer.
recipients?
Type:
string[]
(optional)
The recipient domains and email addresses that the receipt rule applies to.
If this field is not specified, this rule matches all recipients on all verified domains.
scanEnabled?
Type:
boolean |
IResolvable
(optional)
If true
, then messages that this receipt rule applies to are scanned for spam and viruses.
The default value is false
.
tlsPolicy?
Type:
string
(optional)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).
If this parameter is set to Require
, Amazon SES bounces emails that are not received over TLS. The default is Optional
.
Valid Values: Require | Optional