1. Registry
  2. Packages
  3. Okta Provider
  4. API Docs
  5. TemplateSms
Viewing docs for Okta v7.0.0
published on Friday, Sep 11, 2026 by Pulumi
okta logo
Viewing docs for Okta v7.0.0
published on Friday, Sep 11, 2026 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.TemplateSms("example", {
        type: "SMS_VERIFY_CODE",
        template: "Your ${org.name} code is: ${code}",
        translations: {
            en: "Your ${org.name} code is: ${code}",
            es: "Tu código de ${org.name} es: ${code}.",
        },
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.TemplateSms("example",
        type="SMS_VERIFY_CODE",
        template="Your ${org.name} code is: ${code}",
        translations={
            "en": "Your ${org.name} code is: ${code}",
            "es": "Tu código de ${org.name} es: ${code}.",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v7/go/okta"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := okta.NewTemplateSms(ctx, "example", &okta.TemplateSmsArgs{
    			Type:     pulumi.String("SMS_VERIFY_CODE"),
    			Template: pulumi.String("Your ${org.name} code is: ${code}"),
    			Translations: pulumi.StringMap{
    				"en": pulumi.String("Your ${org.name} code is: ${code}"),
    				"es": pulumi.String("Tu código de ${org.name} es: ${code}."),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Okta.TemplateSms("example", new()
        {
            Type = "SMS_VERIFY_CODE",
            Template = "Your ${org.name} code is: ${code}",
            Translations = 
            {
                { "en", "Your ${org.name} code is: ${code}" },
                { "es", "Tu código de ${org.name} es: ${code}." },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.TemplateSms;
    import com.pulumi.okta.TemplateSmsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 TemplateSms("example", TemplateSmsArgs.builder()
                .type("SMS_VERIFY_CODE")
                .template("Your ${org.name} code is: ${code}")
                .translations(Map.ofEntries(
                    Map.entry("en", "Your ${org.name} code is: ${code}"),
                    Map.entry("es", "Tu código de ${org.name} es: ${code}.")
                ))
                .build());
    
        }
    }
    
    resources:
      example:
        type: okta:TemplateSms
        properties:
          type: SMS_VERIFY_CODE
          template: 'Your $${org.name} code is: $${code}'
          translations:
            en: 'Your $${org.name} code is: $${code}'
            es: 'Tu código de $${org.name} es: $${code}.'
    
    pulumi {
      required_providers {
        okta = {
          source = "pulumi/okta"
        }
      }
    }
    
    resource "okta_templatesms" "example" {
      type     = "SMS_VERIFY_CODE"
      template = "Your $${org.name} code is: $${code}"
      translations = {
        "en" = "Your $${org.name} code is: $${code}"
        "es" = "Tu código de $${org.name} es: $${code}."
      }
    }
    

    Create TemplateSms Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TemplateSms(name: string, args?: TemplateSmsArgs, opts?: CustomResourceOptions);
    @overload
    def TemplateSms(resource_name: str,
                    args: Optional[TemplateSmsArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TemplateSms(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    name: Optional[str] = None,
                    template: Optional[str] = None,
                    translations: Optional[Mapping[str, str]] = None,
                    type: Optional[str] = None)
    func NewTemplateSms(ctx *Context, name string, args *TemplateSmsArgs, opts ...ResourceOption) (*TemplateSms, error)
    public TemplateSms(string name, TemplateSmsArgs? args = null, CustomResourceOptions? opts = null)
    public TemplateSms(String name, TemplateSmsArgs args)
    public TemplateSms(String name, TemplateSmsArgs args, CustomResourceOptions options)
    
    type: okta:TemplateSms
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "okta_template_sms" "name" {
        # resource properties
    }

    Parameters

    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.
    args TemplateSmsArgs
    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 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.
    name String
    The unique name of the resource.
    args TemplateSmsArgs
    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 templateSmsResource = new Okta.TemplateSms("templateSmsResource", new()
    {
        Name = "string",
        Template = "string",
        Translations = 
        {
            { "string", "string" },
        },
        Type = "string",
    });
    
    example, err := okta.NewTemplateSms(ctx, "templateSmsResource", &okta.TemplateSmsArgs{
    	Name:     pulumi.String("string"),
    	Template: pulumi.String("string"),
    	Translations: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    resource "okta_template_sms" "templateSmsResource" {
      lifecycle {
        create_before_destroy = true
      }
      name     = "string"
      template = "string"
      translations = {
        "string" = "string"
      }
      type = "string"
    }
    
    var templateSmsResource = new TemplateSms("templateSmsResource", TemplateSmsArgs.builder()
        .name("string")
        .template("string")
        .translations(Map.of("string", "string"))
        .type("string")
        .build());
    
    template_sms_resource = okta.TemplateSms("templateSmsResource",
        name="string",
        template="string",
        translations={
            "string": "string",
        },
        type="string")
    
    const templateSmsResource = new okta.TemplateSms("templateSmsResource", {
        name: "string",
        template: "string",
        translations: {
            string: "string",
        },
        type: "string",
    });
    
    type: okta:TemplateSms
    properties:
        name: string
        template: string
        translations:
            string: string
        type: string
    

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

    Name string
    Human-readable name of the Template
    Template string
    Text of the Template, including any macros
    Translations Dictionary<string, string>
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    Type string
    Type of the Template
    Name string
    Human-readable name of the Template
    Template string
    Text of the Template, including any macros
    Translations map[string]string
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    Type string
    Type of the Template
    name string
    Human-readable name of the Template
    template string
    Text of the Template, including any macros
    translations map(string)
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type string
    Type of the Template
    name String
    Human-readable name of the Template
    template String
    Text of the Template, including any macros
    translations Map<String,String>
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type String
    Type of the Template
    name string
    Human-readable name of the Template
    template string
    Text of the Template, including any macros
    translations {[key: string]: string}
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type string
    Type of the Template
    name str
    Human-readable name of the Template
    template str
    Text of the Template, including any macros
    translations Mapping[str, str]
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type str
    Type of the Template
    name String
    Human-readable name of the Template
    template String
    Text of the Template, including any macros
    translations Map<String>
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type String
    Type of the Template

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TemplateSms resource produces the following output properties:

    Created string
    Created
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    LastUpdated
    Created string
    Created
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    LastUpdated
    created string
    Created
    id string
    The provider-assigned unique ID for this managed resource.
    last_updated string
    LastUpdated
    created String
    Created
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    LastUpdated
    created string
    Created
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    LastUpdated
    created str
    Created
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    LastUpdated
    created String
    Created
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    LastUpdated

    Look up 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,
            created: Optional[str] = None,
            last_updated: Optional[str] = None,
            name: Optional[str] = None,
            template: Optional[str] = None,
            translations: Optional[Mapping[str, str]] = 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)
    public static TemplateSms get(String name, Output<String> id, TemplateSmsState state, CustomResourceOptions options)
    resources:  _:    type: okta:TemplateSms    get:      id: ${id}
    import {
      to = okta_template_sms.example
      id = "${id}"
    }
    
    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:
    Created string
    Created
    LastUpdated string
    LastUpdated
    Name string
    Human-readable name of the Template
    Template string
    Text of the Template, including any macros
    Translations Dictionary<string, string>
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    Type string
    Type of the Template
    Created string
    Created
    LastUpdated string
    LastUpdated
    Name string
    Human-readable name of the Template
    Template string
    Text of the Template, including any macros
    Translations map[string]string
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    Type string
    Type of the Template
    created string
    Created
    last_updated string
    LastUpdated
    name string
    Human-readable name of the Template
    template string
    Text of the Template, including any macros
    translations map(string)
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type string
    Type of the Template
    created String
    Created
    lastUpdated String
    LastUpdated
    name String
    Human-readable name of the Template
    template String
    Text of the Template, including any macros
    translations Map<String,String>
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type String
    Type of the Template
    created string
    Created
    lastUpdated string
    LastUpdated
    name string
    Human-readable name of the Template
    template string
    Text of the Template, including any macros
    translations {[key: string]: string}
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type string
    Type of the Template
    created str
    Created
    last_updated str
    LastUpdated
    name str
    Human-readable name of the Template
    template str
    Text of the Template, including any macros
    translations Mapping[str, str]
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type str
    Type of the Template
    created String
    Created
    lastUpdated String
    LastUpdated
    name String
    Human-readable name of the Template
    template String
    Text of the Template, including any macros
    translations Map<String>
    Template translations are optionally provided when you want to localize the SMS messages. Keys are IETF BCP 47 language tags, values are the translated template text.
    type String
    Type of the Template

    Import

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Viewing docs for Okta v7.0.0
    published on Friday, Sep 11, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial