Skip to content

Commit a798115

Browse files
author
awstools
committed
feat(client-sesv2): This release adds the ability for outbound email sent with SES to preserve emails to a Mail Manager archive.
1 parent 54c94f6 commit a798115

File tree

13 files changed

+409
-42
lines changed

13 files changed

+409
-42
lines changed

clients/client-sesv2/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,14 @@ PutAccountVdmAttributes
753753

754754
[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/)
755755

756+
</details>
757+
<details>
758+
<summary>
759+
PutConfigurationSetArchivingOptions
760+
</summary>
761+
762+
[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/)
763+
756764
</details>
757765
<details>
758766
<summary>

clients/client-sesv2/src/SESv2.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ import {
334334
PutAccountVdmAttributesCommandInput,
335335
PutAccountVdmAttributesCommandOutput,
336336
} from "./commands/PutAccountVdmAttributesCommand";
337+
import {
338+
PutConfigurationSetArchivingOptionsCommand,
339+
PutConfigurationSetArchivingOptionsCommandInput,
340+
PutConfigurationSetArchivingOptionsCommandOutput,
341+
} from "./commands/PutConfigurationSetArchivingOptionsCommand";
337342
import {
338343
PutConfigurationSetDeliveryOptionsCommand,
339344
PutConfigurationSetDeliveryOptionsCommandInput,
@@ -537,6 +542,7 @@ const commands = {
537542
PutAccountSendingAttributesCommand,
538543
PutAccountSuppressionAttributesCommand,
539544
PutAccountVdmAttributesCommand,
545+
PutConfigurationSetArchivingOptionsCommand,
540546
PutConfigurationSetDeliveryOptionsCommand,
541547
PutConfigurationSetReputationOptionsCommand,
542548
PutConfigurationSetSendingOptionsCommand,
@@ -1676,6 +1682,23 @@ export interface SESv2 {
16761682
cb: (err: any, data?: PutAccountVdmAttributesCommandOutput) => void
16771683
): void;
16781684

1685+
/**
1686+
* @see {@link PutConfigurationSetArchivingOptionsCommand}
1687+
*/
1688+
putConfigurationSetArchivingOptions(
1689+
args: PutConfigurationSetArchivingOptionsCommandInput,
1690+
options?: __HttpHandlerOptions
1691+
): Promise<PutConfigurationSetArchivingOptionsCommandOutput>;
1692+
putConfigurationSetArchivingOptions(
1693+
args: PutConfigurationSetArchivingOptionsCommandInput,
1694+
cb: (err: any, data?: PutConfigurationSetArchivingOptionsCommandOutput) => void
1695+
): void;
1696+
putConfigurationSetArchivingOptions(
1697+
args: PutConfigurationSetArchivingOptionsCommandInput,
1698+
options: __HttpHandlerOptions,
1699+
cb: (err: any, data?: PutConfigurationSetArchivingOptionsCommandOutput) => void
1700+
): void;
1701+
16791702
/**
16801703
* @see {@link PutConfigurationSetDeliveryOptionsCommand}
16811704
*/

clients/client-sesv2/src/SESv2Client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ import {
250250
PutAccountVdmAttributesCommandInput,
251251
PutAccountVdmAttributesCommandOutput,
252252
} from "./commands/PutAccountVdmAttributesCommand";
253+
import {
254+
PutConfigurationSetArchivingOptionsCommandInput,
255+
PutConfigurationSetArchivingOptionsCommandOutput,
256+
} from "./commands/PutConfigurationSetArchivingOptionsCommand";
253257
import {
254258
PutConfigurationSetDeliveryOptionsCommandInput,
255259
PutConfigurationSetDeliveryOptionsCommandOutput,
@@ -427,6 +431,7 @@ export type ServiceInputTypes =
427431
| PutAccountSendingAttributesCommandInput
428432
| PutAccountSuppressionAttributesCommandInput
429433
| PutAccountVdmAttributesCommandInput
434+
| PutConfigurationSetArchivingOptionsCommandInput
430435
| PutConfigurationSetDeliveryOptionsCommandInput
431436
| PutConfigurationSetReputationOptionsCommandInput
432437
| PutConfigurationSetSendingOptionsCommandInput
@@ -528,6 +533,7 @@ export type ServiceOutputTypes =
528533
| PutAccountSendingAttributesCommandOutput
529534
| PutAccountSuppressionAttributesCommandOutput
530535
| PutAccountVdmAttributesCommandOutput
536+
| PutConfigurationSetArchivingOptionsCommandOutput
531537
| PutConfigurationSetDeliveryOptionsCommandOutput
532538
| PutConfigurationSetReputationOptionsCommandOutput
533539
| PutConfigurationSetSendingOptionsCommandOutput

clients/client-sesv2/src/commands/CreateConfigurationSetCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ export interface CreateConfigurationSetCommandOutput extends CreateConfiguration
7676
* OptimizedSharedDelivery: "ENABLED" || "DISABLED",
7777
* },
7878
* },
79+
* ArchivingOptions: { // ArchivingOptions
80+
* ArchiveArn: "STRING_VALUE",
81+
* },
7982
* };
8083
* const command = new CreateConfigurationSetCommand(input);
8184
* const response = await client.send(command);

