Try AWS Native preview for resources not in the classic version.
aws.ses.Template
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a resource to create a SES template.
Example Usage
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()
{
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 (
"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{
Html: pulumi.String("<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>"),
Subject: pulumi.String("Greetings, {{name}}!"),
Text: pulumi.String("Hello {{name}},
\nYour favorite animal is {{favoriteanimal}}.\n"),
})
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()
.html("<h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>")
.subject("Greetings, {{name}}!")
.text("""
Hello {{name}},
Your favorite animal is {{favoriteanimal}}.
""")
.build());
}
}
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}}.
`,
});
resources:
myTemplate:
type: aws:ses:Template
properties:
html: <h1>Hello {{name}},</h1><p>Your favorite animal is {{favoriteanimal}}.</p>
subject: Greetings, {{name}}!
text: "Hello {{name}},\r\nYour favorite animal is {{favoriteanimal}}.\n"
Create Template Resource
new Template(name: string, args?: TemplateArgs, opts?: CustomResourceOptions);
@overload
def Template(resource_name: str,
opts: Optional[ResourceOptions] = None,
html: Optional[str] = None,
name: Optional[str] = None,
subject: Optional[str] = None,
text: Optional[str] = None)
@overload
def Template(resource_name: str,
args: Optional[TemplateArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewTemplate(ctx *Context, name string, args *TemplateArgs, opts ...ResourceOption) (*Template, error)
public Template(string name, TemplateArgs? args = null, CustomResourceOptions? opts = null)
public Template(String name, TemplateArgs args)
public Template(String name, TemplateArgs args, CustomResourceOptions options)
type: aws:ses:Template
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts 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 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.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Template resource produces the following output properties:
Look up 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): Template
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
html: Optional[str] = None,
name: Optional[str] = None,
subject: Optional[str] = None,
text: Optional[str] = None) -> Template
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)
public static Template get(String name, Output<String> id, TemplateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Arn string
The ARN of the SES template
- 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.
- Arn string
The ARN of the SES template
- 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.
- arn String
The ARN of the SES template
- 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.
- arn string
The ARN of the SES template
- 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.
- arn str
The ARN of the SES template
- 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.
- arn String
The ARN of the SES template
- 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.
Import
Using pulumi import
, import SES templates using the template name. For example:
$ pulumi import aws:ses/template:Template MyTemplate MyTemplate
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.