Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class GetTemplateCommandProtected

Displays the template object (which includes the Subject line, HTML part and text part) for the template you specify.

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, GetTemplateCommand } from "@aws-sdk/client-ses"; // ES Modules import
// const { SESClient, GetTemplateCommand } = require("@aws-sdk/client-ses"); // CommonJS import
const client = new SESClient(config);
const input = { // GetTemplateRequest
TemplateName: "STRING_VALUE", // required
};
const command = new GetTemplateCommand(input);
const response = await client.send(command);
// { // GetTemplateResponse
// Template: { // Template
// TemplateName: "STRING_VALUE", // required
// SubjectPart: "STRING_VALUE",
// TextPart: "STRING_VALUE",
// HtmlPart: "STRING_VALUE",
// },
// };

Param

GetTemplateCommandInput

Returns

GetTemplateCommandOutput

See

Throws

TemplateDoesNotExistException (client fault)

Indicates that the Template object you specified does not exist in your Amazon SES account.

Throws

SESServiceException

Base exception class for all service exceptions from SES service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods