Okta

v3.16.0 published on Wednesday, Sep 28, 2022 by Pulumi

Email

DEPRECATED This resource is deprecated. Switch over to the email_customization resource.

Creates an Okta Email Template.

This resource allows you to create and configure an Okta Email Template.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.Template.Email("example", new()
    {
        Translations = new[]
        {
            new Okta.Template.Inputs.EmailTranslationArgs
            {
                Language = "en",
                Subject = "Stuff",
                Template = "Hi $user.firstName,<br/><br/>Blah blah $resetPasswordLink",
            },
            new Okta.Template.Inputs.EmailTranslationArgs
            {
                Language = "es",
                Subject = "Cosas",
                Template = "Hola $user.firstName,<br/><br/>Puedo ir al bano $resetPasswordLink",
            },
        },
        Type = "email.forgotPassword",
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta/template"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := template.NewEmail(ctx, "example", &template.EmailArgs{
			Translations: template.EmailTranslationArray{
				&template.EmailTranslationArgs{
					Language: pulumi.String("en"),
					Subject:  pulumi.String("Stuff"),
					Template: pulumi.String(fmt.Sprintf("Hi $user.firstName,<br/><br/>Blah blah $resetPasswordLink")),
				},
				&template.EmailTranslationArgs{
					Language: pulumi.String("es"),
					Subject:  pulumi.String("Cosas"),
					Template: pulumi.String(fmt.Sprintf("Hola $user.firstName,<br/><br/>Puedo ir al bano $resetPasswordLink")),
				},
			},
			Type: pulumi.String("email.forgotPassword"),
		})
		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.okta.template.Email;
import com.pulumi.okta.template.EmailArgs;
import com.pulumi.okta.template.inputs.EmailTranslationArgs;
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 example = new Email("example", EmailArgs.builder()        
            .translations(            
                EmailTranslationArgs.builder()
                    .language("en")
                    .subject("Stuff")
                    .template("Hi $user.firstName,<br/><br/>Blah blah $resetPasswordLink")
                    .build(),
                EmailTranslationArgs.builder()
                    .language("es")
                    .subject("Cosas")
                    .template("Hola $user.firstName,<br/><br/>Puedo ir al bano $resetPasswordLink")
                    .build())
            .type("email.forgotPassword")
            .build());

    }
}
import pulumi
import pulumi_okta as okta

example = okta.template.Email("example",
    translations=[
        okta.template.EmailTranslationArgs(
            language="en",
            subject="Stuff",
            template="Hi $user.firstName,<br/><br/>Blah blah $resetPasswordLink",
        ),
        okta.template.EmailTranslationArgs(
            language="es",
            subject="Cosas",
            template="Hola $user.firstName,<br/><br/>Puedo ir al bano $resetPasswordLink",
        ),
    ],
    type="email.forgotPassword")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.template.Email("example", {
    translations: [
        {
            language: "en",
            subject: "Stuff",
            template: "Hi $user.firstName,<br/><br/>Blah blah $resetPasswordLink",
        },
        {
            language: "es",
            subject: "Cosas",
            template: "Hola $user.firstName,<br/><br/>Puedo ir al bano $resetPasswordLink",
        },
    ],
    type: "email.forgotPassword",
});
resources:
  example:
    type: okta:template:Email
    properties:
      translations:
        - language: en
          subject: Stuff
          template: Hi $user.firstName,<br/><br/>Blah blah $resetPasswordLink
        - language: es
          subject: Cosas
          template: Hola $user.firstName,<br/><br/>Puedo ir al bano $resetPasswordLink
      type: email.forgotPassword

Create a Email Resource

new Email(name: string, args: EmailArgs, opts?: CustomResourceOptions);
@overload
def Email(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          default_language: Optional[str] = None,
          translations: Optional[Sequence[EmailTranslationArgs]] = None,
          type: Optional[str] = None)
@overload
def Email(resource_name: str,
          args: EmailArgs,
          opts: Optional[ResourceOptions] = None)
func NewEmail(ctx *Context, name string, args EmailArgs, opts ...ResourceOption) (*Email, error)
public Email(string name, EmailArgs args, CustomResourceOptions? opts = null)
public Email(String name, EmailArgs args)
public Email(String name, EmailArgs args, CustomResourceOptions options)
type: okta:template:Email
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EmailArgs
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 EmailArgs
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 EmailArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EmailArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EmailArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Email 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 Email resource accepts the following input properties:

Translations List<EmailTranslationArgs>

Set of translations for a particular template.

Type string

Email template type

DefaultLanguage string

The default language, by default is set to "en".

Translations []EmailTranslationArgs

Set of translations for a particular template.

Type string

Email template type

DefaultLanguage string

The default language, by default is set to "en".

translations List<EmailTranslationArgs>

Set of translations for a particular template.

type String

Email template type

defaultLanguage String

The default language, by default is set to "en".

translations EmailTranslationArgs[]

Set of translations for a particular template.

type string

Email template type

defaultLanguage string

The default language, by default is set to "en".

translations Sequence[EmailTranslationArgs]

Set of translations for a particular template.

type str

Email template type

default_language str

The default language, by default is set to "en".

translations List<Property Map>

Set of translations for a particular template.

type String

Email template type

defaultLanguage String

The default language, by default is set to "en".

Outputs

All input properties are implicitly available as output properties. Additionally, the Email 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 str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Email Resource

Get an existing Email 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?: EmailState, opts?: CustomResourceOptions): Email
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        default_language: Optional[str] = None,
        translations: Optional[Sequence[EmailTranslationArgs]] = None,
        type: Optional[str] = None) -> Email
func GetEmail(ctx *Context, name string, id IDInput, state *EmailState, opts ...ResourceOption) (*Email, error)
public static Email Get(string name, Input<string> id, EmailState? state, CustomResourceOptions? opts = null)
public static Email get(String name, Output<String> id, EmailState 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.
The following state arguments are supported:
DefaultLanguage string

The default language, by default is set to "en".

Translations List<EmailTranslationArgs>

Set of translations for a particular template.

Type string

Email template type

DefaultLanguage string

The default language, by default is set to "en".

Translations []EmailTranslationArgs

Set of translations for a particular template.

Type string

Email template type

defaultLanguage String

The default language, by default is set to "en".

translations List<EmailTranslationArgs>

Set of translations for a particular template.

type String

Email template type

defaultLanguage string

The default language, by default is set to "en".

translations EmailTranslationArgs[]

Set of translations for a particular template.

type string

Email template type

default_language str

The default language, by default is set to "en".

translations Sequence[EmailTranslationArgs]

Set of translations for a particular template.

type str

Email template type

defaultLanguage String

The default language, by default is set to "en".

translations List<Property Map>

Set of translations for a particular template.

type String

Email template type

Supporting Types

EmailTranslation

Language string

The language to map the template to.

Subject string

The email subject line.

Template string

The email body.

Language string

The language to map the template to.

Subject string

The email subject line.

Template string

The email body.

language String

The language to map the template to.

subject String

The email subject line.

template String

The email body.

language string

The language to map the template to.

subject string

The email subject line.

template string

The email body.

language str

The language to map the template to.

subject str

The email subject line.

template str

The email body.

language String

The language to map the template to.

subject String

The email subject line.

template String

The email body.

Import

An Okta Email Template can be imported via the template type.

 $ pulumi import okta:template/email:Email example &#60;template type&#62;

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes

This Pulumi package is based on the okta Terraform Provider.