ConfigurationSet

class aws_cdk.aws_ses.ConfigurationSet(scope, id, *, configuration_set_name=None, custom_tracking_redirect_domain=None, dedicated_ip_pool=None, max_delivery_duration=None, reputation_metrics=None, sending_enabled=None, suppression_reasons=None, tls_policy=None, vdm_options=None)

Bases: Resource

A configuration set.

ExampleMetadata:

infused

Example:

from aws_cdk import Duration

# my_pool: ses.IDedicatedIpPool


ses.ConfigurationSet(self, "ConfigurationSet",
    custom_tracking_redirect_domain="track.cdk.dev",
    suppression_reasons=ses.SuppressionReasons.COMPLAINTS_ONLY,
    tls_policy=ses.ConfigurationSetTlsPolicy.REQUIRE,
    dedicated_ip_pool=my_pool,
    # Specify maximum delivery time
    # This configuration can be useful in such cases as time-sensitive emails (like those containing a one-time-password),
    # transactional emails, and email that you want to ensure isn't delivered during non-business hours.
    max_delivery_duration=Duration.minutes(10)
)
Parameters:
  • scope (Construct) –

  • id (str) –

  • configuration_set_name (Optional[str]) – A name for the configuration set. Default: - a CloudFormation generated name

  • custom_tracking_redirect_domain (Optional[str]) – The custom subdomain that is used to redirect email recipients to the Amazon SES event tracking domain. Default: - use the default awstrack.me domain

  • dedicated_ip_pool (Optional[IDedicatedIpPool]) – The dedicated IP pool to associate with the configuration set. Default: - do not use a dedicated IP pool

  • max_delivery_duration (Optional[Duration]) – The maximum amount of time that Amazon SES API v2 will attempt delivery of email. This value must be greater than or equal to 5 minutes and less than or equal to 14 hours. Default: undefined - SES defaults to 14 hours

  • reputation_metrics (Optional[bool]) – Whether to publish reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. Default: true

  • sending_enabled (Optional[bool]) – Whether email sending is enabled. Default: true

  • suppression_reasons (Optional[SuppressionReasons]) – The reasons for which recipient email addresses should be automatically added to your account’s suppression list. Default: - use account level settings

  • tls_policy (Optional[ConfigurationSetTlsPolicy]) – Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). Default: ConfigurationSetTlsPolicy.OPTIONAL

  • vdm_options (Union[VdmOptions, Dict[str, Any], None]) – The Virtual Deliverability Manager (VDM) options that apply to the configuration set. Default: - VDM options not configured at the configuration set level. In this case, use account level settings. (To set the account level settings using CDK, use the VdmAttributes Construct.)

Methods

add_event_destination(id, *, destination, configuration_set_event_destination_name=None, enabled=None, events=None)

Adds an event destination to this configuration set.

Parameters:
  • id (str) –

  • destination (EventDestination) – The event destination.

  • configuration_set_event_destination_name (Optional[str]) – A name for the configuration set event destination. Default: - a CloudFormation generated name

  • enabled (Optional[bool]) – Whether Amazon SES publishes events to this destination. Default: true

  • events (Optional[Sequence[EmailSendingEvent]]) – The type of email sending events to publish to the event destination. Default: - send all event types

Return type:

ConfigurationSetEventDestination

apply_removal_policy(policy)

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:

policy (RemovalPolicy) –

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

configuration_set_name

The name of the configuration set.

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

node

The tree node.

stack

The stack in which this resource is defined.

Static Methods

classmethod from_configuration_set_name(scope, id, configuration_set_name)

Use an existing configuration set.

Parameters:
  • scope (Construct) –

  • id (str) –

  • configuration_set_name (str) –

Return type:

IConfigurationSet

classmethod is_construct(x)

Checks if x is a construct.

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:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

classmethod is_owned_resource(construct)

Returns true if the construct was created by CDK, and false otherwise.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters:

construct (IConstruct) –

Return type:

bool