opentelekomcloud.SmnMessageTemplateV2
Explore with Pulumi AI
Manages a SMN message template resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const name = config.requireObject("name");
const protocol = config.requireObject("protocol");
const test = new opentelekomcloud.SmnMessageTemplateV2("test", {
protocol: protocol,
content: "this content contains {content1}, {content2}, {content3}",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
name = config.require_object("name")
protocol = config.require_object("protocol")
test = opentelekomcloud.SmnMessageTemplateV2("test",
protocol=protocol,
content="this content contains {content1}, {content2}, {content3}")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"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 := opentelekomcloud.NewSmnMessageTemplateV2(ctx, "test", &opentelekomcloud.SmnMessageTemplateV2Args{
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 Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.RequireObject<dynamic>("name");
var protocol = config.RequireObject<dynamic>("protocol");
var test = new Opentelekomcloud.SmnMessageTemplateV2("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.opentelekomcloud.SmnMessageTemplateV2;
import com.pulumi.opentelekomcloud.SmnMessageTemplateV2Args;
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 SmnMessageTemplateV2("test", SmnMessageTemplateV2Args.builder()
.protocol(protocol)
.content("this content contains {content1}, {content2}, {content3}")
.build());
}
}
configuration:
name:
type: dynamic
protocol:
type: dynamic
resources:
test:
type: opentelekomcloud:SmnMessageTemplateV2
properties:
protocol: ${protocol}
content: this content contains {content1}, {content2}, {content3}
Create SmnMessageTemplateV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SmnMessageTemplateV2(name: string, args: SmnMessageTemplateV2Args, opts?: CustomResourceOptions);
@overload
def SmnMessageTemplateV2(resource_name: str,
args: SmnMessageTemplateV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def SmnMessageTemplateV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
protocol: Optional[str] = None,
name: Optional[str] = None,
smn_message_template_v2_id: Optional[str] = None)
func NewSmnMessageTemplateV2(ctx *Context, name string, args SmnMessageTemplateV2Args, opts ...ResourceOption) (*SmnMessageTemplateV2, error)
public SmnMessageTemplateV2(string name, SmnMessageTemplateV2Args args, CustomResourceOptions? opts = null)
public SmnMessageTemplateV2(String name, SmnMessageTemplateV2Args args)
public SmnMessageTemplateV2(String name, SmnMessageTemplateV2Args args, CustomResourceOptions options)
type: opentelekomcloud:SmnMessageTemplateV2
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 SmnMessageTemplateV2Args
- 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 SmnMessageTemplateV2Args
- 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 SmnMessageTemplateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SmnMessageTemplateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SmnMessageTemplateV2Args
- 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 smnMessageTemplateV2Resource = new Opentelekomcloud.SmnMessageTemplateV2("smnMessageTemplateV2Resource", new()
{
Content = "string",
Protocol = "string",
Name = "string",
SmnMessageTemplateV2Id = "string",
});
example, err := opentelekomcloud.NewSmnMessageTemplateV2(ctx, "smnMessageTemplateV2Resource", &opentelekomcloud.SmnMessageTemplateV2Args{
Content: pulumi.String("string"),
Protocol: pulumi.String("string"),
Name: pulumi.String("string"),
SmnMessageTemplateV2Id: pulumi.String("string"),
})
var smnMessageTemplateV2Resource = new SmnMessageTemplateV2("smnMessageTemplateV2Resource", SmnMessageTemplateV2Args.builder()
.content("string")
.protocol("string")
.name("string")
.smnMessageTemplateV2Id("string")
.build());
smn_message_template_v2_resource = opentelekomcloud.SmnMessageTemplateV2("smnMessageTemplateV2Resource",
content="string",
protocol="string",
name="string",
smn_message_template_v2_id="string")
const smnMessageTemplateV2Resource = new opentelekomcloud.SmnMessageTemplateV2("smnMessageTemplateV2Resource", {
content: "string",
protocol: "string",
name: "string",
smnMessageTemplateV2Id: "string",
});
type: opentelekomcloud:SmnMessageTemplateV2
properties:
content: string
name: string
protocol: string
smnMessageTemplateV2Id: string
SmnMessageTemplateV2 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 SmnMessageTemplateV2 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
- 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.
- Smn
Message stringTemplate V2Id - 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
- 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.
- Smn
Message stringTemplate V2Id - 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
- 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.
- smn
Message StringTemplate V2Id - 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
- 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.
- smn
Message stringTemplate V2Id - 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
- 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.
- smn_
message_ strtemplate_ v2_ id - 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
- 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.
- smn
Message StringTemplate V2Id - The resource ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the SmnMessageTemplateV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- The resource region.
- Tag
Names 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.
- region String
- The resource region.
- tag
Names 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.
- region String
- The resource region.
- tag
Names 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 SmnMessageTemplateV2 Resource
Get an existing SmnMessageTemplateV2 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?: SmnMessageTemplateV2State, opts?: CustomResourceOptions): SmnMessageTemplateV2
@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_v2_id: Optional[str] = None,
tag_names: Optional[Sequence[str]] = None) -> SmnMessageTemplateV2
func GetSmnMessageTemplateV2(ctx *Context, name string, id IDInput, state *SmnMessageTemplateV2State, opts ...ResourceOption) (*SmnMessageTemplateV2, error)
public static SmnMessageTemplateV2 Get(string name, Input<string> id, SmnMessageTemplateV2State? state, CustomResourceOptions? opts = null)
public static SmnMessageTemplateV2 get(String name, Output<String> id, SmnMessageTemplateV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:SmnMessageTemplateV2 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.
- 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
- http: the http protocol
- https: the https protocol
Changing this parameter will create a new resource.
- Region string
- The resource region.
- Smn
Message stringTemplate V2Id - The resource ID.
- Tag
Names 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
- http: the http protocol
- https: the https protocol
Changing this parameter will create a new resource.
- Region string
- The resource region.
- Smn
Message stringTemplate V2Id - The resource ID.
- Tag
Names []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
- http: the http protocol
- https: the https protocol
Changing this parameter will create a new resource.
- region String
- The resource region.
- smn
Message StringTemplate V2Id - The resource ID.
- tag
Names 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
- http: the http protocol
- https: the https protocol
Changing this parameter will create a new resource.
- region string
- The resource region.
- smn
Message stringTemplate V2Id - The resource ID.
- tag
Names 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
- http: the http protocol
- https: the https protocol
Changing this parameter will create a new resource.
- region str
- The resource region.
- smn_
message_ strtemplate_ v2_ id - 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
- http: the http protocol
- https: the https protocol
Changing this parameter will create a new resource.
- region String
- The resource region.
- smn
Message StringTemplate V2Id - The resource ID.
- tag
Names 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 opentelekomcloud:index/smnMessageTemplateV2:SmnMessageTemplateV2 test <message_template_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.