1. Packages
  2. Okta
  3. API Docs
  4. TemplateSms
Okta v4.11.0 published on Tuesday, Sep 17, 2024 by Pulumi

okta.TemplateSms

Explore with Pulumi AI

okta logo
Okta v4.11.0 published on Tuesday, Sep 17, 2024 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: [
            {
                language: "en",
                template: "Your ${org.name} code is: ${code}",
            },
            {
                language: "es",
                template: "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=[
            {
                "language": "en",
                "template": "Your ${org.name} code is: ${code}",
            },
            {
                "language": "es",
                "template": "Tu código de ${org.name} es: ${code}.",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/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: okta.TemplateSmsTranslationArray{
    				&okta.TemplateSmsTranslationArgs{
    					Language: pulumi.String("en"),
    					Template: pulumi.String("Your ${org.name} code is: ${code}"),
    				},
    				&okta.TemplateSmsTranslationArgs{
    					Language: pulumi.String("es"),
    					Template: 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 = new[]
            {
                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}.",
                },
            },
        });
    
    });
    
    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 com.pulumi.okta.inputs.TemplateSmsTranslationArgs;
    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 TemplateSms("example", TemplateSmsArgs.builder()
                .type("SMS_VERIFY_CODE")
                .template("Your ${org.name} code is: ${code}")
                .translations(            
                    TemplateSmsTranslationArgs.builder()
                        .language("en")
                        .template("Your ${org.name} code is: ${code}")
                        .build(),
                    TemplateSmsTranslationArgs.builder()
                        .language("es")
                        .template("Tu código de ${org.name} es: ${code}.")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: okta:TemplateSms
        properties:
          type: SMS_VERIFY_CODE
          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}.'
    

    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: TemplateSmsArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TemplateSms(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    template: Optional[str] = None,
                    type: Optional[str] = None,
                    translations: Optional[Sequence[TemplateSmsTranslationArgs]] = None)
    func NewTemplateSms(ctx *Context, name string, args TemplateSmsArgs, opts ...ResourceOption) (*TemplateSms, error)
    public TemplateSms(string name, TemplateSmsArgs args, 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.
    
    

    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()
    {
        Template = "string",
        Type = "string",
        Translations = new[]
        {
            new Okta.Inputs.TemplateSmsTranslationArgs
            {
                Language = "string",
                Template = "string",
            },
        },
    });
    
    example, err := okta.NewTemplateSms(ctx, "templateSmsResource", &okta.TemplateSmsArgs{
    	Template: pulumi.String("string"),
    	Type:     pulumi.String("string"),
    	Translations: okta.TemplateSmsTranslationArray{
    		&okta.TemplateSmsTranslationArgs{
    			Language: pulumi.String("string"),
    			Template: pulumi.String("string"),
    		},
    	},
    })
    
    var templateSmsResource = new TemplateSms("templateSmsResource", TemplateSmsArgs.builder()
        .template("string")
        .type("string")
        .translations(TemplateSmsTranslationArgs.builder()
            .language("string")
            .template("string")
            .build())
        .build());
    
    template_sms_resource = okta.TemplateSms("templateSmsResource",
        template="string",
        type="string",
        translations=[okta.TemplateSmsTranslationArgs(
            language="string",
            template="string",
        )])
    
    const templateSmsResource = new okta.TemplateSms("templateSmsResource", {
        template: "string",
        type: "string",
        translations: [{
            language: "string",
            template: "string",
        }],
    });
    
    type: okta:TemplateSms
    properties:
        template: string
        translations:
            - language: string
              template: 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

    The TemplateSms resource accepts the following input properties:

    Template string
    SMS default template
    Type string
    SMS template type
    Translations List<TemplateSmsTranslation>
    Set of translations for a particular template.
    Template string
    SMS default template
    Type string
    SMS template type
    Translations []TemplateSmsTranslationArgs
    Set of translations for a particular template.
    template String
    SMS default template
    type String
    SMS template type
    translations List<TemplateSmsTranslation>
    Set of translations for a particular template.
    template string
    SMS default template
    type string
    SMS template type
    translations TemplateSmsTranslation[]
    Set of translations for a particular template.
    template str
    SMS default template
    type str
    SMS template type
    translations Sequence[TemplateSmsTranslationArgs]
    Set of translations for a particular template.
    template String
    SMS default template
    type String
    SMS template type
    translations List<Property Map>
    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 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 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)
    public static TemplateSms get(String name, Output<String> id, TemplateSmsState 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:
    Template string
    SMS default template
    Translations List<TemplateSmsTranslation>
    Set of translations for a particular template.
    Type string
    SMS template type
    Template string
    SMS default template
    Translations []TemplateSmsTranslationArgs
    Set of translations for a particular template.
    Type string
    SMS template type
    template String
    SMS default template
    translations List<TemplateSmsTranslation>
    Set of translations for a particular template.
    type String
    SMS template type
    template string
    SMS default template
    translations TemplateSmsTranslation[]
    Set of translations for a particular template.
    type string
    SMS template type
    template str
    SMS default template
    translations Sequence[TemplateSmsTranslationArgs]
    Set of translations for a particular template.
    type str
    SMS template type
    template String
    SMS default template
    translations List<Property Map>
    Set of translations for a particular template.
    type String
    SMS template type

    Supporting Types

    TemplateSmsTranslation, TemplateSmsTranslationArgs

    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 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.
    language String
    The language to map the template to.
    template String
    The SMS message.

    Import

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

    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
    Okta v4.11.0 published on Tuesday, Sep 17, 2024 by Pulumi