Template
Provides a resource to create a SES template.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var myTemplate = new Aws.Ses.Template("myTemplate", new Aws.Ses.TemplateArgs
{
Html = "<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>",
Subject = "Greetings, {{name}}!",
Text = @"Hello {{name}},
Your favorite animal is {{favoriteanimal}}.
",
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ses"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ses.NewTemplate(ctx, "myTemplate", &ses.TemplateArgs{
Html: pulumi.String("<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>"),
Subject: pulumi.String("Greetings, {{name}}!"),
Text: pulumi.String(fmt.Sprintf("%v%v", "Hello {{name}},
\n", "Your favorite animal is {{favoriteanimal}}.\n")),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
my_template = aws.ses.Template("myTemplate",
html="<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>",
subject="Greetings, {{name}}!",
text="""Hello {{name}},
Your favorite animal is {{favoriteanimal}}.
""")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myTemplate = new aws.ses.Template("MyTemplate", {
html: "<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>",
subject: "Greetings, {{name}}!",
text: `Hello {{name}},
Your favorite animal is {{favoriteanimal}}.`,
});Create a Template Resource
new Template(name: string, args?: TemplateArgs, opts?: CustomResourceOptions);def Template(resource_name, opts=None, html=None, name=None, subject=None, text=None, __props__=None);func NewTemplate(ctx *Context, name string, args *TemplateArgs, opts ...ResourceOption) (*Template, error)public Template(string name, TemplateArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Template Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Template resource accepts the following input properties:
- Html string
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- Name string
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- Subject string
The subject line of the email.
- Text 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.
- Html string
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- Name string
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- Subject string
The subject line of the email.
- Text 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.
- html string
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- name string
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- subject string
The subject line of the email.
- text 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.
- html str
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- name str
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- subject str
The subject line of the email.
- text str
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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Template resource produces the following output properties:
Look up an Existing Template Resource
Get an existing Template resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TemplateState, opts?: CustomResourceOptions): Templatestatic get(resource_name, id, opts=None, html=None, name=None, subject=None, text=None, __props__=None);func GetTemplate(ctx *Context, name string, id IDInput, state *TemplateState, opts ...ResourceOption) (*Template, error)public static Template Get(string name, Input<string> id, TemplateState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Html string
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- Name string
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- Subject string
The subject line of the email.
- Text 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.
- Html string
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- Name string
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- Subject string
The subject line of the email.
- Text 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.
- html string
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- name string
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- subject string
The subject line of the email.
- text 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.
- html str
The HTML body of the email. Must be less than 500KB in size, including both the text and HTML parts.
- name str
The name of the template. Cannot exceed 64 characters. You will refer to this name when you send email.
- subject str
The subject line of the email.
- text str
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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.