agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

13
cdk/node_modules/aws-cdk-lib/aws-ses/.jsiirc.json generated vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"targets": {
"java": {
"package": "software.amazon.awscdk.services.ses"
},
"dotnet": {
"namespace": "Amazon.CDK.AWS.SES"
},
"python": {
"module": "aws_cdk.aws_ses"
}
}
}

371
cdk/node_modules/aws-cdk-lib/aws-ses/README.md generated vendored Normal file
View File

@@ -0,0 +1,371 @@
# Amazon Simple Email Service Construct Library
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
## Email receiving
Create a receipt rule set with rules and actions (actions can be found in the
`aws-cdk-lib/aws-ses-actions` package):
```ts
import * as s3 from 'aws-cdk-lib/aws-s3';
import * as actions from 'aws-cdk-lib/aws-ses-actions';
const bucket = new s3.Bucket(this, 'Bucket');
const topic = new sns.Topic(this, 'Topic');
new ses.ReceiptRuleSet(this, 'RuleSet', {
rules: [
{
recipients: ['hello@aws.com'],
actions: [
new actions.AddHeader({
name: 'X-Special-Header',
value: 'aws',
}),
new actions.S3({
bucket,
objectKeyPrefix: 'emails/',
topic,
}),
],
},
{
recipients: ['aws.com'],
actions: [
new actions.Sns({
topic,
}),
],
},
],
});
```
Alternatively, rules can be added to a rule set:
```ts
const ruleSet = new ses.ReceiptRuleSet(this, 'RuleSet');
const awsRule = ruleSet.addRule('Aws', {
recipients: ['aws.com'],
});
```
And actions to rules:
```ts
import * as actions from 'aws-cdk-lib/aws-ses-actions';
declare const awsRule: ses.ReceiptRule;
declare const topic: sns.Topic;
awsRule.addAction(new actions.Sns({
topic,
}));
```
When using `addRule`, the new rule is added after the last added rule unless `after` is specified.
### Drop spams
A rule to drop spam can be added by setting `dropSpam` to `true`:
```ts
new ses.ReceiptRuleSet(this, 'RuleSet', {
dropSpam: true,
});
```
This will add a rule at the top of the rule set with a Lambda action that stops processing messages that have at least one spam indicator. See [Lambda Function Examples](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda-example-functions.html).
### Receipt filter
Create a receipt filter:
```ts
new ses.ReceiptFilter(this, 'Filter', {
ip: '1.2.3.4/16', // Will be blocked
});
```
An allow list filter is also available:
```ts
new ses.AllowListReceiptFilter(this, 'AllowList', {
ips: [
'10.0.0.0/16',
'1.2.3.4/16',
],
});
```
This will first create a block all filter and then create allow filters for the listed ip addresses.
### AWS Service Principal permissions
When adding an s3 action to a receipt rule, the CDK will automatically create a policy statement that allows the ses service principal to get write access to the bucket. This is done with the `SourceAccount` condition key, which is automatically added to the policy statement.
Previously, the policy used the `Referer` condition key, which caused confused deputy problems when the bucket policy allowed access to the bucket for all principals.
See more information in [this github issue](https://github.com/aws/aws-cdk/issues/29811)
## Email sending
### Dedicated IP pools
When you create a new Amazon SES account, your emails are sent from IP addresses that are shared with other
Amazon SES users. For [an additional monthly charge](https://aws.amazon.com/ses/pricing/), you can lease
dedicated IP addresses that are reserved for your exclusive use.
Use the DedicatedIpPool construct to create a pool of dedicated IP addresses. When specifying a name for your dedicated IP pool, ensure that it adheres to the following naming convention:
- The name must include only lowercase letters (a-z), numbers (0-9), underscores (_), and hyphens (-).
- The name must not exceed 64 characters in length.
```ts
new ses.DedicatedIpPool(this, 'Pool', {
dedicatedIpPoolName: 'mypool',
scalingMode: ses.ScalingMode.STANDARD,
});
```
The pool can then be used in a configuration set. If the provided dedicatedIpPoolName does not follow the specified naming convention, an error will be thrown.
### Configuration sets
Configuration sets are groups of rules that you can apply to your verified identities. A verified identity is
a domain, subdomain, or email address you use to send email through Amazon SES. When you apply a configuration
set to an email, all of the rules in that configuration set are applied to the email.
Use the `ConfigurationSet` construct to create a configuration set:
```ts
import { Duration } from 'aws-cdk-lib';
declare const myPool: ses.IDedicatedIpPool;
new ses.ConfigurationSet(this, 'ConfigurationSet', {
tlsPolicy: ses.ConfigurationSetTlsPolicy.REQUIRE,
dedicatedIpPool: myPool,
// 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.
maxDeliveryDuration: Duration.minutes(10),
});
```
Use `addEventDestination()` to publish email sending events to Amazon SNS, Amazon CloudWatch, Amazon Data Firehose or Amazon EventBridge:
```ts
declare const myConfigurationSet: ses.ConfigurationSet;
declare const myTopic: sns.Topic;
myConfigurationSet.addEventDestination('ToSns', {
destination: ses.EventDestination.snsTopic(myTopic),
})
```
**Note**: For EventBridge, you must specify the default EventBus:
```ts
import * as events from 'aws-cdk-lib/aws-events';
declare const myConfigurationSet: ses.ConfigurationSet;
const bus = events.EventBus.fromEventBusName(this, 'EventBus', 'default');
myConfigurationSet.addEventDestination('ToEventBus', {
destination: ses.EventDestination.eventBus(bus),
})
```
For Firehose, if you don't specify IAM Role ARN for Amazon SES to send events. An IAM Role will be created automatically following https://docs.aws.amazon.com/ses/latest/dg/event-publishing-add-event-destination-firehose.html.
```ts
import * as iam from 'aws-cdk-lib/aws-iam';
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
declare const myConfigurationSet: ses.ConfigurationSet;
declare const firehoseDeliveryStream: firehose.IDeliveryStream;
declare const iamRole: iam.IRole;
// Create IAM Role automatically
myConfigurationSet.addEventDestination('ToFirehose', {
destination: ses.EventDestination.firehoseDeliveryStream({
deliveryStream: firehoseDeliveryStream,
}),
})
// Specify your IAM Role
myConfigurationSet.addEventDestination('ToFirehose', {
destination: ses.EventDestination.firehoseDeliveryStream({
deliveryStream: firehoseDeliveryStream,
role: iamRole,
}),
})
```
#### Tracking options
You can specify to use a custom redirect domain to handle open and click tracking for email sent with this configuration set by using `customTrackingRedirectDomain` and `customTrackingHttpsPolicy`.
Detail can be found in [Custom tracking domain](https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html).
```ts
new ses.ConfigurationSet(this, 'ConfigurationSet', {
customTrackingRedirectDomain: 'track.cdk.dev',
customTrackingHttpsPolicy: ses.HttpsPolicy.REQUIRE,
});
```
**Note**: The custom tracking redirect domain must be verified in Amazon SES. To create verified identities, you can use the [`EmailIdentity` construct](#email-identity).
### Override account-level suppression list settings
You can customize account-level suppression list separately for different configuration sets by overriding it
with configuration set-level suppression.
For details, see [Using configuration set-level suppression to override your account-level suppression list](https://docs.aws.amazon.com/ses/latest/dg/sending-email-suppression-list-config-level.html).
By default, the configuration set uses your account-level suppression list settings.
You can disable account-level suppression list by specifying `disableSuppressionList` to true. Email sent with this configuration set will not use any suppression settings at all.
``` ts
new ses.ConfigurationSet(this, 'ConfigurationSet', {
disableSuppressionList: true,
});
```
You can also override account level settings with configuration set-level suppression enabled. Email sent with this configuration set will only use the suppression conditions you enabled for it (bounces, complaints, or bounces and complaints) - regardless of what your account-level suppression list settings are, it will override them.
``` 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,
});
```
### Email identity
In Amazon SES, a verified identity is a domain or email address that you use to send or receive email. Before you
can send an email using Amazon SES, you must create and verify each identity that you're going to use as a `From`,
`Source`, `Sender`, or `Return-Path` address. Verifying an identity with Amazon SES confirms that you own it and
helps prevent unauthorized use.
To verify an identity for a hosted zone, you create an `EmailIdentity`:
```ts
declare const myHostedZone: route53.IPublicHostedZone;
const identity = new ses.EmailIdentity(this, 'Identity', {
identity: ses.Identity.publicHostedZone(myHostedZone),
mailFromDomain: 'mail.cdk.dev',
});
```
By default, [Easy DKIM](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-easy.html) with
a 2048-bit DKIM key is used.
You can instead configure DKIM authentication by using your own public-private key pair. This process is known
as [Bring Your Own DKIM (BYODKIM)](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-bring-your-own.html):
```ts
declare const myHostedZone: route53.IPublicHostedZone;
new ses.EmailIdentity(this, 'Identity', {
identity: ses.Identity.publicHostedZone(myHostedZone),
dkimIdentity: ses.DkimIdentity.byoDkim({
privateKey: SecretValue.secretsManager('dkim-private-key'),
publicKey: '...base64-encoded-public-key...',
selector: 'selector',
}),
});
```
When using `publicHostedZone()` for the identity, all necessary Amazon Route 53 records are created automatically:
* CNAME records for Easy DKIM
* TXT record for BYOD DKIM
* MX and TXT records for the custom MAIL FROM
When working with `domain()`, records must be created manually:
```ts
const identity = new ses.EmailIdentity(this, 'Identity', {
identity: ses.Identity.domain('cdk.dev'),
});
for (const record of identity.dkimRecords) {
// create CNAME records using `record.name` and `record.value`
}
```
#### Grants
To grant a specific action to a principal use the `grant` method.
For sending emails, `grantSendEmail` can be used instead:
```ts
import * as iam from 'aws-cdk-lib/aws-iam';
declare const user: iam.User;
const identity = new ses.EmailIdentity(this, 'Identity', {
identity: ses.Identity.domain('cdk.dev'),
});
identity.grantSendEmail(user);
```
You can also reference an existing email identity using its ARN and grant permissions to it:
```ts
import * as iam from 'aws-cdk-lib/aws-iam';
declare const user: iam.User;
// Imports an existing email identity using its ARN.
// This is one way to reference an existing identity; another option is using its name via fromEmailIdentityName.
const importedIdentity = ses.EmailIdentity.fromEmailIdentityArn(this, 'ImportedIdentity',
'arn:aws:ses:us-east-1:123456789012:identity/example.com');
// Grant send email permission to the imported identity
importedIdentity.grantSendEmail(user);
```
### Virtual Deliverability Manager (VDM)
Virtual Deliverability Manager is an Amazon SES feature that helps you enhance email deliverability,
like increasing inbox deliverability and email conversions, by providing insights into your sending
and delivery data, and giving advice on how to fix the issues that are negatively affecting your
delivery success rate and reputation.
Use the `VdmAttributes` construct to configure the Virtual Deliverability Manager for your account:
```ts
// Enables engagement tracking and optimized shared delivery by default
new ses.VdmAttributes(this, 'Vdm');
```
If you want to override the VDM settings in the specified configuration set, use `vdmOptions` in the `ConfigurationSet` construct.
> **Note:** The configuration set level settings need to be used together with the account level settings. (To set the account level settings using CDK, use the `VdmAttributes` Construct.)
If you enable only the configuration set level settings, VDM will not be enabled until the account level settings are configured.
For more information, see [Virtual Deliverability Manager settings](https://docs.aws.amazon.com/ses/latest/dg/vdm-settings.html).
```ts
new ses.ConfigurationSet(this, 'ConfigurationSetWithVdmOptions', {
vdmOptions: {
engagementMetrics: true,
optimizedSharedDelivery: true,
},
});
```

15
cdk/node_modules/aws-cdk-lib/aws-ses/grants.json generated vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"resources": {
"EmailIdentity": {
"grants": {
"sendEmail": {
"actions": [
"ses:SendEmail",
"ses:SendRawEmail"
],
"docSummary": "Adds an IAM policy statement associated with this email identity to an IAM principal's policy."
}
}
}
}
}

1
cdk/node_modules/aws-cdk-lib/aws-ses/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from './lib';

1
cdk/node_modules/aws-cdk-lib/aws-ses/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,236 @@
import type { Construct } from 'constructs';
import type * as events from '../../aws-events';
import * as iam from '../../aws-iam';
import type * as firehose from '../../aws-kinesisfirehose';
import type * as sns from '../../aws-sns';
import type { IResource } from '../../core';
import { Resource } from '../../core';
import type { IConfigurationSetRef, IConfigurationSetEventDestinationRef, ConfigurationSetEventDestinationReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* A configuration set event destination
*/
export interface IConfigurationSetEventDestination extends IResource, IConfigurationSetEventDestinationRef {
/**
* The ID of the configuration set event destination
*
* @attribute
*/
readonly configurationSetEventDestinationId: string;
}
/**
* Options for a configuration set event destination
*/
export interface ConfigurationSetEventDestinationOptions {
/**
* A name for the configuration set event destination
*
* @default - a CloudFormation generated name
*/
readonly configurationSetEventDestinationName?: string;
/**
* Whether Amazon SES publishes events to this destination
*
* @default true
*/
readonly enabled?: boolean;
/**
* The event destination
*/
readonly destination: EventDestination;
/**
* The type of email sending events to publish to the event destination
*
* @default - send all event types
*/
readonly events?: EmailSendingEvent[];
}
/**
* An event destination
*/
export declare abstract class EventDestination {
/**
* Use a SNS topic as event destination
*/
static snsTopic(topic: sns.ITopic): EventDestination;
/**
* Use CloudWatch dimensions as event destination
*/
static cloudWatchDimensions(dimensions: CloudWatchDimension[]): EventDestination;
/**
* Use Event Bus as event destination
*/
static eventBus(eventBus: events.IEventBusRef): EventDestination;
/**
* Use Firehose Delivery Stream as event destination
*/
static firehoseDeliveryStream(stream: FirehoseDeliveryStreamDestination): EventDestination;
/**
* A SNS topic to use as event destination
*
* @default - do not send events to a SNS topic
*/
abstract readonly topic?: sns.ITopic;
/**
* A list of CloudWatch dimensions upon which to categorize your emails
*
* @default - do not send events to CloudWatch
*/
abstract readonly dimensions?: CloudWatchDimension[];
/**
* Use Event Bus as event destination
*
* @default - do not send events to Event bus
*/
abstract readonly bus?: events.IEventBusRef;
/**
* Use Firehose Delivery Stream
*
* @default - do not send events to Firehose Delivery Stream
*/
abstract readonly stream?: FirehoseDeliveryStreamDestination;
}
/**
* Properties for a configuration set event destination
*/
export interface ConfigurationSetEventDestinationProps extends ConfigurationSetEventDestinationOptions {
/**
* The configuration set that contains the event destination.
*/
readonly configurationSet: IConfigurationSetRef;
}
/**
* Email sending event
*/
export declare enum EmailSendingEvent {
/**
* The send request was successful and SES will attempt to deliver the message
* to the recipient's mail server. (If account-level or global suppression is
* being used, SES will still count it as a send, but delivery is suppressed.)
*/
SEND = "send",
/**
* SES accepted the email, but determined that it contained a virus and didnt
* attempt to deliver it to the recipients mail server.
*/
REJECT = "reject",
/**
* (Hard bounce) The recipient's mail server permanently rejected the email.
* (Soft bounces are only included when SES fails to deliver the email after
* retrying for a period of time.)
*/
BOUNCE = "bounce",
/**
* The email was successfully delivered to the recipients mail server, but the
* recipient marked it as spam.
*/
COMPLAINT = "complaint",
/**
* SES successfully delivered the email to the recipient's mail server.
*/
DELIVERY = "delivery",
/**
* The recipient received the message and opened it in their email client.
*/
OPEN = "open",
/**
* The recipient clicked one or more links in the email.
*/
CLICK = "click",
/**
* The email wasn't sent because of a template rendering issue. This event type
* can occur when template data is missing, or when there is a mismatch between
* template parameters and data. (This event type only occurs when you send email
* using the `SendTemplatedEmail` or `SendBulkTemplatedEmail` API operations.)
*/
RENDERING_FAILURE = "renderingFailure",
/**
* The email couldn't be delivered to the recipients mail server because a temporary
* issue occurred. Delivery delays can occur, for example, when the recipient's inbox
* is full, or when the receiving email server experiences a transient issue.
*/
DELIVERY_DELAY = "deliveryDelay",
/**
* The email was successfully delivered, but the recipient updated their subscription
* preferences by clicking on an unsubscribe link as part of your subscription management.
*/
SUBSCRIPTION = "subscription"
}
/**
* A CloudWatch dimension upon which to categorize your emails
*/
export interface CloudWatchDimension {
/**
* The place where Amazon SES finds the value of a dimension to publish to
* Amazon CloudWatch.
*/
readonly source: CloudWatchDimensionSource;
/**
* The name of an Amazon CloudWatch dimension associated with an email sending metric.
*/
readonly name: string;
/**
* The default value of the dimension that is published to Amazon CloudWatch
* if you do not provide the value of the dimension when you send an email.
*/
readonly defaultValue: string;
}
/**
* Source for CloudWatch dimension
*/
export declare enum CloudWatchDimensionSource {
/**
* Amazon SES retrieves the dimension name and value from a header in the email.
*
* Note: You can't use any of the following email headers as the Dimension Name:
* `Received`, `To`, `From`, `DKIM-Signature`, `CC`, `message-id`, or `Return-Path`.
*/
EMAIL_HEADER = "emailHeader",
/**
* Amazon SES retrieves the dimension name and value from a tag that you specified in a link.
*
* @see https://docs.aws.amazon.com/ses/latest/dg/faqs-metrics.html#sending-metric-faqs-clicks-q5
*/
LINK_TAG = "linkTag",
/**
* Amazon SES retrieves the dimension name and value from a tag that you specify by using the
* `X-SES-MESSAGE-TAGS` header or the Tags API parameter.
*
* You can also use the Message Tag value source to create dimensions based on Amazon SES auto-tags.
* To use an auto-tag, type the complete name of the auto-tag as the Dimension Name. For example,
* to create a dimension based on the configuration set auto-tag, use `ses:configuration-set` for the
* Dimension Name, and the name of the configuration set for the Default Value.
*
* @see https://docs.aws.amazon.com/ses/latest/dg/event-publishing-send-email.html
* @see https://docs.aws.amazon.com/ses/latest/dg/monitor-using-event-publishing.html#event-publishing-how-works
*/
MESSAGE_TAG = "messageTag"
}
/**
* An object that defines an Amazon Data Firehose destination for email events
*/
export interface FirehoseDeliveryStreamDestination {
/**
* The Amazon Data Firehose stream that the Amazon SES API v2 sends email events to.
*/
readonly deliveryStream: firehose.IDeliveryStream;
/**
* The IAM role that the Amazon SES API v2 uses to send email events to the Amazon Data Firehose stream.
*
* @default - Create IAM Role for Amazon Data Firehose Delivery stream
*/
readonly role?: iam.IRole;
}
/**
* A configuration set event destination
*/
export declare class ConfigurationSetEventDestination extends Resource implements IConfigurationSetEventDestination {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Use an existing configuration set
*/
static fromConfigurationSetEventDestinationId(scope: Construct, id: string, configurationSetEventDestinationId: string): IConfigurationSetEventDestination;
readonly configurationSetEventDestinationId: string;
get configurationSetEventDestinationRef(): ConfigurationSetEventDestinationReference;
constructor(scope: Construct, id: string, props: ConfigurationSetEventDestinationProps);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,182 @@
import type { Construct } from 'constructs';
import type { ConfigurationSetEventDestinationOptions } from './configuration-set-event-destination';
import { ConfigurationSetEventDestination } from './configuration-set-event-destination';
import type { IResource } from '../../core';
import { Duration, Resource } from '../../core';
import type { IDedicatedIpPoolRef, IConfigurationSetRef, ConfigurationSetReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* A configuration set
*/
export interface IConfigurationSet extends IResource, IConfigurationSetRef {
/**
* The name of the configuration set
*
* @attribute
*/
readonly configurationSetName: string;
}
/**
* Properties for a configuration set
*/
export interface ConfigurationSetProps {
/**
* A name for the configuration set
*
* @default - a CloudFormation generated name
*/
readonly configurationSetName?: string;
/**
* The dedicated IP pool to associate with the configuration set
*
* @default - do not use a dedicated IP pool
*/
readonly dedicatedIpPool?: IDedicatedIpPoolRef;
/**
* Specifies whether messages that use the configuration set are required to
* use Transport Layer Security (TLS)
*
* @default ConfigurationSetTlsPolicy.OPTIONAL
*/
readonly tlsPolicy?: ConfigurationSetTlsPolicy;
/**
* Whether to publish reputation metrics for the configuration set, such as
* bounce and complaint rates, to Amazon CloudWatch
*
* @default true
*/
readonly reputationMetrics?: boolean;
/**
* Whether email sending is enabled
*
* @default true
*/
readonly sendingEnabled?: boolean;
/**
* The reasons for which recipient email addresses should be automatically added
* to your account's suppression list
*
* @default - use account level settings
*/
readonly suppressionReasons?: SuppressionReasons;
/**
* If true, account-level suppression list is disabled; email sent with this configuration set
* will not use any suppression settings at all
*
* @default false
*/
readonly disableSuppressionList?: boolean;
/**
* The custom subdomain that is used to redirect email recipients to the
* Amazon SES event tracking domain
*
* @default - use the default awstrack.me domain
*/
readonly customTrackingRedirectDomain?: string;
/**
* The https policy to use for tracking open and click events.
*
* @default - HttpsPolicy.OPTIONAL if customTrackingRedirectDomain is set, otherwise undefined
*/
readonly customTrackingHttpsPolicy?: HttpsPolicy;
/**
* 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.)
*/
readonly vdmOptions?: VdmOptions;
/**
* 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
*/
readonly maxDeliveryDuration?: Duration;
}
/**
* Properties for the Virtual Deliverability Manager (VDM) options that apply to the configuration set
*/
export interface VdmOptions {
/**
* If true, engagement metrics are enabled for the configuration set
*
* @default - Engagement metrics not configured at the configuration set level. In this case, use account level settings.
*/
readonly engagementMetrics?: boolean;
/**
* If true, optimized shared delivery is enabled for the configuration set
*
* @default - Optimized shared delivery not configured at the configuration set level. In this case, use account level settings.
*/
readonly optimizedSharedDelivery?: boolean;
}
/**
* TLS policy for a configuration set
*/
export declare enum ConfigurationSetTlsPolicy {
/**
* Messages are only delivered if a TLS connection can be established
*/
REQUIRE = "REQUIRE",
/**
* Messages can be delivered in plain text if a TLS connection can't be established
*/
OPTIONAL = "OPTIONAL"
}
/**
* HTTPS policy option for the protocol of the open and click tracking links for your custom redirect domain.
*/
export declare enum HttpsPolicy {
/**
* Open and Click tracking links will both be wrapped using HTTPS.
*/
REQUIRE = "REQUIRE",
/**
* Open tracking links will be wrapped using HTTPS.
* Click tracking links will be wrapped using the original protocol of the link.
*/
REQUIRE_OPEN_ONLY = "REQUIRE_OPEN_ONLY",
/**
* Open tracking links will be wrapped using HTTP.
* Click tracking links will be wrapped using the original protocol of the link.
*/
OPTIONAL = "OPTIONAL"
}
/**
* Reasons for which recipient email addresses should be automatically added
* to your account's suppression list
*/
export declare enum SuppressionReasons {
/**
* Bounces and complaints
*/
BOUNCES_AND_COMPLAINTS = "BOUNCES_AND_COMPLAINTS",
/**
* Bounces only
*/
BOUNCES_ONLY = "BOUNCES_ONLY",
/**
* Complaints only
*/
COMPLAINTS_ONLY = "COMPLAINTS_ONLY"
}
/**
* A configuration set
*/
export declare class ConfigurationSet extends Resource implements IConfigurationSet {
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* Use an existing configuration set
*/
static fromConfigurationSetName(scope: Construct, id: string, configurationSetName: string): IConfigurationSet;
readonly configurationSetName: string;
get configurationSetRef(): ConfigurationSetReference;
constructor(scope: Construct, id: string, props?: ConfigurationSetProps);
/**
* Adds an event destination to this configuration set
*/
addEventDestination(id: string, options: ConfigurationSetEventDestinationOptions): ConfigurationSetEventDestination;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
import type { Construct } from 'constructs';
import type { IResource } from '../../core';
import { Resource } from '../../core';
import type { IDedicatedIpPoolRef, DedicatedIpPoolReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* Scaling mode to use for this IP pool.
*
* @see https://docs.aws.amazon.com/ses/latest/dg/dedicated-ip.html
*/
export declare enum ScalingMode {
/**
* The customer controls which IPs are part of the dedicated IP pool.
*/
STANDARD = "STANDARD",
/**
* The reputation and number of IPs are automatically managed by Amazon SES.
*/
MANAGED = "MANAGED"
}
/**
* A dedicated IP pool
*/
export interface IDedicatedIpPool extends IResource, IDedicatedIpPoolRef {
/**
* The name of the dedicated IP pool
*
* @attribute
*/
readonly dedicatedIpPoolName: string;
}
/**
* Properties for a dedicated IP pool
*/
export interface DedicatedIpPoolProps {
/**
* A name for the dedicated IP pool.
*
* The name must adhere to specific constraints: it can only include
* lowercase letters (a-z), numbers (0-9), underscores (_), and hyphens (-),
* and must not exceed 64 characters in length.
*
* @default - a CloudFormation generated name
*/
readonly dedicatedIpPoolName?: string;
/**
* The type of scailing mode to use for this IP pool
*
* Updating ScalingMode doesn't require a replacement if you're updating its value from `STANDARD` to `MANAGED`.
* However, updating ScalingMode from `MANAGED` to `STANDARD` is not supported.
*
* @default ScalingMode.STANDARD
*/
readonly scalingMode?: ScalingMode;
}
/**
* A dedicated IP pool
*/
export declare class DedicatedIpPool extends Resource implements IDedicatedIpPool {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Use an existing dedicated IP pool
*/
static fromDedicatedIpPoolName(scope: Construct, id: string, dedicatedIpPoolName: string): IDedicatedIpPool;
readonly dedicatedIpPoolName: string;
get dedicatedIpPoolRef(): DedicatedIpPoolReference;
constructor(scope: Construct, id: string, props?: DedicatedIpPoolProps);
}

View File

@@ -0,0 +1 @@
"use strict";var __esDecorate=exports&&exports.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),_,done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!="object")throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&(kind==="field"?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0},__runInitializers=exports&&exports.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DedicatedIpPool=exports.ScalingMode=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var ses_generated_1=()=>{var tmp=require("./ses.generated");return ses_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},metadata_resource_1=()=>{var tmp=require("../../core/lib/metadata-resource");return metadata_resource_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp},ScalingMode;(function(ScalingMode2){ScalingMode2.STANDARD="STANDARD",ScalingMode2.MANAGED="MANAGED"})(ScalingMode||(exports.ScalingMode=ScalingMode={}));let DedicatedIpPool=(()=>{let _classDecorators=[prop_injectable_1().propertyInjectable],_classDescriptor,_classExtraInitializers=[],_classThis,_classSuper=core_1().Resource;var DedicatedIpPool2=class extends _classSuper{static{_classThis=this}static{const _metadata=typeof Symbol=="function"&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;__esDecorate(null,_classDescriptor={value:_classThis},_classDecorators,{kind:"class",name:_classThis.name,metadata:_metadata},null,_classExtraInitializers),DedicatedIpPool2=_classThis=_classDescriptor.value,_metadata&&Object.defineProperty(_classThis,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ses.DedicatedIpPool",version:"2.252.0"};static PROPERTY_INJECTION_ID="aws-cdk-lib.aws-ses.DedicatedIpPool";static fromDedicatedIpPoolName(scope,id,dedicatedIpPoolName){class Import extends core_1().Resource{dedicatedIpPoolName=dedicatedIpPoolName;get dedicatedIpPoolRef(){return{poolName:this.dedicatedIpPoolName}}}return new Import(scope,id)}dedicatedIpPoolName;get dedicatedIpPoolRef(){return{poolName:this.dedicatedIpPoolName}}constructor(scope,id,props={}){super(scope,id,{physicalName:props.dedicatedIpPoolName});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ses_DedicatedIpPoolProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DedicatedIpPool2),error}if((0,metadata_resource_1().addConstructMetadata)(this,props),props.dedicatedIpPoolName&&!/^[a-z0-9_-]{0,64}$/.test(props.dedicatedIpPoolName))throw new(core_1()).ValidationError((0,literal_string_1().lit)`InvalidDedicatedIpPoolName`,`Invalid dedicatedIpPoolName "${props.dedicatedIpPoolName}". The name must only include lowercase letters, numbers, underscores, hyphens, and must not exceed 64 characters.`,this);const pool=new(ses_generated_1()).CfnDedicatedIpPool(this,"Resource",{poolName:this.physicalName,scalingMode:props.scalingMode});this.dedicatedIpPoolName=pool.ref}static{__runInitializers(_classThis,_classExtraInitializers)}};return DedicatedIpPool2=_classThis})();exports.DedicatedIpPool=DedicatedIpPool;

View File

@@ -0,0 +1,347 @@
import type { Construct } from 'constructs';
import type { IGrantable } from '../../aws-iam';
import { Grant } from '../../aws-iam';
import type { IPublicHostedZone } from '../../aws-route53';
import * as route53 from '../../aws-route53';
import type { IResource, SecretValue } from '../../core';
import { Resource } from '../../core';
import type { IConfigurationSetRef, IEmailIdentityRef, EmailIdentityReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* An email identity
*/
export interface IEmailIdentity extends IResource, IEmailIdentityRef {
/**
* The name of the email identity
*
* @attribute
*/
readonly emailIdentityName: string;
/**
* The ARN of the email identity
*
* @attribute
*/
readonly emailIdentityArn: string;
/**
* Adds an IAM policy statement associated with this email identity to an IAM principal's policy.
*
* @param grantee the principal (no-op if undefined)
* @param actions the set of actions to allow
*/
grant(grantee: IGrantable, ...actions: string[]): Grant;
/**
* Permits an IAM principal the send email action.
*
* Actions: SendEmail.
*
* @param grantee the principal to grant access to
*/
grantSendEmail(grantee: IGrantable): Grant;
}
/**
* Properties for an email identity
*/
export interface EmailIdentityProps {
/**
* The email address or domain to verify.
*/
readonly identity: Identity;
/**
* The configuration set to associate with the email identity
*
* @default - do not use a specific configuration set
*/
readonly configurationSet?: IConfigurationSetRef;
/**
* Whether the messages that are sent from the identity are signed using DKIM
*
* @default true
*/
readonly dkimSigning?: boolean;
/**
* The type of DKIM identity to use
*
* @default - Easy DKIM with a key length of 2048-bit
*/
readonly dkimIdentity?: DkimIdentity;
/**
* Whether to receive email notifications when bounce or complaint events occur.
* These notifications are sent to the address that you specified in the `Return-Path`
* header of the original email.
*
* You're required to have a method of tracking bounces and complaints. If you haven't set
* up another mechanism for receiving bounce or complaint notifications (for example, by
* setting up an event destination), you receive an email notification when these events
* occur (even if this setting is disabled).
*
* @default true
*/
readonly feedbackForwarding?: boolean;
/**
* The custom MAIL FROM domain that you want the verified identity to use. The MAIL FROM domain
* must meet the following criteria:
* - It has to be a subdomain of the verified identity
* - It can't be used to receive email
* - It can't be used in a "From" address if the MAIL FROM domain is a destination for feedback
* forwarding emails
*
* @default - use amazonses.com
*/
readonly mailFromDomain?: string;
/**
* The action to take if the required MX record for the MAIL FROM domain isn't
* found when you send an email
*
* @default MailFromBehaviorOnMxFailure.USE_DEFAULT_VALUE
*/
readonly mailFromBehaviorOnMxFailure?: MailFromBehaviorOnMxFailure;
}
/**
* Identity
*/
export declare abstract class Identity {
/**
* Verify an email address
*
* To complete the verification process look for an email from
* no-reply-aws@amazon.com, open it and click the link.
*/
static email(email: string): Identity;
/**
* Verify a domain name
*
* DKIM records will have to be added manually to complete the verification
* process
*/
static domain(domain: string): Identity;
/**
* Verify a public hosted zone
*
* DKIM and MAIL FROM records will be added automatically to the hosted
* zone
*/
static publicHostedZone(hostedZone: IPublicHostedZone): Identity;
/**
* The value of the identity
*/
abstract readonly value: string;
/**
* The hosted zone associated with this identity
*
* @default - no hosted zone is associated and no records are created
*/
abstract readonly hostedZone?: IPublicHostedZone;
}
/**
* The action to take if the required MX record for the MAIL FROM domain isn't
* found
*/
export declare enum MailFromBehaviorOnMxFailure {
/**
* The mail is sent using amazonses.com as the MAIL FROM domain
*/
USE_DEFAULT_VALUE = "USE_DEFAULT_VALUE",
/**
* The Amazon SES API v2 returns a `MailFromDomainNotVerified` error and doesn't
* attempt to deliver the email
*/
REJECT_MESSAGE = "REJECT_MESSAGE"
}
/**
* Configuration for DKIM identity
*/
export interface DkimIdentityConfig {
/**
* A private key that's used to generate a DKIM signature
*
* @default - use Easy DKIM
*/
readonly domainSigningPrivateKey?: string;
/**
* A string that's used to identify a public key in the DNS configuration for
* a domain
*
* @default - use Easy DKIM
*/
readonly domainSigningSelector?: string;
/**
* The key length of the future DKIM key pair to be generated. This can be changed
* at most once per day.
*
* @default EasyDkimSigningKeyLength.RSA_2048_BIT
*/
readonly nextSigningKeyLength?: EasyDkimSigningKeyLength;
}
/**
* The identity to use for DKIM
*/
export declare abstract class DkimIdentity {
/**
* Easy DKIM
*
* @param signingKeyLength The length of the signing key. This can be changed at
* most once per day.
*
* @see https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-easy.html
*/
static easyDkim(signingKeyLength?: EasyDkimSigningKeyLength): DkimIdentity;
/**
* Bring Your Own DKIM
*
* @param options Options for BYO DKIM
*
* @see https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-bring-your-own.html
*/
static byoDkim(options: ByoDkimOptions): DkimIdentity;
/**
* Binds this DKIM identity to the email identity
*/
abstract bind(emailIdentity: EmailIdentity, hostedZone?: route53.IPublicHostedZone): DkimIdentityConfig | undefined;
}
/**
* Options for BYO DKIM
*/
export interface ByoDkimOptions {
/**
* The private key that's used to generate a DKIM signature
*/
readonly privateKey: SecretValue;
/**
* A string that's used to identify a public key in the DNS configuration for
* a domain
*/
readonly selector: string;
/**
* The public key. If specified, a TXT record with the public key is created.
*
* @default - the validation TXT record with the public key is not created
*/
readonly publicKey?: string;
}
/**
* The signing key length for Easy DKIM
*/
export declare enum EasyDkimSigningKeyLength {
/**
* RSA 1024-bit
*/
RSA_1024_BIT = "RSA_1024_BIT",
/**
* RSA 2048-bit
*/
RSA_2048_BIT = "RSA_2048_BIT"
}
declare abstract class EmailIdentityBase extends Resource implements IEmailIdentity {
/**
* The name of the email identity
*
* @attribute
*/
abstract readonly emailIdentityName: string;
/**
* The ARN of the email identity
*
* @attribute
*/
abstract readonly emailIdentityArn: string;
get emailIdentityRef(): EmailIdentityReference;
/**
* Adds an IAM policy statement associated with this email identity to an IAM principal's policy.
*
* [disable-awslint:no-grants]
*
* @param grantee the principal (no-op if undefined)
* @param actions the set of actions to allow
*/
grant(grantee: IGrantable, ...actions: string[]): Grant;
/**
* Permits an IAM principal the send email action.
*
* Actions: SendEmail, SendRawEmail.
*
* [disable-awslint:no-grants]
*
* @param grantee the principal to grant access to
*/
grantSendEmail(grantee: IGrantable): Grant;
}
/**
* An email identity
*/
export declare class EmailIdentity extends EmailIdentityBase {
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
/**
* Use an existing email identity
*/
static fromEmailIdentityName(scope: Construct, id: string, emailIdentityName: string): IEmailIdentity;
/**
* Import an email identity by ARN
*/
static fromEmailIdentityArn(scope: Construct, id: string, emailIdentityArn: string): IEmailIdentity;
readonly emailIdentityName: string;
readonly emailIdentityArn: string;
/**
* The host name for the first token that you have to add to the
* DNS configurationfor your domain
*
* @attribute
*/
readonly dkimDnsTokenName1: string;
/**
* The host name for the second token that you have to add to the
* DNS configuration for your domain
*
* @attribute
*/
readonly dkimDnsTokenName2: string;
/**
* The host name for the third token that you have to add to the
* DNS configuration for your domain
*
* @attribute
*/
readonly dkimDnsTokenName3: string;
/**
* The record value for the first token that you have to add to the
* DNS configuration for your domain
*
* @attribute
*/
readonly dkimDnsTokenValue1: string;
/**
* The record value for the second token that you have to add to the
* DNS configuration for your domain
*
* @attribute
*/
readonly dkimDnsTokenValue2: string;
/**
* The record value for the third token that you have to add to the
* DNS configuration for your domain
*
* @attribute
*/
readonly dkimDnsTokenValue3: string;
/**
* DKIM records for this identity
*/
readonly dkimRecords: DkimRecord[];
constructor(scope: Construct, id: string, props: EmailIdentityProps);
}
/**
* A DKIM record
*/
export interface DkimRecord {
/**
* The name of the record
*/
readonly name: string;
/**
* The value of the record
*/
readonly value: string;
}
export {};

File diff suppressed because one or more lines are too long

10
cdk/node_modules/aws-cdk-lib/aws-ses/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
export * from './receipt-rule-set';
export * from './receipt-rule';
export * from './receipt-rule-action';
export * from './receipt-filter';
export * from './dedicated-ip-pool';
export * from './configuration-set';
export * from './email-identity';
export * from './vdm-attributes';
export * from './configuration-set-event-destination';
export * from './ses.generated';

1
cdk/node_modules/aws-cdk-lib/aws-ses/lib/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
export declare function undefinedIfNoKeys<A extends {
[key: string]: unknown;
}>(obj: A): A | undefined;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.undefinedIfNoKeys=undefinedIfNoKeys;function undefinedIfNoKeys(obj){return Object.values(obj).every(val=>val===void 0)?void 0:obj}

View File

@@ -0,0 +1,62 @@
import { Construct } from 'constructs';
import { Resource } from '../../core';
/**
* The policy for the receipt filter.
*/
export declare enum ReceiptFilterPolicy {
/**
* Allow the ip address or range.
*/
ALLOW = "Allow",
/**
* Block the ip address or range.
*/
BLOCK = "Block"
}
/**
* Construction properties for a ReceiptFilter.
*/
export interface ReceiptFilterProps {
/**
* The name for the receipt filter.
*
* @default a CloudFormation generated name
*/
readonly receiptFilterName?: string;
/**
* The ip address or range to filter.
*
* @default 0.0.0.0/0
*/
readonly ip?: string;
/**
* The policy for the filter.
*
* @default Block
*/
readonly policy?: ReceiptFilterPolicy;
}
/**
* A receipt filter. When instantiated without props, it creates a
* block all receipt filter.
*/
export declare class ReceiptFilter extends Resource {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
constructor(scope: Construct, id: string, props?: ReceiptFilterProps);
}
/**
* Construction properties for am AllowListReceiptFilter.
*/
export interface AllowListReceiptFilterProps {
/**
* A list of ip addresses or ranges to allow list.
*/
readonly ips: string[];
}
/**
* An allow list receipt filter.
*/
export declare class AllowListReceiptFilter extends Construct {
constructor(scope: Construct, id: string, props: AllowListReceiptFilterProps);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,228 @@
import type { IReceiptRuleRef } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* An abstract action for a receipt rule.
*/
export interface IReceiptRuleAction {
/**
* Returns the receipt rule action specification
*/
bind(receiptRule: IReceiptRuleRef): ReceiptRuleActionConfig;
}
/**
* AddHeaderAction configuration.
*/
export interface AddHeaderActionConfig {
/**
* The name of the header that you want to add to the incoming message
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-addheaderaction.html#cfn-ses-receiptrule-addheaderaction-headername
*/
readonly headerName: string;
/**
* The content that you want to include in the header.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-addheaderaction.html#cfn-ses-receiptrule-addheaderaction-headervalue
*/
readonly headerValue: string;
}
/**
* BoundAction configuration.
*/
export interface BounceActionConfig {
/**
* Human-readable text to include in the bounce message.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-message
*/
readonly message: string;
/**
* The email address of the sender of the bounced email.
* This is the address that the bounce message is sent from.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-sender
*/
readonly sender: string;
/**
* The SMTP reply code, as defined by RFC 5321
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-smtpreplycode
*/
readonly smtpReplyCode: string;
/**
* The SMTP enhanced status code, as defined by RFC 3463
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-statuscode
*
* @default - No status code.
*/
readonly statusCode?: string;
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic to
* notify when the bounce action is taken.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-topicarn
*
* @default - No notification is sent to SNS.
*/
readonly topicArn?: string;
}
/**
* LambdaAction configuration.
*/
export interface LambdaActionConfig {
/**
* The Amazon Resource Name (ARN) of the AWS Lambda function.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-functionarn
*/
readonly functionArn: string;
/**
* The invocation type of the AWS Lambda function
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-invocationtype
*
* @default 'Event'
*/
readonly invocationType?: string;
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic to
* notify when the Lambda action is executed.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-topicarn
*
* @default - No notification is sent to SNS.
*/
readonly topicArn?: string;
}
/**
* S3Action configuration.
*/
export interface S3ActionConfig {
/**
* The name of the Amazon S3 bucket that you want to send incoming mail to.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-bucketname
*/
readonly bucketName: string;
/**
* The customer master key that Amazon SES should use to encrypt your emails before saving
* them to the Amazon S3 bucket.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-kmskeyarn
*
* @default - Emails are not encrypted.
*/
readonly kmsKeyArn?: string;
/**
* The key prefix of the Amazon S3 bucket.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-objectkeyprefix
*
* @default - No prefix.
*/
readonly objectKeyPrefix?: string;
/**
* The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-topicarn
*
* @default - No notification is sent to SNS.
*/
readonly topicArn?: string;
}
/**
* SNSAction configuration.
*/
export interface SNSActionConfig {
/**
* The encoding to use for the email within the Amazon SNS notification.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html#cfn-ses-receiptrule-snsaction-encoding
*
* @default 'UTF-8'
*/
readonly encoding?: string;
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html#cfn-ses-receiptrule-snsaction-topicarn
*
* @default - No notification is sent to SNS.
*/
readonly topicArn?: string;
}
/**
* StopAction configuration.
*/
export interface StopActionConfig {
/**
* The scope of the StopAction. The only acceptable value is RuleSet.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html#cfn-ses-receiptrule-stopaction-scope
*/
readonly scope: string;
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html#cfn-ses-receiptrule-stopaction-topicarn
*
* @default - No notification is sent to SNS.
*/
readonly topicArn?: string;
}
/**
* WorkmailAction configuration.
*/
export interface WorkmailActionConfig {
/**
* The Amazon Resource Name (ARN) of the Amazon WorkMail organization.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-workmailaction.html#cfn-ses-receiptrule-workmailaction-organizationarn
*/
readonly organizationArn: string;
/**
* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called.
*
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-workmailaction.html#cfn-ses-receiptrule-workmailaction-topicarn
*
* @default - No notification is sent to SNS.
*/
readonly topicArn?: string;
}
/**
* Properties for a receipt rule action.
*/
export interface ReceiptRuleActionConfig {
/**
* Adds a header to the received email.
*/
readonly addHeaderAction?: AddHeaderActionConfig;
/**
* Rejects the received email by returning a bounce response to the sender and,
* optionally, publishes a notification to Amazon SNS.
*/
readonly bounceAction?: BounceActionConfig;
/**
* Calls an AWS Lambda function, and optionally, publishes a notification to
* Amazon SNS.
*/
readonly lambdaAction?: LambdaActionConfig;
/**
* Saves the received message to an Amazon S3 bucket and, optionally, publishes
* a notification to Amazon SNS.
*/
readonly s3Action?: S3ActionConfig;
/**
* Publishes the email content within a notification to Amazon SNS.
*/
readonly snsAction?: SNSActionConfig;
/**
* Terminates the evaluation of the receipt rule set and optionally publishes a
* notification to Amazon SNS.
*/
readonly stopAction?: StopActionConfig;
/**
* Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.
*/
readonly workmailAction?: WorkmailActionConfig;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

View File

@@ -0,0 +1,77 @@
import type { Construct } from 'constructs';
import type { ReceiptRuleOptions } from './receipt-rule';
import { ReceiptRule } from './receipt-rule';
import type { IResource } from '../../core';
import { Resource } from '../../core';
import type { IReceiptRuleSetRef, ReceiptRuleSetReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* A receipt rule set.
*/
export interface IReceiptRuleSet extends IResource, IReceiptRuleSetRef {
/**
* The receipt rule set name.
* @attribute
*/
readonly receiptRuleSetName: string;
/**
* Adds a new receipt rule in this rule set. The new rule is added after
* the last added rule unless `after` is specified.
*/
addRule(id: string, options?: ReceiptRuleOptions): ReceiptRule;
}
/**
* Construction properties for a ReceiptRuleSet.
*/
export interface ReceiptRuleSetProps {
/**
* The name for the receipt rule set.
*
* @default - A CloudFormation generated name.
*/
readonly receiptRuleSetName?: string;
/**
* The list of rules to add to this rule set. Rules are added in the same
* order as they appear in the list.
*
* @default - No rules are added to the rule set.
*/
readonly rules?: ReceiptRuleOptions[];
/**
* Whether to add a first rule to stop processing messages
* that have at least one spam indicator.
*
* @default false
*/
readonly dropSpam?: boolean;
}
/**
* A new or imported receipt rule set.
*/
declare abstract class ReceiptRuleSetBase extends Resource implements IReceiptRuleSet {
abstract readonly receiptRuleSetName: string;
private lastAddedRule?;
get receiptRuleSetRef(): ReceiptRuleSetReference;
/**
* Adds a new receipt rule in this rule set. The new rule is added after
* the last added rule unless `after` is specified.
*/
addRule(id: string, options?: ReceiptRuleOptions): ReceiptRule;
/**
* Adds a drop spam rule
*/
protected addDropSpamRule(): void;
}
/**
* A new receipt rule set.
*/
export declare class ReceiptRuleSet extends ReceiptRuleSetBase {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Import an exported receipt rule set.
*/
static fromReceiptRuleSetName(scope: Construct, id: string, receiptRuleSetName: string): IReceiptRuleSet;
readonly receiptRuleSetName: string;
constructor(scope: Construct, id: string, props?: ReceiptRuleSetProps);
}
export {};

View File

@@ -0,0 +1 @@
"use strict";var __esDecorate=exports&&exports.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),_,done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!="object")throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&(kind==="field"?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0},__runInitializers=exports&&exports.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReceiptRuleSet=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var receipt_rule_1=()=>{var tmp=require("./receipt-rule");return receipt_rule_1=()=>tmp,tmp},ses_generated_1=()=>{var tmp=require("./ses.generated");return ses_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},metadata_resource_1=()=>{var tmp=require("../../core/lib/metadata-resource");return metadata_resource_1=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp};class ReceiptRuleSetBase extends core_1().Resource{lastAddedRule;get receiptRuleSetRef(){return{ruleSetName:this.receiptRuleSetName}}addRule(id,options){return this.lastAddedRule=new(receipt_rule_1()).ReceiptRule(this,id,{after:this.lastAddedRule??void 0,ruleSet:this,...options}),this.lastAddedRule}addDropSpamRule(){const dropSpam=new(receipt_rule_1()).DropSpamReceiptRule(this,"DropSpam",{ruleSet:this});this.lastAddedRule=dropSpam.rule}}let ReceiptRuleSet=(()=>{let _classDecorators=[prop_injectable_1().propertyInjectable],_classDescriptor,_classExtraInitializers=[],_classThis,_classSuper=ReceiptRuleSetBase;var ReceiptRuleSet2=class extends _classSuper{static{_classThis=this}static{const _metadata=typeof Symbol=="function"&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;__esDecorate(null,_classDescriptor={value:_classThis},_classDecorators,{kind:"class",name:_classThis.name,metadata:_metadata},null,_classExtraInitializers),ReceiptRuleSet2=_classThis=_classDescriptor.value,_metadata&&Object.defineProperty(_classThis,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ses.ReceiptRuleSet",version:"2.252.0"};static PROPERTY_INJECTION_ID="aws-cdk-lib.aws-ses.ReceiptRuleSet";static fromReceiptRuleSetName(scope,id,receiptRuleSetName){class Import extends ReceiptRuleSetBase{receiptRuleSetName=receiptRuleSetName}return new Import(scope,id)}receiptRuleSetName;constructor(scope,id,props={}){super(scope,id,{physicalName:props.receiptRuleSetName});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ses_ReceiptRuleSetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ReceiptRuleSet2),error}(0,metadata_resource_1().addConstructMetadata)(this,props);const resource=new(ses_generated_1()).CfnReceiptRuleSet(this,"Resource",{ruleSetName:this.physicalName});this.receiptRuleSetName=resource.ref,props&&(props.dropSpam&&this.addDropSpamRule(),(props.rules||[]).forEach((ruleOption,idx)=>this.addRule(`Rule${idx}`,ruleOption)))}static{__runInitializers(_classThis,_classExtraInitializers)}};return ReceiptRuleSet2=_classThis})();exports.ReceiptRuleSet=ReceiptRuleSet;

View File

@@ -0,0 +1,121 @@
import { Construct } from 'constructs';
import type { IReceiptRuleAction } from './receipt-rule-action';
import type { IResource } from '../../core';
import { Resource } from '../../core';
import type { IReceiptRuleSetRef, IReceiptRuleRef, ReceiptRuleReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* A receipt rule.
*/
export interface IReceiptRule extends IResource, IReceiptRuleRef {
/**
* The name of the receipt rule.
* @attribute
*/
readonly receiptRuleName: string;
}
/**
* The type of TLS policy for a receipt rule.
*/
export declare enum TlsPolicy {
/**
* Do not check for TLS.
*/
OPTIONAL = "Optional",
/**
* Bounce emails that are not received over TLS.
*/
REQUIRE = "Require"
}
/**
* Options to add a receipt rule to a receipt rule set.
*/
export interface ReceiptRuleOptions {
/**
* 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.
*/
readonly actions?: IReceiptRuleAction[];
/**
* An existing rule after which the new rule will be placed.
*
* @default - The new rule is inserted at the beginning of the rule list.
*/
readonly after?: IReceiptRuleRef;
/**
* Whether the rule is active.
*
* @default true
*/
readonly enabled?: boolean;
/**
* The name for the rule
*
* @default - A CloudFormation generated name.
*/
readonly receiptRuleName?: string;
/**
* The recipient domains and email addresses that the receipt rule applies to.
*
* @default - Match all recipients under all verified domains.
*/
readonly recipients?: string[];
/**
* Whether to scan for spam and viruses.
*
* @default false
*/
readonly scanEnabled?: boolean;
/**
* 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.
*/
readonly tlsPolicy?: TlsPolicy;
}
/**
* Construction properties for a ReceiptRule.
*/
export interface ReceiptRuleProps extends ReceiptRuleOptions {
/**
* The name of the rule set that the receipt rule will be added to.
*/
readonly ruleSet: IReceiptRuleSetRef;
}
/**
* A new receipt rule.
*/
export declare class ReceiptRule extends Resource implements IReceiptRule {
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
static fromReceiptRuleName(scope: Construct, id: string, receiptRuleName: string): IReceiptRule;
readonly receiptRuleName: string;
private readonly actions;
get receiptRuleRef(): ReceiptRuleReference;
constructor(scope: Construct, id: string, props: ReceiptRuleProps);
/**
* Adds an action to this receipt rule.
*/
addAction(action: IReceiptRuleAction): void;
private renderActions;
}
export interface DropSpamReceiptRuleProps extends ReceiptRuleProps {
}
/**
* A rule added at the top of the rule set to drop spam/virus.
*
* @see https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda-example-functions.html
*/
export declare class DropSpamReceiptRule extends Construct {
/**
* Uniquely identifies this class.
*/
static readonly PROPERTY_INJECTION_ID: string;
readonly rule: ReceiptRule;
constructor(scope: Construct, id: string, props: DropSpamReceiptRuleProps);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
export interface MetricWithDims<D> {
readonly namespace: string;
readonly metricName: string;
readonly statistic: string;
readonly dimensionsMap: D;
}
export declare class SESMetrics {
static bounceSum(this: void, dimensions: {}): MetricWithDims<{}>;
static bounceSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static clickSum(this: void, dimensions: {}): MetricWithDims<{}>;
static clickSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static complaintSum(this: void, dimensions: {}): MetricWithDims<{}>;
static complaintSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static deliverySum(this: void, dimensions: {}): MetricWithDims<{}>;
static deliverySum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static openSum(this: void, dimensions: {}): MetricWithDims<{}>;
static openSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static rejectSum(this: void, dimensions: {}): MetricWithDims<{}>;
static rejectSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static renderingFailureSum(this: void, dimensions: {}): MetricWithDims<{}>;
static renderingFailureSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static reputationBounceRateAverage(this: void, dimensions: {}): MetricWithDims<{}>;
static reputationComplaintRateAverage(this: void, dimensions: {}): MetricWithDims<{}>;
static sendSum(this: void, dimensions: {}): MetricWithDims<{}>;
static sendSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static reputationBounceRateSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
static reputationComplaintRateSum(this: void, dimensions: {
"ses:configuration-set": string;
}): MetricWithDims<{
"ses:configuration-set": string;
}>;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SESMetrics=void 0;class SESMetrics{static bounceSum(dimensions){return{namespace:"AWS/SES",metricName:"Bounce",dimensionsMap:dimensions,statistic:"Sum"}}static clickSum(dimensions){return{namespace:"AWS/SES",metricName:"Click",dimensionsMap:dimensions,statistic:"Sum"}}static complaintSum(dimensions){return{namespace:"AWS/SES",metricName:"Complaint",dimensionsMap:dimensions,statistic:"Sum"}}static deliverySum(dimensions){return{namespace:"AWS/SES",metricName:"Delivery",dimensionsMap:dimensions,statistic:"Sum"}}static openSum(dimensions){return{namespace:"AWS/SES",metricName:"Open",dimensionsMap:dimensions,statistic:"Sum"}}static rejectSum(dimensions){return{namespace:"AWS/SES",metricName:"Reject",dimensionsMap:dimensions,statistic:"Sum"}}static renderingFailureSum(dimensions){return{namespace:"AWS/SES",metricName:"RenderingFailure",dimensionsMap:dimensions,statistic:"Sum"}}static reputationBounceRateAverage(dimensions){return{namespace:"AWS/SES",metricName:"Reputation.BounceRate",dimensionsMap:dimensions,statistic:"Average"}}static reputationComplaintRateAverage(dimensions){return{namespace:"AWS/SES",metricName:"Reputation.ComplaintRate",dimensionsMap:dimensions,statistic:"Average"}}static sendSum(dimensions){return{namespace:"AWS/SES",metricName:"Send",dimensionsMap:dimensions,statistic:"Sum"}}static reputationBounceRateSum(dimensions){return{namespace:"AWS/SES",metricName:"Reputation.BounceRate",dimensionsMap:dimensions,statistic:"Sum"}}static reputationComplaintRateSum(dimensions){return{namespace:"AWS/SES",metricName:"Reputation.ComplaintRate",dimensionsMap:dimensions,statistic:"Sum"}}}exports.SESMetrics=SESMetrics;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,52 @@
import type { Construct } from 'constructs';
import type { IResource } from '../../core';
import { Resource } from '../../core';
import type { IVdmAttributesRef, VdmAttributesReference } from '../../interfaces/generated/aws-ses-interfaces.generated';
/**
* Virtual Deliverability Manager (VDM) attributes
*/
export interface IVdmAttributes extends IResource, IVdmAttributesRef {
/**
* The name of the resource behind the Virtual Deliverability Manager attributes.
*
* @attribute
*/
readonly vdmAttributesName: string;
}
/**
* Properties for the Virtual Deliverability Manager (VDM) attributes
*/
export interface VdmAttributesProps {
/**
* Whether engagement metrics are enabled for your account
*
* @default true
*/
readonly engagementMetrics?: boolean;
/**
* Whether optimized shared delivery is enabled for your account
*
* @default true
*/
readonly optimizedSharedDelivery?: boolean;
}
/**
* Virtual Deliverability Manager (VDM) attributes
*/
export declare class VdmAttributes extends Resource implements IVdmAttributes {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Use an existing Virtual Deliverability Manager attributes resource
*/
static fromVdmAttributesName(scope: Construct, id: string, vdmAttributesName: string): IVdmAttributes;
readonly vdmAttributesName: string;
/**
* Resource ID for the Virtual Deliverability Manager attributes
*
* @attribute
*/
readonly vdmAttributesResourceId: string;
get vdmAttributesRef(): VdmAttributesReference;
constructor(scope: Construct, id: string, props?: VdmAttributesProps);
}

View File

@@ -0,0 +1 @@
"use strict";var __esDecorate=exports&&exports.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),_,done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!="object")throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&(kind==="field"?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0},__runInitializers=exports&&exports.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VdmAttributes=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var ses_generated_1=()=>{var tmp=require("./ses.generated");return ses_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},metadata_resource_1=()=>{var tmp=require("../../core/lib/metadata-resource");return metadata_resource_1=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp};let VdmAttributes=(()=>{let _classDecorators=[prop_injectable_1().propertyInjectable],_classDescriptor,_classExtraInitializers=[],_classThis,_classSuper=core_1().Resource;var VdmAttributes2=class extends _classSuper{static{_classThis=this}static{const _metadata=typeof Symbol=="function"&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;__esDecorate(null,_classDescriptor={value:_classThis},_classDecorators,{kind:"class",name:_classThis.name,metadata:_metadata},null,_classExtraInitializers),VdmAttributes2=_classThis=_classDescriptor.value,_metadata&&Object.defineProperty(_classThis,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ses.VdmAttributes",version:"2.252.0"};static PROPERTY_INJECTION_ID="aws-cdk-lib.aws-ses.VdmAttributes";static fromVdmAttributesName(scope,id,vdmAttributesName){class Import extends core_1().Resource{vdmAttributesName=vdmAttributesName;get vdmAttributesRef(){return{vdmAttributesResourceId:this.vdmAttributesName}}}return new Import(scope,id)}vdmAttributesName;vdmAttributesResourceId;get vdmAttributesRef(){return{vdmAttributesResourceId:this.vdmAttributesResourceId}}constructor(scope,id,props={}){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ses_VdmAttributesProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,VdmAttributes2),error}(0,metadata_resource_1().addConstructMetadata)(this,props);const resource=new(ses_generated_1()).CfnVdmAttributes(this,"Resource",{dashboardAttributes:{engagementMetrics:booleanToEnabledDisabled(props.engagementMetrics??!0)},guardianAttributes:{optimizedSharedDelivery:booleanToEnabledDisabled(props.optimizedSharedDelivery??!0)}});this.vdmAttributesName=resource.ref,this.vdmAttributesResourceId=resource.attrVdmAttributesResourceId}static{__runInitializers(_classThis,_classExtraInitializers)}};return VdmAttributes2=_classThis})();exports.VdmAttributes=VdmAttributes;function booleanToEnabledDisabled(value){return value===!0?"ENABLED":"DISABLED"}