Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

TemplateSms

Creates an Okta SMS Template.

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

Example Usage

using Pulumi;
using Okta = Pulumi.Okta;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Okta.TemplateSms("example", new Okta.TemplateSmsArgs
        {
            Template = $"Your {org.Name} code is: {code}",
            Translations = 
            {
                new Okta.Inputs.TemplateSmsTranslationArgs
                {
                    Language = "en",
                    Template = $"Your {org.Name} code is: {code}",
                },
                new Okta.Inputs.TemplateSmsTranslationArgs
                {
                    Language = "es",
                    Template = $"Tu código de {org.Name} es: {code}.",
                },
            },
            Type = "SMS_VERIFY_CODE",
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-okta/sdk/v2/go/okta"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := okta.NewTemplateSms(ctx, "example", &okta.TemplateSmsArgs{
            Template: pulumi.String(fmt.Sprintf("%v%v%v%v", "Your ", org.Name, " code is: ", code)),
            Translations: okta.TemplateSmsTranslationArray{
                &okta.TemplateSmsTranslationArgs{
                    Language: pulumi.String("en"),
                    Template: pulumi.String(fmt.Sprintf("%v%v%v%v", "Your ", org.Name, " code is: ", code)),
                },
                &okta.TemplateSmsTranslationArgs{
                    Language: pulumi.String("es"),
                    Template: pulumi.String(fmt.Sprintf("%v%v%v%v%v", "Tu código de ", org.Name, " es: ", code, ".")),
                },
            },
            Type: pulumi.String("SMS_VERIFY_CODE"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_okta as okta

example = okta.TemplateSms("example",
    template=f"Your {org['name']} code is: {code}",
    translations=[
        okta.TemplateSmsTranslationArgs(
            language="en",
            template=f"Your {org['name']} code is: {code}",
        ),
        okta.TemplateSmsTranslationArgs(
            language="es",
            template=f"Tu código de {org['name']} es: {code}.",
        ),
    ],
    type="SMS_VERIFY_CODE")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.TemplateSms("example", {
    template: "Your ${org.name} code is: ${code}",
    translations: [
        {
            language: "en",
            template: "Your ${org.name} code is: ${code}",
        },
        {
            language: "es",
            template: "Tu código de ${org.name} es: ${code}.",
        },
    ],
    type: "SMS_VERIFY_CODE",
});

Create a TemplateSms Resource

new TemplateSms(name: string, args: TemplateSmsArgs, opts?: CustomResourceOptions);
def TemplateSms(resource_name: str, opts: Optional[ResourceOptions] = None, template: Optional[str] = None, translations: Optional[Sequence[TemplateSmsTranslationArgs]] = None, type: Optional[str] = None)
func NewTemplateSms(ctx *Context, name string, args TemplateSmsArgs, opts ...ResourceOption) (*TemplateSms, error)
public TemplateSms(string name, TemplateSmsArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TemplateSmsArgs
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 TemplateSmsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TemplateSmsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

TemplateSms Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The TemplateSms resource accepts the following input properties:

Template string

The SMS message.

Type string

SMS template type

Translations List<TemplateSmsTranslationArgs>

Set of translations for a particular template.

Template string

The SMS message.

Type string

SMS template type

Translations []TemplateSmsTranslation

Set of translations for a particular template.

template string

The SMS message.

type string

SMS template type

translations TemplateSmsTranslation[]

Set of translations for a particular template.

template str

The SMS message.

type str

SMS template type

translations Sequence[TemplateSmsTranslationArgs]

Set of translations for a particular template.

Outputs

All input properties are implicitly available as output properties. Additionally, the TemplateSms 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing TemplateSms Resource

Get an existing TemplateSms 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?: TemplateSmsState, opts?: CustomResourceOptions): TemplateSms
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, template: Optional[str] = None, translations: Optional[Sequence[TemplateSmsTranslationArgs]] = None, type: Optional[str] = None) -> TemplateSms
func GetTemplateSms(ctx *Context, name string, id IDInput, state *TemplateSmsState, opts ...ResourceOption) (*TemplateSms, error)
public static TemplateSms Get(string name, Input<string> id, TemplateSmsState? 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:

Template string

The SMS message.

Translations List<TemplateSmsTranslationArgs>

Set of translations for a particular template.

Type string

SMS template type

Template string

The SMS message.

Translations []TemplateSmsTranslation

Set of translations for a particular template.

Type string

SMS template type

template string

The SMS message.

translations TemplateSmsTranslation[]

Set of translations for a particular template.

type string

SMS template type

template str

The SMS message.

translations Sequence[TemplateSmsTranslationArgs]

Set of translations for a particular template.

type str

SMS template type

Supporting Types

TemplateSmsTranslation

Language string

The language to map the template to.

Template string

The SMS message.

Language string

The language to map the template to.

Template string

The SMS message.

language string

The language to map the template to.

template string

The SMS message.

language str

The language to map the template to.

template str

The SMS message.

Import

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

 $ pulumi import okta:index/templateSms:TemplateSms example <template type>

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes
This Pulumi package is based on the okta Terraform Provider.