published on Sunday, Oct 11, 2026 by Descope
published on Sunday, Oct 11, 2026 by Descope
Manages a single email message template for an authentication method in a Descope project. The active template is selected on the method’s settings resource, e.g. the emailTemplateId attribute of descope.MagiclinkSettings.
Create EmailTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EmailTemplate(name: string, args: EmailTemplateArgs, opts?: CustomResourceOptions);@overload
def EmailTemplate(resource_name: str,
args: EmailTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EmailTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
method: Optional[str] = None,
project_id: Optional[str] = None,
subject: Optional[str] = None,
html_body: Optional[str] = None,
name: Optional[str] = None,
plain_text_body: Optional[str] = None,
use_plain_text_body: Optional[bool] = None)func NewEmailTemplate(ctx *Context, name string, args EmailTemplateArgs, opts ...ResourceOption) (*EmailTemplate, error)public EmailTemplate(string name, EmailTemplateArgs args, CustomResourceOptions? opts = null)
public EmailTemplate(String name, EmailTemplateArgs args)
public EmailTemplate(String name, EmailTemplateArgs args, CustomResourceOptions options)
type: descope:EmailTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "descope_email_template" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args EmailTemplateArgs
- 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 EmailTemplateArgs
- 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 EmailTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EmailTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EmailTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var emailTemplateResource = new Descope.EmailTemplate("emailTemplateResource", new()
{
Method = "string",
ProjectId = "string",
Subject = "string",
HtmlBody = "string",
Name = "string",
PlainTextBody = "string",
UsePlainTextBody = false,
});
example, err := descope.NewEmailTemplate(ctx, "emailTemplateResource", &descope.EmailTemplateArgs{
Method: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Subject: pulumi.String("string"),
HtmlBody: pulumi.String("string"),
Name: pulumi.String("string"),
PlainTextBody: pulumi.String("string"),
UsePlainTextBody: pulumi.Bool(false),
})
resource "descope_email_template" "emailTemplateResource" {
lifecycle {
create_before_destroy = true
}
method = "string"
project_id = "string"
subject = "string"
html_body = "string"
name = "string"
plain_text_body = "string"
use_plain_text_body = false
}
var emailTemplateResource = new EmailTemplate("emailTemplateResource", EmailTemplateArgs.builder()
.method("string")
.projectId("string")
.subject("string")
.htmlBody("string")
.name("string")
.plainTextBody("string")
.usePlainTextBody(false)
.build());
email_template_resource = descope.EmailTemplate("emailTemplateResource",
method="string",
project_id="string",
subject="string",
html_body="string",
name="string",
plain_text_body="string",
use_plain_text_body=False)
const emailTemplateResource = new descope.EmailTemplate("emailTemplateResource", {
method: "string",
projectId: "string",
subject: "string",
htmlBody: "string",
name: "string",
plainTextBody: "string",
usePlainTextBody: false,
});
type: descope:EmailTemplate
properties:
htmlBody: string
method: string
name: string
plainTextBody: string
projectId: string
subject: string
usePlainTextBody: false
EmailTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The EmailTemplate resource accepts the following input properties:
- Method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - Project
Id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- Subject string
- The subject line of emails sent with this template.
- Html
Body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - Name string
- A name for the email template that's unique among the templates of the same authentication method.
- Plain
Text stringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - Use
Plain boolText Body - Whether emails are sent with the plain text body instead of the HTML body.
- Method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - Project
Id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- Subject string
- The subject line of emails sent with this template.
- Html
Body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - Name string
- A name for the email template that's unique among the templates of the same authentication method.
- Plain
Text stringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - Use
Plain boolText Body - Whether emails are sent with the plain text body instead of the HTML body.
- method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - project_
id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject string
- The subject line of emails sent with this template.
- html_
body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - name string
- A name for the email template that's unique among the templates of the same authentication method.
- plain_
text_ stringbody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - use_
plain_ booltext_ body - Whether emails are sent with the plain text body instead of the HTML body.
- method String
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - project
Id String - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject String
- The subject line of emails sent with this template.
- html
Body String - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - name String
- A name for the email template that's unique among the templates of the same authentication method.
- plain
Text StringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - use
Plain BooleanText Body - Whether emails are sent with the plain text body instead of the HTML body.
- method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - project
Id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject string
- The subject line of emails sent with this template.
- html
Body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - name string
- A name for the email template that's unique among the templates of the same authentication method.
- plain
Text stringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - use
Plain booleanText Body - Whether emails are sent with the plain text body instead of the HTML body.
- method str
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - project_
id str - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject str
- The subject line of emails sent with this template.
- html_
body str - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - name str
- A name for the email template that's unique among the templates of the same authentication method.
- plain_
text_ strbody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - use_
plain_ booltext_ body - Whether emails are sent with the plain text body instead of the HTML body.
- method String
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - project
Id String - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject String
- The subject line of emails sent with this template.
- html
Body String - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - name String
- A name for the email template that's unique among the templates of the same authentication method.
- plain
Text StringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - use
Plain BooleanText Body - Whether emails are sent with the plain text body instead of the HTML body.
Outputs
All input properties are implicitly available as output properties. Additionally, the EmailTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing EmailTemplate Resource
Get an existing EmailTemplate 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?: EmailTemplateState, opts?: CustomResourceOptions): EmailTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
html_body: Optional[str] = None,
method: Optional[str] = None,
name: Optional[str] = None,
plain_text_body: Optional[str] = None,
project_id: Optional[str] = None,
subject: Optional[str] = None,
use_plain_text_body: Optional[bool] = None) -> EmailTemplatefunc GetEmailTemplate(ctx *Context, name string, id IDInput, state *EmailTemplateState, opts ...ResourceOption) (*EmailTemplate, error)public static EmailTemplate Get(string name, Input<string> id, EmailTemplateState? state, CustomResourceOptions? opts = null)public static EmailTemplate get(String name, Output<String> id, EmailTemplateState state, CustomResourceOptions options)resources: existingEmailTemplate: type: descope:EmailTemplate get: id: ${id}import {
to = descope_email_template.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state EmailTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state EmailTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state EmailTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state EmailTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Html
Body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - Method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - Name string
- A name for the email template that's unique among the templates of the same authentication method.
- Plain
Text stringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - Project
Id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- Subject string
- The subject line of emails sent with this template.
- Use
Plain boolText Body - Whether emails are sent with the plain text body instead of the HTML body.
- Html
Body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - Method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - Name string
- A name for the email template that's unique among the templates of the same authentication method.
- Plain
Text stringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - Project
Id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- Subject string
- The subject line of emails sent with this template.
- Use
Plain boolText Body - Whether emails are sent with the plain text body instead of the HTML body.
- html_
body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - name string
- A name for the email template that's unique among the templates of the same authentication method.
- plain_
text_ stringbody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - project_
id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject string
- The subject line of emails sent with this template.
- use_
plain_ booltext_ body - Whether emails are sent with the plain text body instead of the HTML body.
- html
Body String - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - method String
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - name String
- A name for the email template that's unique among the templates of the same authentication method.
- plain
Text StringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - project
Id String - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject String
- The subject line of emails sent with this template.
- use
Plain BooleanText Body - Whether emails are sent with the plain text body instead of the HTML body.
- html
Body string - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - method string
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - name string
- A name for the email template that's unique among the templates of the same authentication method.
- plain
Text stringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - project
Id string - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject string
- The subject line of emails sent with this template.
- use
Plain booleanText Body - Whether emails are sent with the plain text body instead of the HTML body.
- html_
body str - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - method str
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - name str
- A name for the email template that's unique among the templates of the same authentication method.
- plain_
text_ strbody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - project_
id str - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject str
- The subject line of emails sent with this template.
- use_
plain_ booltext_ body - Whether emails are sent with the plain text body instead of the HTML body.
- html
Body String - The HTML body of emails sent with this template. Required unless
usePlainTextBodyis enabled. Template macros such as{{.code}}can be used to insert dynamic values. - method String
- The authentication method the email template is used with, e.g.
magiclinkorotp. Changing this value will require the resource to be deleted and recreated. - name String
- A name for the email template that's unique among the templates of the same authentication method.
- plain
Text StringBody - The plain text body of emails sent with this template. Required when
usePlainTextBodyis enabled. - project
Id String - The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
- subject String
- The subject line of emails sent with this template.
- use
Plain BooleanText Body - Whether emails are sent with the plain text body instead of the HTML body.
Package Details
- Repository
- descope descope/pulumi-descope
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
descopeTerraform Provider.
published on Sunday, Oct 11, 2026 by Descope