Skip to content

Commit ff065ab

Browse files
author
awstools
committed
feat(client-sesv2): This release enables customers to provide attachments in the SESv2 SendEmail and SendBulkEmail APIs.
1 parent 7a5625d commit ff065ab

8 files changed

+303
-87
lines changed

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

+22
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ export interface CreateDeliverabilityTestReportCommandOutput
7171
* Value: "STRING_VALUE", // required
7272
* },
7373
* ],
74+
* Attachments: [ // AttachmentList
75+
* { // Attachment
76+
* RawContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
77+
* ContentDisposition: "ATTACHMENT" || "INLINE",
78+
* FileName: "STRING_VALUE", // required
79+
* ContentDescription: "STRING_VALUE",
80+
* ContentId: "STRING_VALUE",
81+
* ContentTransferEncoding: "BASE64" || "QUOTED_PRINTABLE" || "SEVEN_BIT",
82+
* ContentType: "STRING_VALUE",
83+
* },
84+
* ],
7485
* },
7586
* Raw: { // RawMessage
7687
* Data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
@@ -90,6 +101,17 @@ export interface CreateDeliverabilityTestReportCommandOutput
90101
* Value: "STRING_VALUE", // required
91102
* },
92103
* ],
104+
* Attachments: [
105+
* {
106+
* RawContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
107+
* ContentDisposition: "ATTACHMENT" || "INLINE",
108+
* FileName: "STRING_VALUE", // required
109+
* ContentDescription: "STRING_VALUE",
110+
* ContentId: "STRING_VALUE",
111+
* ContentTransferEncoding: "BASE64" || "QUOTED_PRINTABLE" || "SEVEN_BIT",
112+
* ContentType: "STRING_VALUE",
113+
* },
114+
* ],
93115
* },
94116
* },
95117
* Tags: [ // TagList

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { commonParams } from "../endpoint/EndpointParameters";
88
import {
99
PutConfigurationSetSuppressionOptionsRequest,
1010
PutConfigurationSetSuppressionOptionsResponse,
11-
} from "../models/models_0";
11+
} from "../models/models_1";
1212
import {
1313
de_PutConfigurationSetSuppressionOptionsCommand,
1414
se_PutConfigurationSetSuppressionOptionsCommand,

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ 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 { PutConfigurationSetTrackingOptionsRequest } from "../models/models_0";
9-
import { PutConfigurationSetTrackingOptionsResponse } from "../models/models_1";
8+
import {
9+
PutConfigurationSetTrackingOptionsRequest,
10+
PutConfigurationSetTrackingOptionsResponse,
11+
} from "../models/models_1";
1012
import {
1113
de_PutConfigurationSetTrackingOptionsCommand,
1214
se_PutConfigurationSetTrackingOptionsCommand,

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

+11
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ export interface SendBulkEmailCommandOutput extends SendBulkEmailResponse, __Met
6565
* Value: "STRING_VALUE", // required
6666
* },
6767
* ],
68+
* Attachments: [ // AttachmentList
69+
* { // Attachment
70+
* RawContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
71+
* ContentDisposition: "ATTACHMENT" || "INLINE",
72+
* FileName: "STRING_VALUE", // required
73+
* ContentDescription: "STRING_VALUE",
74+
* ContentId: "STRING_VALUE",
75+
* ContentTransferEncoding: "BASE64" || "QUOTED_PRINTABLE" || "SEVEN_BIT",
76+
* ContentType: "STRING_VALUE",
77+
* },
78+
* ],
6879
* },
6980
* },
7081
* BulkEmailEntries: [ // BulkEmailEntryList // required

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

+22
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,17 @@ export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBea
9999
* Value: "STRING_VALUE", // required
100100
* },
101101
* ],
102+
* Attachments: [ // AttachmentList
103+
* { // Attachment
104+
* RawContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
105+
* ContentDisposition: "ATTACHMENT" || "INLINE",
106+
* FileName: "STRING_VALUE", // required
107+
* ContentDescription: "STRING_VALUE",
108+
* ContentId: "STRING_VALUE",
109+
* ContentTransferEncoding: "BASE64" || "QUOTED_PRINTABLE" || "SEVEN_BIT",
110+
* ContentType: "STRING_VALUE",
111+
* },
112+
* ],
102113
* },
103114
* Raw: { // RawMessage
104115
* Data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
@@ -118,6 +129,17 @@ export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBea
118129
* Value: "STRING_VALUE", // required
119130
* },
120131
* ],
132+
* Attachments: [
133+
* {
134+
* RawContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
135+
* ContentDisposition: "ATTACHMENT" || "INLINE",
136+
* FileName: "STRING_VALUE", // required
137+
* ContentDescription: "STRING_VALUE",
138+
* ContentId: "STRING_VALUE",
139+
* ContentTransferEncoding: "BASE64" || "QUOTED_PRINTABLE" || "SEVEN_BIT",
140+
* ContentType: "STRING_VALUE",
141+
* },
142+
* ],
121143
* },
122144
* },
123145
* EmailTags: [ // MessageTagList

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

+108-78
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,96 @@ export interface ArchivingOptions {
202202
ArchiveArn?: string | undefined;
203203
}
204204

205+
/**
206+
* @public
207+
* @enum
208+
*/
209+
export const AttachmentContentDisposition = {
210+
ATTACHMENT: "ATTACHMENT",
211+
INLINE: "INLINE",
212+
} as const;
213+
214+
/**
215+
* @public
216+
*/
217+
export type AttachmentContentDisposition =
218+
(typeof AttachmentContentDisposition)[keyof typeof AttachmentContentDisposition];
219+
220+
/**
221+
* @public
222+
* @enum
223+
*/
224+
export const AttachmentContentTransferEncoding = {
225+
BASE64: "BASE64",
226+
QUOTED_PRINTABLE: "QUOTED_PRINTABLE",
227+
SEVEN_BIT: "SEVEN_BIT",
228+
} as const;
229+
230+
/**
231+
* @public
232+
*/
233+
export type AttachmentContentTransferEncoding =
234+
(typeof AttachmentContentTransferEncoding)[keyof typeof AttachmentContentTransferEncoding];
235+
236+
/**
237+
* <p> Contains metadata and attachment raw content.</p>
238+
* @public
239+
*/
240+
export interface Attachment {
241+
/**
242+
* <p> The raw data of the attachment. It needs to be base64-encoded if you are accessing Amazon SES
243+
* directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services
244+
* SDK, the SDK takes care of the base 64-encoding for you.</p>
245+
* @public
246+
*/
247+
RawContent: Uint8Array | undefined;
248+
249+
/**
250+
* <p> A standard descriptor indicating how the attachment should be rendered in the email.
251+
* Supported values: <code>ATTACHMENT</code> or <code>INLINE</code>.</p>
252+
* @public
253+
*/
254+
ContentDisposition?: AttachmentContentDisposition | undefined;
255+
256+
/**
257+
* <p>The file name for the attachment as it will appear in the email.
258+
* Amazon SES restricts certain file extensions. To ensure attachments are accepted,
259+
* check the <a href="https://docs.aws.amazon.com/ses/latest/dg/mime-types.html">Unsupported attachment types</a>
260+
* in the Amazon SES Developer Guide.</p>
261+
* @public
262+
*/
263+
FileName: string | undefined;
264+
265+
/**
266+
* <p> A brief description of the attachment content.</p>
267+
* @public
268+
*/
269+
ContentDescription?: string | undefined;
270+
271+
/**
272+
* <p> Unique identifier for the attachment, used for referencing attachments with INLINE disposition in HTML content.</p>
273+
* @public
274+
*/
275+
ContentId?: string | undefined;
276+
277+
/**
278+
* <p> Specifies how the attachment is encoded.
279+
* Supported values: <code>BASE64</code>, <code>QUOTED_PRINTABLE</code>, <code>SEVEN_BIT</code>.</p>
280+
* @public
281+
*/
282+
ContentTransferEncoding?: AttachmentContentTransferEncoding | undefined;
283+
284+
/**
285+
* <p> The MIME type of the attachment.</p>
286+
* <note>
287+
* <p>Example: <code>application/pdf</code>, <code>image/jpeg</code>
288+
* </p>
289+
* </note>
290+
* @public
291+
*/
292+
ContentType?: string | undefined;
293+
}
294+
205295
/**
206296
* <p>The input you provided is invalid.</p>
207297
* @public
@@ -780,6 +870,12 @@ export interface Template {
780870
* @public
781871
*/
782872
Headers?: MessageHeader[] | undefined;
873+
874+
/**
875+
* <p> The List of attachments to include in your email. All recipients will receive the same attachments.</p>
876+
* @public
877+
*/
878+
Attachments?: Attachment[] | undefined;
783879
}
784880

