# SuppressionReasons

Reasons for which recipient email addresses should be automatically added to your account's suppression list.

- Source: [`aws-ses/lib/configuration-set.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ses/lib/configuration-set.ts#L202)
- Type last changed: v2.32.0 · 14 Jul 2022

## Example

TypeScript:

```ts
// Only bounces will be suppressed.
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  suppressionReasons: ses.SuppressionReasons.BOUNCES_ONLY,
});

// Only complaints will be suppressed.
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  suppressionReasons: ses.SuppressionReasons.COMPLAINTS_ONLY,
});

// Both bounces and complaints will be suppressed.
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  suppressionReasons: ses.SuppressionReasons.BOUNCES_AND_COMPLAINTS,
});
```

Python:

```python
# Only bounces will be suppressed.
ses.ConfigurationSet(self, "ConfigurationSet",
    suppression_reasons=ses.SuppressionReasons.BOUNCES_ONLY
)

# Only complaints will be suppressed.
ses.ConfigurationSet(self, "ConfigurationSet",
    suppression_reasons=ses.SuppressionReasons.COMPLAINTS_ONLY
)

# Both bounces and complaints will be suppressed.
ses.ConfigurationSet(self, "ConfigurationSet",
    suppression_reasons=ses.SuppressionReasons.BOUNCES_AND_COMPLAINTS
)
```

Java:

```java
// Only bounces will be suppressed.
// Only bounces will be suppressed.
ConfigurationSet.Builder.create(this, "ConfigurationSet")
        .suppressionReasons(SuppressionReasons.BOUNCES_ONLY)
        .build();

// Only complaints will be suppressed.
// Only complaints will be suppressed.
ConfigurationSet.Builder.create(this, "ConfigurationSet")
        .suppressionReasons(SuppressionReasons.COMPLAINTS_ONLY)
        .build();

// Both bounces and complaints will be suppressed.
// Both bounces and complaints will be suppressed.
ConfigurationSet.Builder.create(this, "ConfigurationSet")
        .suppressionReasons(SuppressionReasons.BOUNCES_AND_COMPLAINTS)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// Only bounces will be suppressed.
// Only bounces will be suppressed.
new ConfigurationSet(this, "ConfigurationSet", new ConfigurationSetProps {
    SuppressionReasons = SuppressionReasons.BOUNCES_ONLY
});

// Only complaints will be suppressed.
// Only complaints will be suppressed.
new ConfigurationSet(this, "ConfigurationSet", new ConfigurationSetProps {
    SuppressionReasons = SuppressionReasons.COMPLAINTS_ONLY
});

// Both bounces and complaints will be suppressed.
// Both bounces and complaints will be suppressed.
new ConfigurationSet(this, "ConfigurationSet", new ConfigurationSetProps {
    SuppressionReasons = SuppressionReasons.BOUNCES_AND_COMPLAINTS
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// Only bounces will be suppressed.
// Only bounces will be suppressed.
ses.NewConfigurationSet(this, jsii.String("ConfigurationSet"), &ConfigurationSetProps{
	SuppressionReasons: ses.SuppressionReasons_BOUNCES_ONLY,
})

// Only complaints will be suppressed.
// Only complaints will be suppressed.
ses.NewConfigurationSet(this, jsii.String("ConfigurationSet"), &ConfigurationSetProps{
	SuppressionReasons: ses.SuppressionReasons_COMPLAINTS_ONLY,
})

// Both bounces and complaints will be suppressed.
// Both bounces and complaints will be suppressed.
ses.NewConfigurationSet(this, jsii.String("ConfigurationSet"), &ConfigurationSetProps{
	SuppressionReasons: ses.SuppressionReasons_BOUNCES_AND_COMPLAINTS,
})
```

## Members

| Member | Description |
| --- | --- |
| `BOUNCES_AND_COMPLAINTS` | Bounces and complaints. |
| `BOUNCES_ONLY` | Bounces only. |
| `COMPLAINTS_ONLY` | Complaints only. |

## Referenced by

- [`ConfigurationSetProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.ConfigurationSetProps.html).suppressionReasons
