Skip to content

Commit 4b858e0

Browse files
author
awstools
committed
feat(client-sesv2): Adds support for providing custom headers within SendEmail and SendBulkEmail for SESv2.
1 parent 45ea346 commit 4b858e0

File tree

9 files changed

+226
-65
lines changed

9 files changed

+226
-65
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ export interface CreateDeliverabilityTestReportCommandOutput
6565
* Charset: "STRING_VALUE",
6666
* },
6767
* },
68+
* Headers: [ // MessageHeaderList
69+
* { // MessageHeader
70+
* Name: "STRING_VALUE", // required
71+
* Value: "STRING_VALUE", // required
72+
* },
73+
* ],
6874
* },
6975
* Raw: { // RawMessage
7076
* Data: "BLOB_VALUE", // required
@@ -73,6 +79,12 @@ export interface CreateDeliverabilityTestReportCommandOutput
7379
* TemplateName: "STRING_VALUE",
7480
* TemplateArn: "STRING_VALUE",
7581
* TemplateData: "STRING_VALUE",
82+
* Headers: [
83+
* {
84+
* Name: "STRING_VALUE", // required
85+
* Value: "STRING_VALUE", // required
86+
* },
87+
* ],
7688
* },
7789
* },
7890
* Tags: [ // TagList

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

+2-4
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-
PutEmailIdentityFeedbackAttributesRequest,
10-
PutEmailIdentityFeedbackAttributesResponse,
11-
} from "../models/models_0";
8+
import { PutEmailIdentityFeedbackAttributesRequest } from "../models/models_0";
9+
import { PutEmailIdentityFeedbackAttributesResponse } from "../models/models_1";
1210
import {
1311
de_PutEmailIdentityFeedbackAttributesCommand,
1412
se_PutEmailIdentityFeedbackAttributesCommand,

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

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export interface SendBulkEmailCommandOutput extends SendBulkEmailResponse, __Met
5454
* TemplateName: "STRING_VALUE",
5555
* TemplateArn: "STRING_VALUE",
5656
* TemplateData: "STRING_VALUE",
57+
* Headers: [ // MessageHeaderList
58+
* { // MessageHeader
59+
* Name: "STRING_VALUE", // required
60+
* Value: "STRING_VALUE", // required
61+
* },
62+
* ],
5763
* },
5864
* },
5965
* BulkEmailEntries: [ // BulkEmailEntryList // required

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

+12
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBea
9393
* Charset: "STRING_VALUE",
9494
* },
9595
* },
96+
* Headers: [ // MessageHeaderList
97+
* { // MessageHeader
98+
* Name: "STRING_VALUE", // required
99+
* Value: "STRING_VALUE", // required
100+
* },
101+
* ],
96102
* },
97103
* Raw: { // RawMessage
98104
* Data: "BLOB_VALUE", // required
@@ -101,6 +107,12 @@ export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBea
101107
* TemplateName: "STRING_VALUE",
102108
* TemplateArn: "STRING_VALUE",
103109
* TemplateData: "STRING_VALUE",
110+
* Headers: [
111+
* {
112+
* Name: "STRING_VALUE", // required
113+
* Value: "STRING_VALUE", // required
114+
* },
115+
* ],
104116
* },
105117
* },
106118
* EmailTags: [ // MessageTagList

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ export interface UpdateContactCommandOutput extends UpdateContactResponse, __Met
2828

2929
/**
3030
* @public
31-
* <p>Updates a contact's preferences for a list. It is not necessary to specify all
32-
* existing topic preferences in the TopicPreferences object, just the ones that need
33-
* updating.</p>
31+
* <p>Updates a contact's preferences for a list.</p>
32+
* <note>
33+
* <p>You must specify all existing topic preferences in the
34+
* <code>TopicPreferences</code> object, not just the ones that need updating;
35+
* otherwise, all your existing preferences will be removed.</p>
36+
* </note>
3437
* @example
3538
* Use a bare-bones client and the command you need to make an API call.
3639
* ```javascript

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

+80-31
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,42 @@ export interface Bounce {
655655
DiagnosticCode?: string;
656656
}
657657

658+
/**
659+
* @public
660+
* <p>Contains the name and value of a message header that you add to an email.</p>
661+
*/
662+
export interface MessageHeader {
663+
/**
664+
* @public
665+
* <p>The name of the message header. The message header name has to meet the following
666+
* criteria:</p>
667+
* <ul>
668+
* <li>
669+
* <p>Can contain any printable ASCII character (33 - 126) except for colon (:).</p>
670+
* </li>
671+
* <li>
672+
* <p>Can contain no more than 126 characters.</p>
673+
* </li>
674+
* </ul>
675+
*/
676+
Name: string | undefined;
677+
678+
/**
679+
* @public
680+
* <p>The value of the message header. The message header value has to meet the following
681+
* criteria:</p>
682+
* <ul>
683+
* <li>
684+
* <p>Can contain any printable ASCII character.</p>
685+
* </li>
686+
* <li>
687+
* <p>Can contain no more than 870 characters.</p>
688+
* </li>
689+
* </ul>
690+
*/
691+
Value: string | undefined;
692+
}
693+
658694
/**
659695
* @public
660696
* <p>An object that defines the email template to use for an email message, and the values
@@ -684,6 +720,12 @@ export interface Template {
684720
* The corresponding value defines the value to use for that variable.</p>
685721
*/
686722
TemplateData?: string;
723+
724+
/**
725+
* @public
726+
* <p>The list of message headers that will be added to the email message.</p>
727+
*/
728+
Headers?: MessageHeader[];
687729
}
688730

689731
/**
@@ -1231,8 +1273,8 @@ export interface ContactListDestination {
12311273

12321274
/**
12331275
* @public
1234-
* <p>>The type of action to perform on the addresses. The following are the
1235-
* possible values:</p>
1276+
* <p>>The type of action to perform on the addresses. The following are the possible
1277+
* values:</p>
12361278
* <ul>
12371279
* <li>
12381280
* <p>PUT: add the addresses to the contact list. If the record already exists, it
@@ -1999,8 +2041,8 @@ export interface RawMessage {
19992041
* <p>Attachments must be in a file format that the Amazon SES supports.</p>
20002042
* </li>
20012043
* <li>
2002-
* <p>The raw data of the message needs to base64-encoded if you are accessing
2003-
* Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services
2044+
* <p>The raw data of the message needs to base64-encoded if you are accessing Amazon SES
2045+
* directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services
20042046
* SDK, the SDK takes care of the base 64-encoding for you.</p>
20052047
* </li>
20062048
* <li>
@@ -2037,6 +2079,12 @@ export interface Message {
20372079
* version of the message, or both.</p>
20382080
*/
20392081
Body: Body | undefined;
2082+
2083+
/**
2084+
* @public
2085+
* <p>The list of message headers that will be added to the email message.</p>
2086+
*/
2087+
Headers?: MessageHeader[];
20402088
}
20412089

