DropSpamReceiptRule
A rule added at the top of the rule set to drop spam/virus.
| Source | aws-ses/lib/receipt-rule.ts |
|---|---|
| Type last changed |
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';
import { aws_ses as interfaces_ses } from 'aws-cdk-lib/interfaces';
declare const receiptRuleAction: ses.IReceiptRuleAction;
declare const receiptRuleRef: interfaces_ses.IReceiptRuleRef;
declare const receiptRuleSetRef: interfaces_ses.IReceiptRuleSetRef;
const dropSpamReceiptRule = new ses.DropSpamReceiptRule(this, 'MyDropSpamReceiptRule', {
ruleSet: receiptRuleSetRef,
// the properties below are optional
actions: [receiptRuleAction],
after: receiptRuleRef,
enabled: false,
receiptRuleName: 'receiptRuleName',
recipients: ['recipients'],
scanEnabled: false,
tlsPolicy: ses.TlsPolicy.OPTIONAL,
});
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ses as ses
from aws_cdk.interfaces import aws_ses as interfaces_ses
# receipt_rule_action: ses.IReceiptRuleAction
# receipt_rule_ref: interfaces_ses.IReceiptRuleRef
# receipt_rule_set_ref: interfaces_ses.IReceiptRuleSetRef
drop_spam_receipt_rule = ses.DropSpamReceiptRule(self, "MyDropSpamReceiptRule",
rule_set=receipt_rule_set_ref,
# the properties below are optional
actions=[receipt_rule_action],
after=receipt_rule_ref,
enabled=False,
receipt_rule_name="receiptRuleName",
recipients=["recipients"],
scan_enabled=False,
tls_policy=ses.TlsPolicy.OPTIONAL
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ses.*;
import software.amazon.awscdk.interfaces.ses.*;
IReceiptRuleAction receiptRuleAction;
IReceiptRuleRef receiptRuleRef;
IReceiptRuleSetRef receiptRuleSetRef;
DropSpamReceiptRule dropSpamReceiptRule = DropSpamReceiptRule.Builder.create(this, "MyDropSpamReceiptRule")
.ruleSet(receiptRuleSetRef)
// the properties below are optional
.actions(List.of(receiptRuleAction))
.after(receiptRuleRef)
.enabled(false)
.receiptRuleName("receiptRuleName")
.recipients(List.of("recipients"))
.scanEnabled(false)
.tlsPolicy(TlsPolicy.OPTIONAL)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SES;
using Amazon.CDK.Interfaces.SES;
IReceiptRuleAction receiptRuleAction;
IReceiptRuleRef receiptRuleRef;
IReceiptRuleSetRef receiptRuleSetRef;
var dropSpamReceiptRule = new DropSpamReceiptRule(this, "MyDropSpamReceiptRule", new DropSpamReceiptRuleProps {
RuleSet = receiptRuleSetRef,
// the properties below are optional
Actions = new [] { receiptRuleAction },
After = receiptRuleRef,
Enabled = false,
ReceiptRuleName = "receiptRuleName",
Recipients = new [] { "recipients" },
ScanEnabled = false,
TlsPolicy = TlsPolicy.OPTIONAL
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var receiptRuleAction IReceiptRuleAction
var receiptRuleRef IReceiptRuleRef
var receiptRuleSetRef IReceiptRuleSetRef
dropSpamReceiptRule := awscdk.Aws_ses.NewDropSpamReceiptRule(this, jsii.String("MyDropSpamReceiptRule"), &DropSpamReceiptRuleProps{
RuleSet: receiptRuleSetRef,
// the properties below are optional
Actions: []IReceiptRuleAction{
receiptRuleAction,
},
After: receiptRuleRef,
Enabled: jsii.Boolean(false),
ReceiptRuleName: jsii.String("receiptRuleName"),
Recipients: []*string{
jsii.String("recipients"),
},
ScanEnabled: jsii.Boolean(false),
TlsPolicy: awscdk.*Aws_ses.TlsPolicy_OPTIONAL,
})
Initializer
new DropSpamReceiptRule(scope: Construct, id: string, props: DropSpamReceiptRuleProps)
DropSpamReceiptRule(scope: Construct, id: str, props: DropSpamReceiptRuleProps)
new DropSpamReceiptRule(Construct scope, String id, DropSpamReceiptRuleProps props)
new DropSpamReceiptRule(Construct scope, string id, DropSpamReceiptRuleProps props)
NewDropSpamReceiptRule(Scope Construct, Id *string, Props DropSpamReceiptRuleProps)
Construct Props
actionsoptionalIReceiptRuleAction[]actionsoptionaltyping.List[IReceiptRuleAction]actionsoptionalList<IReceiptRuleAction>ActionsoptionalIReceiptRuleAction[]Actionsoptional*[]IReceiptRuleAction #Default: No actions.
afteroptionalIReceiptRuleRefafteroptionalIReceiptRuleRefafteroptionalIReceiptRuleRefAfteroptionalIReceiptRuleRefAfteroptionalIReceiptRuleRef #Default: The new rule is inserted at the beginning of the rule list.
enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool = true #receiptRuleNameoptionalstringreceipt_rule_nameoptionalstrreceiptRuleNameoptionalStringReceiptRuleNameoptionalstringReceiptRuleNameoptional*string #Default: A CloudFormation generated name.
recipientsoptionalstring[]recipientsoptionaltyping.List[str]recipientsoptionalList<String>Recipientsoptionalstring[]Recipientsoptional*[]*string #Default: Match all recipients under all verified domains.
ruleSetIReceiptRuleSetRefrule_setIReceiptRuleSetRefruleSetIReceiptRuleSetRefRuleSetIReceiptRuleSetRefRuleSetIReceiptRuleSetRef required #scanEnabledoptionalbooleanscan_enabledoptionalboolscanEnabledoptionalBooleanScanEnabledoptionalboolScanEnabledoptional*bool = false #tlsPolicyoptionalTlsPolicytls_policyoptionalTlsPolicytlsPolicyoptionalTlsPolicyTlsPolicyoptionalTlsPolicyTlsPolicyoptionalTlsPolicy #Default: Optional which will not check for TLS.
Properties
PROPERTY_INJECTION_IDstringPROPERTY_INJECTION_IDstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*string static #Methods
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining