MailManagerArchive
The MailManagerArchive resource lets you manage AWS SES MailManagerArchives for storing and retaining email data securely.
Minimal Example
Section titled “Minimal Example”Create a basic MailManagerArchive with essential properties.
import AWS from "alchemy/aws/control";
const mailManagerArchive = await AWS.SES.MailManagerArchive("basicArchive", { ArchiveName: "MyEmailArchive", KmsKeyArn: "arn:aws:kms:us-west-2:123456789012:key/my-key-id", Retention: { Days: 30 }});
Advanced Configuration
Section titled “Advanced Configuration”Configure a MailManagerArchive with additional tags and a longer retention period.
const advancedArchive = await AWS.SES.MailManagerArchive("advancedArchive", { ArchiveName: "AdvancedEmailArchive", KmsKeyArn: "arn:aws:kms:us-west-2:123456789012:key/my-key-id", Retention: { Days: 365 }, Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "EmailRetention" } ]});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”Adopt an existing MailManagerArchive if it already exists instead of failing.
const existingArchive = await AWS.SES.MailManagerArchive("existingArchive", { ArchiveName: "AdoptedEmailArchive", KmsKeyArn: "arn:aws:kms:us-west-2:123456789012:key/my-key-id", adopt: true});
Custom Retention Policy
Section titled “Custom Retention Policy”Create a MailManagerArchive with a custom retention policy.
const customRetentionArchive = await AWS.SES.MailManagerArchive("customRetentionArchive", { ArchiveName: "CustomRetentionEmailArchive", KmsKeyArn: "arn:aws:kms:us-west-2:123456789012:key/my-key-id", Retention: { Days: 90 }, Tags: [ { Key: "Compliance", Value: "Archived" } ]});