interface RuleProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.SES.CfnMailManagerRuleSet.RuleProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsses#CfnMailManagerRuleSet_RuleProperty |
![]() | software.amazon.awscdk.services.ses.CfnMailManagerRuleSet.RuleProperty |
![]() | aws_cdk.aws_ses.CfnMailManagerRuleSet.RuleProperty |
![]() | aws-cdk-lib » aws_ses » CfnMailManagerRuleSet » RuleProperty |
A rule contains conditions, "unless conditions" and actions.
For each envelope recipient of an email, if all conditions match and none of the "unless conditions" match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only "unless conditions" are provided, the rule applies if the email does not match the evaluation of the "unless conditions".
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ses as ses } from 'aws-cdk-lib';
declare const drop: any;
const ruleProperty: ses.CfnMailManagerRuleSet.RuleProperty = {
actions: [{
addHeader: {
headerName: 'headerName',
headerValue: 'headerValue',
},
archive: {
targetArchive: 'targetArchive',
// the properties below are optional
actionFailurePolicy: 'actionFailurePolicy',
},
deliverToMailbox: {
mailboxArn: 'mailboxArn',
roleArn: 'roleArn',
// the properties below are optional
actionFailurePolicy: 'actionFailurePolicy',
},
deliverToQBusiness: {
applicationId: 'applicationId',
indexId: 'indexId',
roleArn: 'roleArn',
// the properties below are optional
actionFailurePolicy: 'actionFailurePolicy',
},
drop: drop,
relay: {
relay: 'relay',
// the properties below are optional
actionFailurePolicy: 'actionFailurePolicy',
mailFrom: 'mailFrom',
},
replaceRecipient: {
replaceWith: ['replaceWith'],
},
send: {
roleArn: 'roleArn',
// the properties below are optional
actionFailurePolicy: 'actionFailurePolicy',
},
writeToS3: {
roleArn: 'roleArn',
s3Bucket: 's3Bucket',
// the properties below are optional
actionFailurePolicy: 'actionFailurePolicy',
s3Prefix: 's3Prefix',
s3SseKmsKeyId: 's3SseKmsKeyId',
},
}],
// the properties below are optional
conditions: [{
booleanExpression: {
evaluate: {
attribute: 'attribute',
},
operator: 'operator',
},
dmarcExpression: {
operator: 'operator',
values: ['values'],
},
ipExpression: {
evaluate: {
attribute: 'attribute',
},
operator: 'operator',
values: ['values'],
},
numberExpression: {
evaluate: {
attribute: 'attribute',
},
operator: 'operator',
value: 123,
},
stringExpression: {
evaluate: {
attribute: 'attribute',
mimeHeaderAttribute: 'mimeHeaderAttribute',
},
operator: 'operator',
values: ['values'],
},
verdictExpression: {
evaluate: {
analysis: {
analyzer: 'analyzer',
resultField: 'resultField',
},
attribute: 'attribute',
},
operator: 'operator',
values: ['values'],
},
}],
name: 'name',
unless: [{
booleanExpression: {
evaluate: {
attribute: 'attribute',
},
operator: 'operator',
},
dmarcExpression: {
operator: 'operator',
values: ['values'],
},
ipExpression: {
evaluate: {
attribute: 'attribute',
},
operator: 'operator',
values: ['values'],
},
numberExpression: {
evaluate: {
attribute: 'attribute',
},
operator: 'operator',
value: 123,
},
stringExpression: {
evaluate: {
attribute: 'attribute',
mimeHeaderAttribute: 'mimeHeaderAttribute',
},
operator: 'operator',
values: ['values'],
},
verdictExpression: {
evaluate: {
analysis: {
analyzer: 'analyzer',
resultField: 'resultField',
},
attribute: 'attribute',
},
operator: 'operator',
values: ['values'],
},
}],
};
Properties
Name | Type | Description |
---|---|---|
actions | IResolvable | IResolvable | Rule [] | The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match. |
conditions? | IResolvable | IResolvable | Rule [] | The conditions of this rule. |
name? | string | The user-friendly name of the rule. |
unless? | IResolvable | IResolvable | Rule [] | The "unless conditions" of this rule. |
actions
Type:
IResolvable
|
IResolvable
|
Rule
[]
The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
conditions?
Type:
IResolvable
|
IResolvable
|
Rule
[]
(optional)
The conditions of this rule.
All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
name?
Type:
string
(optional)
The user-friendly name of the rule.
unless?
Type:
IResolvable
|
IResolvable
|
Rule
[]
(optional)
The "unless conditions" of this rule.
None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.