Skip to content

StartArchiveExport

Source: src/AWS/MailManager/StartArchiveExport.ts

Runtime binding for ses:StartArchiveExport.

Starts an asynchronous export of messages from the bound archive to an S3 bucket, returning an ExportId to poll. The archive id is injected from the binding. The function also needs s3:PutObject on the destination. Provide the implementation with Effect.provide(AWS.MailManager.StartArchiveExportHttp).

const startExport = yield* MailManager.StartArchiveExport(archive);
// runtime
const { ExportId } = yield* startExport({
FromTimestamp: new Date(Date.now() - 86_400_000),
ToTimestamp: new Date(),
ExportDestinationConfiguration: {
S3: { S3Location: "s3://my-export-bucket/mail/" },
},
});