TemplateArgs

data class TemplateArgs(val html: Output<String>? = null, val name: Output<String>? = null, val subject: Output<String>? = null, val text: Output<String>? = null) : ConvertibleToJava<TemplateArgs>

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

Constructors

Link copied to clipboard
constructor(html: Output<String>? = null, name: Output<String>? = null, subject: Output<String>? = null, text: Output<String>? = null)

Properties

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

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 name: Output<String>? = null

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

Link copied to clipboard
val subject: Output<String>? = null

The subject line of the email.

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

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.

Functions

Link copied to clipboard
open override fun toJava(): TemplateArgs