1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. SmnMessageTemplate
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.SmnMessageTemplate

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages a SMN message template resource within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const name = config.requireObject("name");
    const protocol = config.requireObject("protocol");
    const test = new flexibleengine.SmnMessageTemplate("test", {
        protocol: protocol,
        content: "this content contains {content1}, {content2}, {content3}",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    name = config.require_object("name")
    protocol = config.require_object("protocol")
    test = flexibleengine.SmnMessageTemplate("test",
        protocol=protocol,
        content="this content contains {content1}, {content2}, {content3}")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := cfg.RequireObject("name")
    		protocol := cfg.RequireObject("protocol")
    		_, err := flexibleengine.NewSmnMessageTemplate(ctx, "test", &flexibleengine.SmnMessageTemplateArgs{
    			Protocol: pulumi.Any(protocol),
    			Content:  pulumi.String("this content contains {content1}, {content2}, {content3}"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.RequireObject<dynamic>("name");
        var protocol = config.RequireObject<dynamic>("protocol");
        var test = new Flexibleengine.SmnMessageTemplate("test", new()
        {
            Protocol = protocol,
            Content = "this content contains {content1}, {content2}, {content3}",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.SmnMessageTemplate;
    import com.pulumi.flexibleengine.SmnMessageTemplateArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name");
            final var protocol = config.get("protocol");
            var test = new SmnMessageTemplate("test", SmnMessageTemplateArgs.builder()
                .protocol(protocol)
                .content("this content contains {content1}, {content2}, {content3}")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: dynamic
      protocol:
        type: dynamic
    resources:
      test:
        type: flexibleengine:SmnMessageTemplate
        properties:
          protocol: ${protocol}
          content: this content contains {content1}, {content2}, {content3}
    

    Create SmnMessageTemplate Resource

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

    Constructor syntax

    new SmnMessageTemplate(name: string, args: SmnMessageTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def SmnMessageTemplate(resource_name: str,
                           args: SmnMessageTemplateArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def SmnMessageTemplate(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           content: Optional[str] = None,
                           protocol: Optional[str] = None,
                           name: Optional[str] = None,
                           region: Optional[str] = None,
                           smn_message_template_id: Optional[str] = None)
    func NewSmnMessageTemplate(ctx *Context, name string, args SmnMessageTemplateArgs, opts ...ResourceOption) (*SmnMessageTemplate, error)
    public SmnMessageTemplate(string name, SmnMessageTemplateArgs args, CustomResourceOptions? opts = null)
    public SmnMessageTemplate(String name, SmnMessageTemplateArgs args)
    public SmnMessageTemplate(String name, SmnMessageTemplateArgs args, CustomResourceOptions options)
    
    type: flexibleengine:SmnMessageTemplate
    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 SmnMessageTemplateArgs
    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 SmnMessageTemplateArgs
    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 SmnMessageTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SmnMessageTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SmnMessageTemplateArgs
    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 smnMessageTemplateResource = new Flexibleengine.SmnMessageTemplate("smnMessageTemplateResource", new()
    {
        Content = "string",
        Protocol = "string",
        Name = "string",
        Region = "string",
        SmnMessageTemplateId = "string",
    });
    
    example, err := flexibleengine.NewSmnMessageTemplate(ctx, "smnMessageTemplateResource", &flexibleengine.SmnMessageTemplateArgs{
    	Content:              pulumi.String("string"),
    	Protocol:             pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	Region:               pulumi.String("string"),
    	SmnMessageTemplateId: pulumi.String("string"),
    })
    
    var smnMessageTemplateResource = new SmnMessageTemplate("smnMessageTemplateResource", SmnMessageTemplateArgs.builder()
        .content("string")
        .protocol("string")
        .name("string")
        .region("string")
        .smnMessageTemplateId("string")
        .build());
    
    smn_message_template_resource = flexibleengine.SmnMessageTemplate("smnMessageTemplateResource",
        content="string",
        protocol="string",
        name="string",
        region="string",
        smn_message_template_id="string")
    
    const smnMessageTemplateResource = new flexibleengine.SmnMessageTemplate("smnMessageTemplateResource", {
        content: "string",
        protocol: "string",
        name: "string",
        region: "string",
        smnMessageTemplateId: "string",
    });
    
    type: flexibleengine:SmnMessageTemplate
    properties:
        content: string
        name: string
        protocol: string
        region: string
        smnMessageTemplateId: string
    

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

    Content string
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    Protocol string

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    Name string

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    SmnMessageTemplateId string
    The resource ID.
    Content string
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    Protocol string

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    Name string

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    SmnMessageTemplateId string
    The resource ID.
    content String
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    protocol String

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    name String

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smnMessageTemplateId String
    The resource ID.
    content string
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    protocol string

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    name string

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smnMessageTemplateId string
    The resource ID.
    content str
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    protocol str

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    name str

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    region str
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smn_message_template_id str
    The resource ID.
    content String
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    protocol String

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    name String

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smnMessageTemplateId String
    The resource ID.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TagNames List<string>
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagNames []string
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    id String
    The provider-assigned unique ID for this managed resource.
    tagNames List<String>
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    id string
    The provider-assigned unique ID for this managed resource.
    tagNames string[]
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    id str
    The provider-assigned unique ID for this managed resource.
    tag_names Sequence[str]
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    id String
    The provider-assigned unique ID for this managed resource.
    tagNames List<String>
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.

    Look up Existing SmnMessageTemplate Resource

    Get an existing SmnMessageTemplate 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?: SmnMessageTemplateState, opts?: CustomResourceOptions): SmnMessageTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content: Optional[str] = None,
            name: Optional[str] = None,
            protocol: Optional[str] = None,
            region: Optional[str] = None,
            smn_message_template_id: Optional[str] = None,
            tag_names: Optional[Sequence[str]] = None) -> SmnMessageTemplate
    func GetSmnMessageTemplate(ctx *Context, name string, id IDInput, state *SmnMessageTemplateState, opts ...ResourceOption) (*SmnMessageTemplate, error)
    public static SmnMessageTemplate Get(string name, Input<string> id, SmnMessageTemplateState? state, CustomResourceOptions? opts = null)
    public static SmnMessageTemplate get(String name, Output<String> id, SmnMessageTemplateState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:SmnMessageTemplate    get:      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:
    Content string
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    Name string

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    Protocol string

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    SmnMessageTemplateId string
    The resource ID.
    TagNames List<string>
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    Content string
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    Name string

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    Protocol string

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    SmnMessageTemplateId string
    The resource ID.
    TagNames []string
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    content String
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    name String

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    protocol String

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smnMessageTemplateId String
    The resource ID.
    tagNames List<String>
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    content string
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    name string

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    protocol string

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smnMessageTemplateId string
    The resource ID.
    tagNames string[]
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    content str
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    name str

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    protocol str

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    region str
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smn_message_template_id str
    The resource ID.
    tag_names Sequence[str]
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.
    content String
    Specifies the template content, which supports plain text only. The template content cannot be left blank or larger than 256 KB. The fields within "{}" can be replaced based on the actual situation when you use the template.
    name String

    Specifies the message template name. A template name starts with a letter or digit, consists of 1 to 64 characters, and can contain only letters, digits, hyphens (-), and underscores (_).

    Changing this parameter will create a new resource.

    protocol String

    Specifies the protocol supported by the template. Value options:

    • default: the default protocol
    • email: the email protocol
    • sms: the SMS protocol
    • functionstage: the FunctionGraph transport protocol
    • dms: the DMS transport protocol
    • http: the http protocol
    • https: the https protocol

    Changing this parameter will create a new resource.

    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
    smnMessageTemplateId String
    The resource ID.
    tagNames List<String>
    Indicates the variable list. The variable name will be quoted in braces ({}) in the template. When you use a template to send messages, you can replace the variable with any content.

    Import

    The SMN message template can be imported using the id, e.g.

    bash

    $ pulumi import flexibleengine:index/smnMessageTemplate:SmnMessageTemplate test <message_template_id>
    

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud