Skip to content

Commit 2f50238

Browse files
author
awstools
committed
feat(client-sesv2): This release enables customers to provide the email template content in the SESv2 SendEmail and SendBulkEmail APIs instead of the name or the ARN of a stored email template.
1 parent 6908bf2 commit 2f50238

File tree

6 files changed

+63
-29
lines changed

6 files changed

+63
-29
lines changed

clients/client-sesv2/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and code samples that demonstrate how to use Amazon SES API v2 features programm
1717

1818
## Installing
1919

20-
To install the this package, simply type add or install @aws-sdk/client-sesv2
20+
To install this package, simply type add or install @aws-sdk/client-sesv2
2121
using your favorite package manager:
2222

2323
- `npm install @aws-sdk/client-sesv2`

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

+5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ export interface CreateDeliverabilityTestReportCommandOutput
7878
* Template: { // Template
7979
* TemplateName: "STRING_VALUE",
8080
* TemplateArn: "STRING_VALUE",
81+
* TemplateContent: { // EmailTemplateContent
82+
* Subject: "STRING_VALUE",
83+
* Text: "STRING_VALUE",
84+
* Html: "STRING_VALUE",
85+
* },
8186
* TemplateData: "STRING_VALUE",
8287
* Headers: [
8388
* {

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

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ export interface SendBulkEmailCommandOutput extends SendBulkEmailResponse, __Met
5353
* Template: { // Template
5454
* TemplateName: "STRING_VALUE",
5555
* TemplateArn: "STRING_VALUE",
56+
* TemplateContent: { // EmailTemplateContent
57+
* Subject: "STRING_VALUE",
58+
* Text: "STRING_VALUE",
59+
* Html: "STRING_VALUE",
60+
* },
5661
* TemplateData: "STRING_VALUE",
5762
* Headers: [ // MessageHeaderList
5863
* { // MessageHeader

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

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBea
106106
* Template: { // Template
107107
* TemplateName: "STRING_VALUE",
108108
* TemplateArn: "STRING_VALUE",
109+
* TemplateContent: { // EmailTemplateContent
110+
* Subject: "STRING_VALUE",
111+
* Text: "STRING_VALUE",
112+
* Html: "STRING_VALUE",
113+
* },
109114
* TemplateData: "STRING_VALUE",
110115
* Headers: [
111116
* {

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

+40-27
Original file line numberDiff line numberDiff line change
@@ -693,11 +693,39 @@ export interface MessageHeader {
693693
Value: string | undefined;
694694
}
695695

696+
/**
697+
* <p>The content of the email, composed of a subject line, an HTML part, and a text-only
698+
* part.</p>
699+
* @public
700+
*/
701+
export interface EmailTemplateContent {
702+
/**
703+
* <p>The subject line of the email.</p>
704+
* @public
705+
*/
706+
Subject?: string;
707+
708+
/**
709+
* <p>The email body that will be visible to recipients whose email clients do not display
710+
* HTML.</p>
711+
* @public
712+
*/
713+
Text?: string;
714+
715+
/**
716+
* <p>The HTML body of the email.</p>
717+
* @public
718+
*/
719+
Html?: string;
720+
}
721+
696722
/**
697723
* <p>An object that defines the email template to use for an email message, and the values
698724
* to use for any message variables in that template. An <i>email
699725
* template</i> is a type of message template that contains content that you
700-
* want to define, save, and reuse in email messages that you send.</p>
726+
* want to reuse in email messages that you send. You can specifiy the email template by providing
727+
* the name or ARN of an <i>email template</i>
728+
* previously saved in your Amazon SES account or by providing the full template content.</p>
701729
* @public
702730
*/
703731
export interface Template {
@@ -715,6 +743,17 @@ export interface Template {
715743
*/
716744
TemplateArn?: string;
717745

746+
/**
747+
* <p>The content of the template.</p>
748+
* <note>
749+
* <p>Amazon SES supports only simple substitions when you send email using the
750+
* <code>SendEmail</code> or <code>SendBulkEmail</code> operations and
751+
* you provide the full template content in the request.</p>
752+
* </note>
753+
* @public
754+
*/
755+
TemplateContent?: EmailTemplateContent;
756+
718757
/**
719758
* <p>An object that defines the values to use for message variables in the template. This
720759
* object is a set of key-value pairs. Each key defines a message variable in the template.
@@ -2670,32 +2709,6 @@ export interface CreateEmailIdentityPolicyRequest {
26702709
*/
26712710
export interface CreateEmailIdentityPolicyResponse {}
26722711

2673-
/**
2674-
* <p>The content of the email, composed of a subject line, an HTML part, and a text-only
2675-
* part.</p>
2676-
* @public
2677-
*/
2678-
export interface EmailTemplateContent {
2679-
/**
2680-
* <p>The subject line of the email.</p>
2681-
* @public
2682-
*/
2683-
Subject?: string;
2684-
2685-
/**
2686-
* <p>The email body that will be visible to recipients whose email clients do not display
2687-
* HTML.</p>
2688-
* @public
2689-
*/
2690-
Text?: string;
2691-
2692-
/**
2693-
* <p>The HTML body of the email.</p>
2694-
* @public
2695-
*/
2696-
Html?: string;
2697-
}
2698-
26992712
/**
27002713
* <p>Represents a request to create an email template. For more information, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
27012714
* Developer Guide</a>.</p>

codegen/sdk-codegen/aws-models/sesv2.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -11768,6 +11768,12 @@
1176811768
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the template.</p>"
1176911769
}
1177011770
},
11771+
"TemplateContent": {
11772+
"target": "com.amazonaws.sesv2#EmailTemplateContent",
11773+
"traits": {
11774+
"smithy.api#documentation": "<p>The content of the template.</p>\n <note>\n <p>Amazon SES supports only simple substitions when you send email using the \n <code>SendEmail</code> or <code>SendBulkEmail</code> operations and \n you provide the full template content in the request.</p>\n </note>"
11775+
}
11776+
},
1177111777
"TemplateData": {
1177211778
"target": "com.amazonaws.sesv2#EmailTemplateData",
1177311779
"traits": {
@@ -11782,7 +11788,7 @@
1178211788
}
1178311789
},
1178411790
"traits": {
11785-
"smithy.api#documentation": "<p>An object that defines the email template to use for an email message, and the values\n to use for any message variables in that template. An <i>email\n template</i> is a type of message template that contains content that you\n want to define, save, and reuse in email messages that you send.</p>"
11791+
"smithy.api#documentation": "<p>An object that defines the email template to use for an email message, and the values\n to use for any message variables in that template. An <i>email\n template</i> is a type of message template that contains content that you\n want to reuse in email messages that you send. You can specifiy the email template by providing \n the name or ARN of an <i>email template</i> \n previously saved in your Amazon SES account or by providing the full template content.</p>"
1178611792
}
1178711793
},
1178811794
"com.amazonaws.sesv2#TemplateContent": {

0 commit comments

Comments
 (0)