Skip to content

Commit

Permalink
feat(client-sesv2): This release enables customers to provide the ema…
Browse files Browse the repository at this point in the history
…il template content in the SESv2 SendEmail and SendBulkEmail APIs instead of the name or the ARN of a stored email template.
  • Loading branch information
awstools committed Oct 31, 2024
1 parent 6908bf2 commit 2f50238
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 29 deletions.
2 changes: 1 addition & 1 deletion clients/client-sesv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and code samples that demonstrate how to use Amazon SES API v2 features programm

## Installing

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

- `npm install @aws-sdk/client-sesv2`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export interface CreateDeliverabilityTestReportCommandOutput
* Template: { // Template
* TemplateName: "STRING_VALUE",
* TemplateArn: "STRING_VALUE",
* TemplateContent: { // EmailTemplateContent
* Subject: "STRING_VALUE",
* Text: "STRING_VALUE",
* Html: "STRING_VALUE",
* },
* TemplateData: "STRING_VALUE",
* Headers: [
* {
Expand Down
5 changes: 5 additions & 0 deletions clients/client-sesv2/src/commands/SendBulkEmailCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ export interface SendBulkEmailCommandOutput extends SendBulkEmailResponse, __Met
* Template: { // Template
* TemplateName: "STRING_VALUE",
* TemplateArn: "STRING_VALUE",
* TemplateContent: { // EmailTemplateContent
* Subject: "STRING_VALUE",
* Text: "STRING_VALUE",
* Html: "STRING_VALUE",
* },
* TemplateData: "STRING_VALUE",
* Headers: [ // MessageHeaderList
* { // MessageHeader
Expand Down
5 changes: 5 additions & 0 deletions clients/client-sesv2/src/commands/SendEmailCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ export interface SendEmailCommandOutput extends SendEmailResponse, __MetadataBea
* Template: { // Template
* TemplateName: "STRING_VALUE",
* TemplateArn: "STRING_VALUE",
* TemplateContent: { // EmailTemplateContent
* Subject: "STRING_VALUE",
* Text: "STRING_VALUE",
* Html: "STRING_VALUE",
* },
* TemplateData: "STRING_VALUE",
* Headers: [
* {
Expand Down
67 changes: 40 additions & 27 deletions clients/client-sesv2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,39 @@ export interface MessageHeader {
Value: string | undefined;
}

/**
* <p>The content of the email, composed of a subject line, an HTML part, and a text-only
* part.</p>
* @public
*/
export interface EmailTemplateContent {
/**
* <p>The subject line of the email.</p>
* @public
*/
Subject?: string;

/**
* <p>The email body that will be visible to recipients whose email clients do not display
* HTML.</p>
* @public
*/
Text?: string;

/**
* <p>The HTML body of the email.</p>
* @public
*/
Html?: string;
}

/**
* <p>An object that defines the email template to use for an email message, and the values
* to use for any message variables in that template. An <i>email
* template</i> is a type of message template that contains content that you
* want to define, save, and reuse in email messages that you send.</p>
* want to reuse in email messages that you send. You can specifiy the email template by providing
* the name or ARN of an <i>email template</i>
* previously saved in your Amazon SES account or by providing the full template content.</p>
* @public
*/
export interface Template {
Expand All @@ -715,6 +743,17 @@ export interface Template {
*/
TemplateArn?: string;

/**
* <p>The content of the template.</p>
* <note>
* <p>Amazon SES supports only simple substitions when you send email using the
* <code>SendEmail</code> or <code>SendBulkEmail</code> operations and
* you provide the full template content in the request.</p>
* </note>
* @public
*/
TemplateContent?: EmailTemplateContent;

/**
* <p>An object that defines the values to use for message variables in the template. This
* object is a set of key-value pairs. Each key defines a message variable in the template.
Expand Down Expand Up @@ -2670,32 +2709,6 @@ export interface CreateEmailIdentityPolicyRequest {
*/
export interface CreateEmailIdentityPolicyResponse {}

/**
* <p>The content of the email, composed of a subject line, an HTML part, and a text-only
* part.</p>
* @public
*/
export interface EmailTemplateContent {
/**
* <p>The subject line of the email.</p>
* @public
*/
Subject?: string;

/**
* <p>The email body that will be visible to recipients whose email clients do not display
* HTML.</p>
* @public
*/
Text?: string;

/**
* <p>The HTML body of the email.</p>
* @public
*/
Html?: string;
}

/**
* <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
* Developer Guide</a>.</p>
Expand Down
8 changes: 7 additions & 1 deletion codegen/sdk-codegen/aws-models/sesv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11768,6 +11768,12 @@
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the template.</p>"
}
},
"TemplateContent": {
"target": "com.amazonaws.sesv2#EmailTemplateContent",
"traits": {
"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>"
}
},
"TemplateData": {
"target": "com.amazonaws.sesv2#EmailTemplateData",
"traits": {
Expand All @@ -11782,7 +11788,7 @@
}
},
"traits": {
"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>"
"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>"
}
},
"com.amazonaws.sesv2#TemplateContent": {
Expand Down

0 comments on commit 2f50238

Please sign in to comment.