# DropSpamReceiptRuleProps

Extends: [ReceiptRuleProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.ReceiptRuleProps.html)
Used as props by: [DropSpamReceiptRule](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.DropSpamReceiptRule.html)

- Source: [`aws-ses/lib/receipt-rule.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ses/lib/receipt-rule.ts#L225)

## Example

TypeScript:

```ts
// 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 dropSpamReceiptRuleProps: ses.DropSpamReceiptRuleProps = {
  ruleSet: receiptRuleSetRef,

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

Python:

```python
# 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_props = ses.DropSpamReceiptRuleProps(
    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
)
```

Java:

```java
// 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;

DropSpamReceiptRuleProps dropSpamReceiptRuleProps = DropSpamReceiptRuleProps.builder()
        .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();
```

C# / .NET:

```csharp
// 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 dropSpamReceiptRuleProps = 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
};
```

Golang:

```go
// 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

dropSpamReceiptRuleProps := &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,
}
```

## Properties

- `actions`: [IReceiptRuleAction](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.IReceiptRuleAction.html)[] — 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.

  **Default:** No actions.

- `after`: [IReceiptRuleRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ses.IReceiptRuleRef.html) — An existing rule after which the new rule will be placed.

  **Default:** The new rule is inserted at the beginning of the rule list.

- `enabled`: boolean = true — Whether the rule is active.

- `receiptRuleName`: string — The name for the rule.

  **Default:** A CloudFormation generated name.

- `recipients`: string[] — The recipient domains and email addresses that the receipt rule applies to.

  **Default:** Match all recipients under all verified domains.

- `ruleSet`: [IReceiptRuleSetRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ses.IReceiptRuleSetRef.html) (required) — The name of the rule set that the receipt rule will be added to.

- `scanEnabled`: boolean = false — Whether to scan for spam and viruses.

- `tlsPolicy`: [TlsPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.TlsPolicy.html) — Whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).

  **Default:** Optional which will not check for TLS.
