Skip to content

Commit

Permalink
feat(client-sesv2): This release adds the ability for outbound email …
Browse files Browse the repository at this point in the history
…sent with SES to preserve emails to a Mail Manager archive.
  • Loading branch information
awstools committed Feb 19, 2025
1 parent 54c94f6 commit a798115
Show file tree
Hide file tree
Showing 13 changed files with 409 additions and 42 deletions.
8 changes: 8 additions & 0 deletions clients/client-sesv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,14 @@ PutAccountVdmAttributes

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sesv2/command/PutAccountVdmAttributesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sesv2/Interface/PutAccountVdmAttributesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sesv2/Interface/PutAccountVdmAttributesCommandOutput/)

</details>
<details>
<summary>
PutConfigurationSetArchivingOptions
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sesv2/command/PutConfigurationSetArchivingOptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sesv2/Interface/PutConfigurationSetArchivingOptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sesv2/Interface/PutConfigurationSetArchivingOptionsCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-sesv2/src/SESv2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ import {
PutAccountVdmAttributesCommandInput,
PutAccountVdmAttributesCommandOutput,
} from "./commands/PutAccountVdmAttributesCommand";
import {
PutConfigurationSetArchivingOptionsCommand,
PutConfigurationSetArchivingOptionsCommandInput,
PutConfigurationSetArchivingOptionsCommandOutput,
} from "./commands/PutConfigurationSetArchivingOptionsCommand";
import {
PutConfigurationSetDeliveryOptionsCommand,
PutConfigurationSetDeliveryOptionsCommandInput,
Expand Down Expand Up @@ -537,6 +542,7 @@ const commands = {
PutAccountSendingAttributesCommand,
PutAccountSuppressionAttributesCommand,
PutAccountVdmAttributesCommand,
PutConfigurationSetArchivingOptionsCommand,
PutConfigurationSetDeliveryOptionsCommand,
PutConfigurationSetReputationOptionsCommand,
PutConfigurationSetSendingOptionsCommand,
Expand Down Expand Up @@ -1676,6 +1682,23 @@ export interface SESv2 {
cb: (err: any, data?: PutAccountVdmAttributesCommandOutput) => void
): void;

/**
* @see {@link PutConfigurationSetArchivingOptionsCommand}
*/
putConfigurationSetArchivingOptions(
args: PutConfigurationSetArchivingOptionsCommandInput,
options?: __HttpHandlerOptions
): Promise<PutConfigurationSetArchivingOptionsCommandOutput>;
putConfigurationSetArchivingOptions(
args: PutConfigurationSetArchivingOptionsCommandInput,
cb: (err: any, data?: PutConfigurationSetArchivingOptionsCommandOutput) => void
): void;
putConfigurationSetArchivingOptions(
args: PutConfigurationSetArchivingOptionsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PutConfigurationSetArchivingOptionsCommandOutput) => void
): void;

/**
* @see {@link PutConfigurationSetDeliveryOptionsCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-sesv2/src/SESv2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ import {
PutAccountVdmAttributesCommandInput,
PutAccountVdmAttributesCommandOutput,
} from "./commands/PutAccountVdmAttributesCommand";
import {
PutConfigurationSetArchivingOptionsCommandInput,
PutConfigurationSetArchivingOptionsCommandOutput,
} from "./commands/PutConfigurationSetArchivingOptionsCommand";
import {
PutConfigurationSetDeliveryOptionsCommandInput,
PutConfigurationSetDeliveryOptionsCommandOutput,
Expand Down Expand Up @@ -427,6 +431,7 @@ export type ServiceInputTypes =
| PutAccountSendingAttributesCommandInput
| PutAccountSuppressionAttributesCommandInput
| PutAccountVdmAttributesCommandInput
| PutConfigurationSetArchivingOptionsCommandInput
| PutConfigurationSetDeliveryOptionsCommandInput
| PutConfigurationSetReputationOptionsCommandInput
| PutConfigurationSetSendingOptionsCommandInput
Expand Down Expand Up @@ -528,6 +533,7 @@ export type ServiceOutputTypes =
| PutAccountSendingAttributesCommandOutput
| PutAccountSuppressionAttributesCommandOutput
| PutAccountVdmAttributesCommandOutput
| PutConfigurationSetArchivingOptionsCommandOutput
| PutConfigurationSetDeliveryOptionsCommandOutput
| PutConfigurationSetReputationOptionsCommandOutput
| PutConfigurationSetSendingOptionsCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export interface CreateConfigurationSetCommandOutput extends CreateConfiguration
* OptimizedSharedDelivery: "ENABLED" || "DISABLED",
* },
* },
* ArchivingOptions: { // ArchivingOptions
* ArchiveArn: "STRING_VALUE",
* },
* };
* const command = new CreateConfigurationSetCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export interface GetConfigurationSetCommandOutput extends GetConfigurationSetRes
* // OptimizedSharedDelivery: "ENABLED" || "DISABLED",
* // },
* // },
* // ArchivingOptions: { // ArchivingOptions
* // ArchiveArn: "STRING_VALUE",
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import {
PutConfigurationSetArchivingOptionsRequest,
PutConfigurationSetArchivingOptionsResponse,
} from "../models/models_0";
import {
de_PutConfigurationSetArchivingOptionsCommand,
se_PutConfigurationSetArchivingOptionsCommand,
} from "../protocols/Aws_restJson1";
import { ServiceInputTypes, ServiceOutputTypes, SESv2ClientResolvedConfig } from "../SESv2Client";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link PutConfigurationSetArchivingOptionsCommand}.
*/
export interface PutConfigurationSetArchivingOptionsCommandInput extends PutConfigurationSetArchivingOptionsRequest {}
/**
* @public
*
* The output of {@link PutConfigurationSetArchivingOptionsCommand}.
*/
export interface PutConfigurationSetArchivingOptionsCommandOutput
extends PutConfigurationSetArchivingOptionsResponse,
__MetadataBearer {}

/**
* <p>Associate the configuration set with a MailManager archive. When you send email using the
* <code>SendEmail</code> or <code>SendBulkEmail</code> operations the message as it will be given
* to the receiving SMTP server will be archived, along with the recipient information.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SESv2Client, PutConfigurationSetArchivingOptionsCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
* // const { SESv2Client, PutConfigurationSetArchivingOptionsCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
* const client = new SESv2Client(config);
* const input = { // PutConfigurationSetArchivingOptionsRequest
* ConfigurationSetName: "STRING_VALUE", // required
* ArchiveArn: "STRING_VALUE",
* };
* const command = new PutConfigurationSetArchivingOptionsCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param PutConfigurationSetArchivingOptionsCommandInput - {@link PutConfigurationSetArchivingOptionsCommandInput}
* @returns {@link PutConfigurationSetArchivingOptionsCommandOutput}
* @see {@link PutConfigurationSetArchivingOptionsCommandInput} for command's `input` shape.
* @see {@link PutConfigurationSetArchivingOptionsCommandOutput} for command's `response` shape.
* @see {@link SESv2ClientResolvedConfig | config} for SESv2Client's `config` shape.
*
* @throws {@link BadRequestException} (client fault)
* <p>The input you provided is invalid.</p>
*
* @throws {@link NotFoundException} (client fault)
* <p>The resource you attempted to access doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Too many requests have been made to the operation.</p>
*
* @throws {@link SESv2ServiceException}
* <p>Base exception class for all service exceptions from SESv2 service.</p>
*
* @public
*/
export class PutConfigurationSetArchivingOptionsCommand extends $Command
.classBuilder<
PutConfigurationSetArchivingOptionsCommandInput,
PutConfigurationSetArchivingOptionsCommandOutput,
SESv2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: SESv2ClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("SimpleEmailService_v2", "PutConfigurationSetArchivingOptions", {})
.n("SESv2Client", "PutConfigurationSetArchivingOptionsCommand")
.f(void 0, void 0)
.ser(se_PutConfigurationSetArchivingOptionsCommand)
.de(de_PutConfigurationSetArchivingOptionsCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: PutConfigurationSetArchivingOptionsRequest;
output: {};
};
sdk: {
input: PutConfigurationSetArchivingOptionsCommandInput;
output: PutConfigurationSetArchivingOptionsCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import {
PutConfigurationSetTrackingOptionsRequest,
PutConfigurationSetTrackingOptionsResponse,
} from "../models/models_0";
import { PutConfigurationSetTrackingOptionsRequest } from "../models/models_0";
import { PutConfigurationSetTrackingOptionsResponse } from "../models/models_1";
import {
de_PutConfigurationSetTrackingOptionsCommand,
se_PutConfigurationSetTrackingOptionsCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { PutConfigurationSetVdmOptionsRequest, PutConfigurationSetVdmOptionsResponse } from "../models/models_0";
import { PutConfigurationSetVdmOptionsRequest, PutConfigurationSetVdmOptionsResponse } from "../models/models_1";
import {
de_PutConfigurationSetVdmOptionsCommand,
se_PutConfigurationSetVdmOptionsCommand,
Expand Down
1 change: 1 addition & 0 deletions clients/client-sesv2/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export * from "./PutAccountDetailsCommand";
export * from "./PutAccountSendingAttributesCommand";
export * from "./PutAccountSuppressionAttributesCommand";
export * from "./PutAccountVdmAttributesCommand";
export * from "./PutConfigurationSetArchivingOptionsCommand";
export * from "./PutConfigurationSetDeliveryOptionsCommand";
export * from "./PutConfigurationSetReputationOptionsCommand";
export * from "./PutConfigurationSetSendingOptionsCommand";
Expand Down
89 changes: 55 additions & 34 deletions clients/client-sesv2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ export class AlreadyExistsException extends __BaseException {
}
}

/**
* <p>Used to associate a configuration set with a MailManager archive.</p>
* @public
*/
export interface ArchivingOptions {
/**
* <p>The Amazon Resource Name (ARN) of the MailManager archive where the Amazon SES API v2 will archive sent
* emails.</p>
* @public
*/
ArchiveArn?: string | undefined;
}

/**
* <p>The input you provided is invalid.</p>
* @public
Expand Down Expand Up @@ -1727,6 +1740,13 @@ export interface CreateConfigurationSetRequest {
* @public
*/
VdmOptions?: VdmOptions | undefined;

/**
* <p>An object that defines the MailManager archiving options for emails that you send
* using the configuration set.</p>
* @public
*/
ArchivingOptions?: ArchivingOptions | undefined;
}

/**
Expand Down Expand Up @@ -5075,6 +5095,13 @@ export interface GetConfigurationSetResponse {
* @public
*/
VdmOptions?: VdmOptions | undefined;

/**
* <p>An object that defines the MailManager archive where sent emails are archived that you send
* using the configuration set.</p>
* @public
*/
ArchivingOptions?: ArchivingOptions | undefined;
}

/**
Expand Down Expand Up @@ -5869,7 +5896,7 @@ export interface VerificationInfo {
* <li>
* <p>
* <code>REPLICATION_PRIMARY_INVALID_REGION</code> – The verification failed due to an invalid
* primary region specified. Ensure you provide a valid AWS region where Amazon SES is available and different
* primary region specified. Ensure you provide a valid Amazon Web Services region where Amazon SES is available and different
* from the replica region.
* </p>
* </li>
Expand Down Expand Up @@ -7410,7 +7437,7 @@ export interface Recommendation {

/**
* <p>The recommendation type, with values like <code>DKIM</code>,
* <code>SPF</code>, <code>DMARC</code> or <code>BIMI</code>.</p>
* <code>SPF</code>, <code>DMARC</code>, <code>BIMI</code>, or <code>COMPLAINT</code>.</p>
* @public
*/
Type?: RecommendationType | undefined;
Expand Down Expand Up @@ -7745,6 +7772,32 @@ export interface PutAccountVdmAttributesRequest {
*/
export interface PutAccountVdmAttributesResponse {}

/**
* <p>A request to associate a configuration set with a MailManager archive.</p>
* @public
*/
export interface PutConfigurationSetArchivingOptionsRequest {
/**
* <p>The name of the configuration set to associate with a MailManager archive.</p>
* @public
*/
ConfigurationSetName: string | undefined;

/**
* <p>The Amazon Resource Name (ARN) of the MailManager archive that the Amazon SES API v2 sends email
* to.</p>
* @public
*/
ArchiveArn?: string | undefined;
}

/**
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
* fails.</p>
* @public
*/
export interface PutConfigurationSetArchivingOptionsResponse {}

/**
* <p>A request to associate a configuration set with a dedicated IP pool.</p>
* @public
Expand Down Expand Up @@ -7915,38 +7968,6 @@ export interface PutConfigurationSetTrackingOptionsRequest {
HttpsPolicy?: HttpsPolicy | undefined;
}

/**
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
* fails.</p>
* @public
*/
export interface PutConfigurationSetTrackingOptionsResponse {}

/**
* <p>A request to add specific VDM settings to a configuration set.</p>
* @public
*/
export interface PutConfigurationSetVdmOptionsRequest {
/**
* <p>The name of the configuration set.</p>
* @public
*/
ConfigurationSetName: string | undefined;

/**
* <p>The VDM options to apply to the configuration set.</p>
* @public
*/
VdmOptions?: VdmOptions | undefined;
}

/**
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
* fails.</p>
* @public
*/
export interface PutConfigurationSetVdmOptionsResponse {}

/**
* @internal
*/
Expand Down
Loading

0 comments on commit a798115

Please sign in to comment.