20422090
/**
@@ -2074,8 +2122,8 @@ export interface EmailContent {
20742122
* </p>
20752123
* </li>
20762124
* <li>
2077-
* <p>The raw data of the message needs to base64-encoded if you are accessing
2078-
* Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services
2125+
* <p>The raw data of the message needs to base64-encoded if you are accessing Amazon SES
2126+
* directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services
20792127
* SDK, the SDK takes care of the base 64-encoding for you.</p>
20802128
* </li>
20812129
* <li>
@@ -3206,20 +3254,24 @@ export interface DailyVolume {
32063254

32073255
/**
32083256
* @public
3209-
* <p>An object containing additional settings for your VDM configuration as applicable to the Dashboard.</p>
3257+
* <p>An object containing additional settings for your VDM configuration as applicable to
3258+
* the Dashboard.</p>
32103259
*/
32113260
export interface DashboardAttributes {
32123261
/**
32133262
* @public
3214-
* <p>Specifies the status of your VDM engagement metrics collection. Can be one of the following:</p>
3263+
* <p>Specifies the status of your VDM engagement metrics collection. Can be one of the
3264+
* following:</p>
32153265
* <ul>
32163266
* <li>
32173267
* <p>
3218-
* <code>ENABLED</code> – Amazon SES enables engagement metrics for your account.</p>
3268+
* <code>ENABLED</code> – Amazon SES enables engagement metrics for your
3269+
* account.</p>
32193270
* </li>
32203271
* <li>
32213272
* <p>
3222-
* <code>DISABLED</code> – Amazon SES disables engagement metrics for your account.</p>
3273+
* <code>DISABLED</code> – Amazon SES disables engagement metrics for your
3274+
* account.</p>
32233275
* </li>
32243276
* </ul>
32253277
*/
@@ -4177,20 +4229,24 @@ export interface SuppressionAttributes {
41774229

41784230
/**
41794231
* @public
4180-
* <p>An object containing additional settings for your VDM configuration as applicable to the Guardian.</p>
4232+
* <p>An object containing additional settings for your VDM configuration as applicable to
4233+
* the Guardian.</p>
41814234
*/
41824235
export interface GuardianAttributes {
41834236
/**
41844237
* @public
4185-
* <p>Specifies the status of your VDM optimized shared delivery. Can be one of the following:</p>
4238+
* <p>Specifies the status of your VDM optimized shared delivery. Can be one of the
4239+
* following:</p>
41864240
* <ul>
41874241
* <li>
41884242
* <p>
4189-
* <code>ENABLED</code> – Amazon SES enables optimized shared delivery for your account.</p>
4243+
* <code>ENABLED</code> – Amazon SES enables optimized shared delivery for your
4244+
* account.</p>
41904245
* </li>
41914246
* <li>
41924247
* <p>
4193-
* <code>DISABLED</code> – Amazon SES disables optimized shared delivery for your account.</p>
4248+
* <code>DISABLED</code> – Amazon SES disables optimized shared delivery for
4249+
* your account.</p>
41944250
* </li>
41954251
* </ul>
41964252
*/
@@ -4220,13 +4276,15 @@ export interface VdmAttributes {
42204276

42214277
/**
42224278
* @public
4223-
* <p>Specifies additional settings for your VDM configuration as applicable to the Dashboard.</p>
4279+
* <p>Specifies additional settings for your VDM configuration as applicable to the
4280+
* Dashboard.</p>
42244281
*/
42254282
DashboardAttributes?: DashboardAttributes;
42264283

42274284
/**
42284285
* @public
4229-
* <p>Specifies additional settings for your VDM configuration as applicable to the Guardian.</p>
4286+
* <p>Specifies additional settings for your VDM configuration as applicable to the
4287+
* Guardian.</p>
42304288
*/
42314289
GuardianAttributes?: GuardianAttributes;
42324290
}
@@ -4277,9 +4335,8 @@ export interface GetAccountResponse {
42774335
* Region.</p>
42784336
* <p>If the value is <code>false</code>, then your account is in the
42794337
* <i>sandbox</i>. When your account is in the sandbox, you can only send
4280-
* email to verified identities. Additionally, the maximum number of emails you can send in
4281-
* a 24-hour period (your sending quota) is 200, and the maximum number of emails you can
4282-
* send per second (your maximum sending rate) is 1.</p>
4338+
* email to verified identities.
4339+
* </p>
42834340
* <p>If the value is <code>true</code>, then your account has production access. When your
42844341
* account has production access, you can send email to any address. The sending quota and
42854342
* maximum sending rate for your account vary based on your specific use case.</p>
@@ -5952,8 +6009,8 @@ export interface ListContactsRequest {
59526009
/**
59536010
* @public
59546011
* <p>The number of contacts that may be returned at once, which is dependent on if there
5955-
* are more or less contacts than the value of the PageSize. Use this parameter to
5956-
* paginate results. If additional contacts exist beyond the specified limit, the
6012+
* are more or less contacts than the value of the PageSize. Use this parameter to paginate
6013+
* results. If additional contacts exist beyond the specified limit, the
59576014
* <code>NextToken</code> element is sent in the response. Use the
59586015
* <code>NextToken</code> value in subsequent requests to retrieve additional
59596016
* contacts.</p>
@@ -6764,9 +6821,8 @@ export interface PutAccountDetailsRequest {
67646821
* Amazon Web Services Region.</p>
67656822
* <p>If the value is <code>false</code>, then your account is in the
67666823
* <i>sandbox</i>. When your account is in the sandbox, you can only send
6767-
* email to verified identities. Additionally, the maximum number of emails you can send in
6768-
* a 24-hour period (your sending quota) is 200, and the maximum number of emails you can
6769-
* send per second (your maximum sending rate) is 1.</p>
6824+
* email to verified identities.
6825+
* </p>
67706826
* <p>If the value is <code>true</code>, then your account has production access. When your
67716827
* account has production access, you can send email to any address. The sending quota and
67726828
* maximum sending rate for your account vary based on your specific use case.</p>
@@ -7337,13 +7393,6 @@ export interface PutEmailIdentityFeedbackAttributesRequest {
73377393
EmailForwardingEnabled?: boolean;
73387394
}
73397395

7340-
/**
7341-
* @public
7342-
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
7343-
* fails.</p>
7344-
*/
7345-
export interface PutEmailIdentityFeedbackAttributesResponse {}
7346-
73477396
/**
73487397
* @internal
73497398
*/

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

+17-10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ import {
1616
TopicPreference,
1717
} from "./models_0";
1818

19+
/**
20+
* @public
21+
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
22+
* fails.</p>
23+
*/
24+
export interface PutEmailIdentityFeedbackAttributesResponse {}
25+
1926
/**
2027
* @public
2128
* <p>A request to configure the custom MAIL FROM domain for a verified identity.</p>
@@ -104,8 +111,8 @@ export interface PutSuppressedDestinationResponse {}
104111
export interface SendBulkEmailRequest {
105112
/**
106113
* @public
107-
* <p>The email address to use as the "From" address for the email. The
108-
* address that you specify has to be verified.</p>
114+
* <p>The email address to use as the "From" address for the email. The address that you
115+
* specify has to be verified.</p>
109116
*/
110117
FromEmailAddress?: string;
111118

@@ -244,8 +251,8 @@ export interface SendCustomVerificationEmailResponse {
244251
export interface SendEmailRequest {
245252
/**
246253
* @public
247-
* <p>The email address to use as the "From" address for the email. The
248-
* address that you specify has to be verified.
254+
* <p>The email address to use as the "From" address for the email. The address that you
255+
* specify has to be verified.
249256
* </p>
250257
*/
251258
FromEmailAddress?: string;
@@ -307,8 +314,8 @@ export interface SendEmailRequest {
307314

308315
/**
309316
* @public
310-
* <p>An object that contains the body of the message. You can send either a Simple message
311-
* Raw message or a template Message.</p>
317+
* <p>An object that contains the body of the message. You can send either a Simple message,
318+
* Raw message, or a Templated message.</p>
312319
*/
313320
Content: EmailContent | undefined;
314321

@@ -344,10 +351,10 @@ export interface SendEmailResponse {
344351
* <p>A unique identifier for the message that is generated when the message is
345352
* accepted.</p>
346353
* <note>
347-
* <p>It's possible for Amazon SES to accept a message without sending it. This can happen
348-
* when the message that you're trying to send has an attachment contains a virus, or
349-
* when you send a templated email that contains invalid personalization content, for
350-
* example.</p>
354+
* <p>It's possible for Amazon SES to accept a message without sending it. For example, this
355+
* can happen when the message that you're trying to send has an attachment that
356+
* contains a virus, or when you send a templated email that contains invalid
357+
* personalization content.</p>
351358
* </note>
352359
*/
353360
MessageId?: string;

0 commit comments

Comments
 (0)