Template

class Template : KotlinCustomResource

Provides a resource to create a SES template.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myTemplate = new aws.ses.Template("MyTemplate", {
name: "MyTemplate",
subject: "Greetings, {{name}}!",
html: "<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>",
text: `Hello {{name}},\x0d
Your favorite animal is {{favoriteanimal}}.`,
});
import pulumi
import pulumi_aws as aws
my_template = aws.ses.Template("MyTemplate",
name="MyTemplate",
subject="Greetings, {{name}}!",
html="<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>",
text="""Hello {{name}},\x0d
Your favorite animal is {{favoriteanimal}}.""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var myTemplate = new Aws.Ses.Template("MyTemplate", new()
{
Name = "MyTemplate",
Subject = "Greetings, {{name}}!",
Html = "<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>",
Text = @"Hello {{name}},
Your favorite animal is {{favoriteanimal}}.",
});
});
 package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ses.NewTemplate(ctx, "MyTemplate", &ses.TemplateArgs{
Name: pulumi.String("MyTemplate"),
Subject: pulumi.String("Greetings, {{name}}!"),
Html: pulumi.String("<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>"),
Text: pulumi.String("Hello {{name}},
\nYour favorite animal is {{favoriteanimal}}."),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ses.Template;
import com.pulumi.aws.ses.TemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var myTemplate = new Template("myTemplate", TemplateArgs.builder()
.name("MyTemplate")
.subject("Greetings, {{name}}!")
.html("<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>")
.text("""
Hello {{name}},
Your favorite animal is {{favoriteanimal}}. """)
.build());
}
}
resources:
myTemplate:
type: aws:ses:Template
name: MyTemplate
properties:
name: MyTemplate
subject: Greetings, {{name}}!
html: <h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>
text: "Hello {{name}},\r\nYour favorite animal is {{favoriteanimal}}."

Import

Using pulumi import, import SES templates using the template name. For example:

$ pulumi import aws:ses/template:Template MyTemplate MyTemplate

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the SES template

Link copied to clipboard
val html: Output<String>?

The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val subject: Output<String>?

The subject line of the email.

Link copied to clipboard
val text: Output<String>?

The email body that will be visible to recipients whose email clients do not display HTML. Must be less than 500KB in size, including both the text and HTML parts.

Link copied to clipboard
val urn: Output<String>