Jump to Content

Class CreateTemplateCommandProtected

Creates an email template. Email templates enable you to send personalized email to one or more destinations in a single API operation. For more information, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

Example

Use a bare-bones client and the command you need to make an API call.

import { SESClient, CreateTemplateCommand } from "@aws-sdk/client-ses"; // ES Modules import
// const { SESClient, CreateTemplateCommand } = require("@aws-sdk/client-ses"); // CommonJS import
const client = new SESClient(config);
const input = { // CreateTemplateRequest
Template: { // Template
TemplateName: "STRING_VALUE", // required
SubjectPart: "STRING_VALUE",
TextPart: "STRING_VALUE",
HtmlPart: "STRING_VALUE",
},
};
const command = new CreateTemplateCommand(input);
const response = await client.send(command);

Param

CreateTemplateCommandInput

Returns

CreateTemplateCommandOutput

See

Throws

AlreadyExistsException (client fault)

Indicates that a resource could not be created because of a naming conflict.

Throws

InvalidTemplateException (client fault)

Indicates that the template that you specified could not be rendered. This issue may occur when a template refers to a partial that does not exist.

Throws

LimitExceededException (client fault)

Indicates that a resource could not be created because of service limits. For a list of Amazon SES limits, see the Amazon SES Developer Guide.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<CreateTemplateCommandInput, CreateTemplateCommandOutput>

Methods