aws-cdk-lib.aws_ses.DropSpamReceiptRule

class DropSpamReceiptRule (construct)

LanguageType name
.NETAmazon.CDK.AWS.SES.DropSpamReceiptRule
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsses#DropSpamReceiptRule
Javasoftware.amazon.awscdk.services.ses.DropSpamReceiptRule
Pythonaws_cdk.aws_ses.DropSpamReceiptRule
TypeScript (source)aws-cdk-lib » aws_ses » DropSpamReceiptRule

Implements IConstruct, IDependable

A rule added at the top of the rule set to drop spam/virus.

See also: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda-example-functions.html

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 receiptRule: ses.ReceiptRule;
declare const receiptRuleAction: ses.IReceiptRuleAction;
declare const receiptRuleSet: ses.ReceiptRuleSet;
const dropSpamReceiptRule = new ses.DropSpamReceiptRule(this, 'MyDropSpamReceiptRule', {
  ruleSet: receiptRuleSet,

  // the properties below are optional
  actions: [receiptRuleAction],
  after: receiptRule,
  enabled: false,
  receiptRuleName: 'receiptRuleName',
  recipients: ['recipients'],
  scanEnabled: false,
  tlsPolicy: ses.TlsPolicy.OPTIONAL,
});

Initializer

new DropSpamReceiptRule(scope: Construct, id: string, props: DropSpamReceiptRuleProps)

Parameters

  • scope Construct
  • id string
  • props DropSpamReceiptRuleProps

Construct Props

NameTypeDescription
ruleSetIReceiptRuleSetThe name of the rule set that the receipt rule will be added to.
actions?IReceiptRuleAction[]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.
after?IReceiptRuleAn existing rule after which the new rule will be placed.
enabled?booleanWhether the rule is active.
receiptRuleName?stringThe name for the rule.
recipients?string[]The recipient domains and email addresses that the receipt rule applies to.
scanEnabled?booleanWhether to scan for spam and viruses.
tlsPolicy?TlsPolicyWhether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).

ruleSet

Type: IReceiptRuleSet

The name of the rule set that the receipt rule will be added to.


actions?

Type: IReceiptRuleAction[] (optional, default: No actions.)

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.


after?

Type: IReceiptRule (optional, default: The new rule is inserted at the beginning of the rule list.)

An existing rule after which the new rule will be placed.


enabled?

Type: boolean (optional, default: true)

Whether the rule is active.


receiptRuleName?

Type: string (optional, default: A CloudFormation generated name.)

The name for the rule.


recipients?

Type: string[] (optional, default: Match all recipients under all verified domains.)

The recipient domains and email addresses that the receipt rule applies to.


scanEnabled?

Type: boolean (optional, default: false)

Whether to scan for spam and viruses.


tlsPolicy?

Type: TlsPolicy (optional, default: Optional which will not check for TLS.)

Whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).

Properties

NameTypeDescription
nodeNodeThe tree node.
ruleReceiptRule

node

Type: Node

The tree node.


rule

Type: ReceiptRule

Methods

NameDescription
toString()Returns a string representation of this construct.

toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.