clients/client-sesv2/src/commands/GetConfigurationSetCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ export interface GetConfigurationSetCommandOutput extends GetConfigurationSetRes
8484
* // OptimizedSharedDelivery: "ENABLED" || "DISABLED",
8585
* // },
8686
* // },
87+
* // ArchivingOptions: { // ArchivingOptions
88+
* // ArchiveArn: "STRING_VALUE",
89+
* // },
8790
* // };
8891
*
8992
* ```
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import {
9+
PutConfigurationSetArchivingOptionsRequest,
10+
PutConfigurationSetArchivingOptionsResponse,
11+
} from "../models/models_0";
12+
import {
13+
de_PutConfigurationSetArchivingOptionsCommand,
14+
se_PutConfigurationSetArchivingOptionsCommand,
15+
} from "../protocols/Aws_restJson1";
16+
import { ServiceInputTypes, ServiceOutputTypes, SESv2ClientResolvedConfig } from "../SESv2Client";
17+
18+
/**
19+
* @public
20+
*/
21+
export type { __MetadataBearer };
22+
export { $Command };
23+
/**
24+
* @public
25+
*
26+
* The input for {@link PutConfigurationSetArchivingOptionsCommand}.
27+
*/
28+
export interface PutConfigurationSetArchivingOptionsCommandInput extends PutConfigurationSetArchivingOptionsRequest {}
29+
/**
30+
* @public
31+
*
32+
* The output of {@link PutConfigurationSetArchivingOptionsCommand}.
33+
*/
34+
export interface PutConfigurationSetArchivingOptionsCommandOutput
35+
extends PutConfigurationSetArchivingOptionsResponse,
36+
__MetadataBearer {}
37+
38+
/**
39+
* <p>Associate the configuration set with a MailManager archive. When you send email using the
40+
* <code>SendEmail</code> or <code>SendBulkEmail</code> operations the message as it will be given
41+
* to the receiving SMTP server will be archived, along with the recipient information.</p>
42+
* @example
43+
* Use a bare-bones client and the command you need to make an API call.
44+
* ```javascript
45+
* import { SESv2Client, PutConfigurationSetArchivingOptionsCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
46+
* // const { SESv2Client, PutConfigurationSetArchivingOptionsCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
47+
* const client = new SESv2Client(config);
48+
* const input = { // PutConfigurationSetArchivingOptionsRequest
49+
* ConfigurationSetName: "STRING_VALUE", // required
50+
* ArchiveArn: "STRING_VALUE",
51+
* };
52+
* const command = new PutConfigurationSetArchivingOptionsCommand(input);
53+
* const response = await client.send(command);
54+
* // {};
55+
*
56+
* ```
57+
*
58+
* @param PutConfigurationSetArchivingOptionsCommandInput - {@link PutConfigurationSetArchivingOptionsCommandInput}
59+
* @returns {@link PutConfigurationSetArchivingOptionsCommandOutput}
60+
* @see {@link PutConfigurationSetArchivingOptionsCommandInput} for command's `input` shape.
61+
* @see {@link PutConfigurationSetArchivingOptionsCommandOutput} for command's `response` shape.
62+
* @see {@link SESv2ClientResolvedConfig | config} for SESv2Client's `config` shape.
63+
*
64+
* @throws {@link BadRequestException} (client fault)
65+
* <p>The input you provided is invalid.</p>
66+
*
67+
* @throws {@link NotFoundException} (client fault)
68+
* <p>The resource you attempted to access doesn't exist.</p>
69+
*
70+
* @throws {@link TooManyRequestsException} (client fault)
71+
* <p>Too many requests have been made to the operation.</p>
72+
*
73+
* @throws {@link SESv2ServiceException}
74+
* <p>Base exception class for all service exceptions from SESv2 service.</p>
75+
*
76+
* @public
77+
*/
78+
export class PutConfigurationSetArchivingOptionsCommand extends $Command
79+
.classBuilder<
80+
PutConfigurationSetArchivingOptionsCommandInput,
81+
PutConfigurationSetArchivingOptionsCommandOutput,
82+
SESv2ClientResolvedConfig,
83+
ServiceInputTypes,
84+
ServiceOutputTypes
85+
>()
86+
.ep(commonParams)
87+
.m(function (this: any, Command: any, cs: any, config: SESv2ClientResolvedConfig, o: any) {
88+
return [
89+
getSerdePlugin(config, this.serialize, this.deserialize),
90+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
91+
];
92+
})
93+
.s("SimpleEmailService_v2", "PutConfigurationSetArchivingOptions", {})
94+
.n("SESv2Client", "PutConfigurationSetArchivingOptionsCommand")
95+
.f(void 0, void 0)
96+
.ser(se_PutConfigurationSetArchivingOptionsCommand)
97+
.de(de_PutConfigurationSetArchivingOptionsCommand)
98+
.build() {
99+
/** @internal type navigation helper, not in runtime. */
100+
protected declare static __types: {
101+
api: {
102+
input: PutConfigurationSetArchivingOptionsRequest;
103+
output: {};
104+
};
105+
sdk: {
106+
input: PutConfigurationSetArchivingOptionsCommandInput;
107+
output: PutConfigurationSetArchivingOptionsCommandOutput;
108+
};
109+
};
110+
}

clients/client-sesv2/src/commands/PutConfigurationSetTrackingOptionsCommand.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import {
9-
PutConfigurationSetTrackingOptionsRequest,
10-
PutConfigurationSetTrackingOptionsResponse,
11-
} from "../models/models_0";
8+
import { PutConfigurationSetTrackingOptionsRequest } from "../models/models_0";
9+
import { PutConfigurationSetTrackingOptionsResponse } from "../models/models_1";
1210
import {
1311
de_PutConfigurationSetTrackingOptionsCommand,
1412
se_PutConfigurationSetTrackingOptionsCommand,

clients/client-sesv2/src/commands/PutConfigurationSetVdmOptionsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { PutConfigurationSetVdmOptionsRequest, PutConfigurationSetVdmOptionsResponse } from "../models/models_0";
8+
import { PutConfigurationSetVdmOptionsRequest, PutConfigurationSetVdmOptionsResponse } from "../models/models_1";
99
import {
1010
de_PutConfigurationSetVdmOptionsCommand,
1111
se_PutConfigurationSetVdmOptionsCommand,

clients/client-sesv2/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export * from "./PutAccountDetailsCommand";
6767
export * from "./PutAccountSendingAttributesCommand";
6868
export * from "./PutAccountSuppressionAttributesCommand";
6969
export * from "./PutAccountVdmAttributesCommand";
70+
export * from "./PutConfigurationSetArchivingOptionsCommand";
7071
export * from "./PutConfigurationSetDeliveryOptionsCommand";
7172
export * from "./PutConfigurationSetReputationOptionsCommand";
7273
export * from "./PutConfigurationSetSendingOptionsCommand";

clients/client-sesv2/src/models/models_0.ts

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,19 @@ export class AlreadyExistsException extends __BaseException {
189189
}
190190
}
191191

192+
/**
193+
* <p>Used to associate a configuration set with a MailManager archive.</p>
194+
* @public
195+
*/
196+
export interface ArchivingOptions {
197+
/**
198+
* <p>The Amazon Resource Name (ARN) of the MailManager archive where the Amazon SES API v2 will archive sent
199+
* emails.</p>
200+
* @public
201+
*/
202+
ArchiveArn?: string | undefined;
203+
}
204+
192205
/**
193206
* <p>The input you provided is invalid.</p>
194207
* @public
@@ -1727,6 +1740,13 @@ export interface CreateConfigurationSetRequest {
17271740
* @public
17281741
*/
17291742
VdmOptions?: VdmOptions | undefined;
1743+
1744+
/**
1745+
* <p>An object that defines the MailManager archiving options for emails that you send
1746+
* using the configuration set.</p>
1747+
* @public
1748+
*/
1749+
ArchivingOptions?: ArchivingOptions | undefined;
17301750
}
17311751

17321752
/**
@@ -5075,6 +5095,13 @@ export interface GetConfigurationSetResponse {
50755095
* @public
50765096
*/
50775097
VdmOptions?: VdmOptions | undefined;
5098+
5099+
/**
5100+
* <p>An object that defines the MailManager archive where sent emails are archived that you send
5101+
* using the configuration set.</p>
5102+
* @public
5103+
*/
5104+
ArchivingOptions?: ArchivingOptions | undefined;
50785105
}
50795106

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

74117438
/**
74127439
* <p>The recommendation type, with values like <code>DKIM</code>,
7413-
* <code>SPF</code>, <code>DMARC</code> or <code>BIMI</code>.</p>
7440+
* <code>SPF</code>, <code>DMARC</code>, <code>BIMI</code>, or <code>COMPLAINT</code>.</p>
74147441
* @public
74157442
*/
74167443
Type?: RecommendationType | undefined;
@@ -7745,6 +7772,32 @@ export interface PutAccountVdmAttributesRequest {
77457772
*/
77467773
export interface PutAccountVdmAttributesResponse {}
77477774

7775+
/**
7776+
* <p>A request to associate a configuration set with a MailManager archive.</p>
7777+
* @public
7778+
*/
7779+
export interface PutConfigurationSetArchivingOptionsRequest {
7780+
/**
7781+
* <p>The name of the configuration set to associate with a MailManager archive.</p>
7782+
* @public
7783+
*/
7784+
ConfigurationSetName: string | undefined;
7785+
7786+
/**
7787+
* <p>The Amazon Resource Name (ARN) of the MailManager archive that the Amazon SES API v2 sends email
7788+
* to.</p>
7789+
* @public
7790+
*/
7791+
ArchiveArn?: string | undefined;
7792+
}
7793+
7794+
/**
7795+
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
7796+
* fails.</p>
7797+
* @public
7798+
*/
7799+
export interface PutConfigurationSetArchivingOptionsResponse {}
7800+
77487801
/**
77497802
* <p>A request to associate a configuration set with a dedicated IP pool.</p>
77507803
* @public
@@ -7915,38 +7968,6 @@ export interface PutConfigurationSetTrackingOptionsRequest {
79157968
HttpsPolicy?: HttpsPolicy | undefined;
79167969
}
79177970

7918-
/**
7919-
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
7920-
* fails.</p>
7921-
* @public
7922-
*/
7923-
export interface PutConfigurationSetTrackingOptionsResponse {}
7924-
7925-
/**
7926-
* <p>A request to add specific VDM settings to a configuration set.</p>
7927-
* @public
7928-
*/
7929-
export interface PutConfigurationSetVdmOptionsRequest {
7930-
/**
7931-
* <p>The name of the configuration set.</p>
7932-
* @public
7933-
*/
7934-
ConfigurationSetName: string | undefined;
7935-
7936-
/**
7937-
* <p>The VDM options to apply to the configuration set.</p>
7938-
* @public
7939-
*/
7940-
VdmOptions?: VdmOptions | undefined;
7941-
}
7942-
7943-
/**
7944-
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
7945-
* fails.</p>
7946-
* @public
7947-
*/
7948-
export interface PutConfigurationSetVdmOptionsResponse {}
7949-
79507971
/**
79517972
* @internal
79527973
*/

0 commit comments

Comments
 (0)