785881
/**
@@ -2230,19 +2326,25 @@ export interface Message {
22302326
* @public
22312327
*/
22322328
Headers?: MessageHeader[] | undefined;
2329+
2330+
/**
2331+
* <p> The List of attachments to include in your email. All recipients will receive the same attachments.</p>
2332+
* @public
2333+
*/
2334+
Attachments?: Attachment[] | undefined;
22332335
}
22342336

22352337
/**
2236-
* <p>An object that defines the entire content of the email, including the message headers
2237-
* and the body content. You can create a simple email message, in which you specify the
2238-
* subject and the text and HTML versions of the message body. You can also create raw
2239-
* messages, in which you specify a complete MIME-formatted message. Raw messages can
2240-
* include attachments and custom headers.</p>
2338+
* <p>An object that defines the entire content of the email, including the message headers, body content,
2339+
* and attachments. For a simple email message, you specify the subject and provide both text
2340+
* and HTML versions of the message body. You can also add attachments to simple and templated
2341+
* messages. For a raw message, you provide a complete MIME-formatted message, which can
2342+
* include custom headers and attachments.</p>
22412343
* @public
22422344
*/
22432345
export interface EmailContent {
22442346
/**
2245-
* <p>The simple email message. The message consists of a subject and a message body.</p>
2347+
* <p>The simple email message. The message consists of a subject, message body and attachments list.</p>
22462348
* @public
22472349
*/
22482350
Simple?: Message | undefined;
@@ -7896,78 +7998,6 @@ export interface PutConfigurationSetSendingOptionsRequest {
78967998
*/
78977999
export interface PutConfigurationSetSendingOptionsResponse {}
78988000

7899-
/**
7900-
* <p>A request to change the account suppression list preferences for a specific
7901-
* configuration set.</p>
7902-
* @public
7903-
*/
7904-
export interface PutConfigurationSetSuppressionOptionsRequest {
7905-
/**
7906-
* <p>The name of the configuration set to change the suppression list preferences
7907-
* for.</p>
7908-
* @public
7909-
*/
7910-
ConfigurationSetName: string | undefined;
7911-
7912-
/**
7913-
* <p>A list that contains the reasons that email addresses are automatically added to the
7914-
* suppression list for your account. This list can contain any or all of the
7915-
* following:</p>
7916-
* <ul>
7917-
* <li>
7918-
* <p>
7919-
* <code>COMPLAINT</code> – Amazon SES adds an email address to the suppression
7920-
* list for your account when a message sent to that address results in a
7921-
* complaint.</p>
7922-
* </li>
7923-
* <li>
7924-
* <p>
7925-
* <code>BOUNCE</code> – Amazon SES adds an email address to the suppression
7926-
* list for your account when a message sent to that address results in a hard
7927-
* bounce.</p>
7928-
* </li>
7929-
* </ul>
7930-
* @public
7931-
*/
7932-
SuppressedReasons?: SuppressionListReason[] | undefined;
7933-
}
7934-
7935-
/**
7936-
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
7937-
* fails.</p>
7938-
* @public
7939-
*/
7940-
export interface PutConfigurationSetSuppressionOptionsResponse {}
7941-
7942-
/**
7943-
* <p>A request to add a custom domain for tracking open and click events to a configuration
7944-
* set.</p>
7945-
* @public
7946-
*/
7947-
export interface PutConfigurationSetTrackingOptionsRequest {
7948-
/**
7949-
* <p>The name of the configuration set.</p>
7950-
* @public
7951-
*/
7952-
ConfigurationSetName: string | undefined;
7953-
7954-
/**
7955-
* <p>The domain to use to track open and click events.</p>
7956-
* @public
7957-
*/
7958-
CustomRedirectDomain?: string | undefined;
7959-
7960-
/**
7961-
* <p>The https policy to use for tracking open and click events. If the value is OPTIONAL or HttpsPolicy is not
7962-
* specified, the open trackers use HTTP and click tracker use the original protocol of the link.
7963-
* If the value is REQUIRE, both open and click tracker uses HTTPS and if the value is REQUIRE_OPEN_ONLY
7964-
* open tracker uses HTTPS and link tracker is same as original protocol of the link.
7965-
* </p>
7966-
* @public
7967-
*/
7968-
HttpsPolicy?: HttpsPolicy | undefined;
7969-
}
7970-
79718001
/**
79728002
* @internal
79738003
*/

0 commit comments

Comments
 (0)