tencentcloud.SmsTemplate
Explore with Pulumi AI
Provides a resource to create a sms template
Example Usage
Create a sms template
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const template = new tencentcloud.SmsTemplate("template", {
international: 0,
remark: "terraform example",
smsType: 0,
templateContent: "example for sms template",
templateName: "tf_example_sms_template",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
template = tencentcloud.SmsTemplate("template",
international=0,
remark="terraform example",
sms_type=0,
template_content="example for sms template",
template_name="tf_example_sms_template")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewSmsTemplate(ctx, "template", &tencentcloud.SmsTemplateArgs{
International: pulumi.Float64(0),
Remark: pulumi.String("terraform example"),
SmsType: pulumi.Float64(0),
TemplateContent: pulumi.String("example for sms template"),
TemplateName: pulumi.String("tf_example_sms_template"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var template = new Tencentcloud.SmsTemplate("template", new()
{
International = 0,
Remark = "terraform example",
SmsType = 0,
TemplateContent = "example for sms template",
TemplateName = "tf_example_sms_template",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.SmsTemplate;
import com.pulumi.tencentcloud.SmsTemplateArgs;
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 template = new SmsTemplate("template", SmsTemplateArgs.builder()
.international(0)
.remark("terraform example")
.smsType(0)
.templateContent("example for sms template")
.templateName("tf_example_sms_template")
.build());
}
}
resources:
template:
type: tencentcloud:SmsTemplate
properties:
international: 0
# Mainland China SMS
remark: terraform example
smsType: 0
# regular SMS
templateContent: example for sms template
templateName: tf_example_sms_template
Create SmsTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SmsTemplate(name: string, args: SmsTemplateArgs, opts?: CustomResourceOptions);
@overload
def SmsTemplate(resource_name: str,
args: SmsTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SmsTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
international: Optional[float] = None,
remark: Optional[str] = None,
sms_type: Optional[float] = None,
template_content: Optional[str] = None,
template_name: Optional[str] = None,
sms_template_id: Optional[str] = None)
func NewSmsTemplate(ctx *Context, name string, args SmsTemplateArgs, opts ...ResourceOption) (*SmsTemplate, error)
public SmsTemplate(string name, SmsTemplateArgs args, CustomResourceOptions? opts = null)
public SmsTemplate(String name, SmsTemplateArgs args)
public SmsTemplate(String name, SmsTemplateArgs args, CustomResourceOptions options)
type: tencentcloud:SmsTemplate
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 SmsTemplateArgs
- 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 SmsTemplateArgs
- 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 SmsTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SmsTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SmsTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SmsTemplate 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 SmsTemplate resource accepts the following input properties:
- International double
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- Remark string
- Template remarks, such as reason for application and use case.
- Sms
Type double - SMS type. 0: regular SMS, 1: marketing SMS.
- Template
Content string - Message Template Content.
- Template
Name string - Message Template name, which must be unique.
- Sms
Template stringId - ID of the resource.
- International float64
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- Remark string
- Template remarks, such as reason for application and use case.
- Sms
Type float64 - SMS type. 0: regular SMS, 1: marketing SMS.
- Template
Content string - Message Template Content.
- Template
Name string - Message Template name, which must be unique.
- Sms
Template stringId - ID of the resource.
- international Double
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark String
- Template remarks, such as reason for application and use case.
- sms
Type Double - SMS type. 0: regular SMS, 1: marketing SMS.
- template
Content String - Message Template Content.
- template
Name String - Message Template name, which must be unique.
- sms
Template StringId - ID of the resource.
- international number
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark string
- Template remarks, such as reason for application and use case.
- sms
Type number - SMS type. 0: regular SMS, 1: marketing SMS.
- template
Content string - Message Template Content.
- template
Name string - Message Template name, which must be unique.
- sms
Template stringId - ID of the resource.
- international float
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark str
- Template remarks, such as reason for application and use case.
- sms_
type float - SMS type. 0: regular SMS, 1: marketing SMS.
- template_
content str - Message Template Content.
- template_
name str - Message Template name, which must be unique.
- sms_
template_ strid - ID of the resource.
- international Number
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark String
- Template remarks, such as reason for application and use case.
- sms
Type Number - SMS type. 0: regular SMS, 1: marketing SMS.
- template
Content String - Message Template Content.
- template
Name String - Message Template name, which must be unique.
- sms
Template StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the SmsTemplate 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 SmsTemplate Resource
Get an existing SmsTemplate 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?: SmsTemplateState, opts?: CustomResourceOptions): SmsTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
international: Optional[float] = None,
remark: Optional[str] = None,
sms_template_id: Optional[str] = None,
sms_type: Optional[float] = None,
template_content: Optional[str] = None,
template_name: Optional[str] = None) -> SmsTemplate
func GetSmsTemplate(ctx *Context, name string, id IDInput, state *SmsTemplateState, opts ...ResourceOption) (*SmsTemplate, error)
public static SmsTemplate Get(string name, Input<string> id, SmsTemplateState? state, CustomResourceOptions? opts = null)
public static SmsTemplate get(String name, Output<String> id, SmsTemplateState state, CustomResourceOptions options)
resources: _: type: tencentcloud:SmsTemplate 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.
- International double
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- Remark string
- Template remarks, such as reason for application and use case.
- Sms
Template stringId - ID of the resource.
- Sms
Type double - SMS type. 0: regular SMS, 1: marketing SMS.
- Template
Content string - Message Template Content.
- Template
Name string - Message Template name, which must be unique.
- International float64
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- Remark string
- Template remarks, such as reason for application and use case.
- Sms
Template stringId - ID of the resource.
- Sms
Type float64 - SMS type. 0: regular SMS, 1: marketing SMS.
- Template
Content string - Message Template Content.
- Template
Name string - Message Template name, which must be unique.
- international Double
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark String
- Template remarks, such as reason for application and use case.
- sms
Template StringId - ID of the resource.
- sms
Type Double - SMS type. 0: regular SMS, 1: marketing SMS.
- template
Content String - Message Template Content.
- template
Name String - Message Template name, which must be unique.
- international number
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark string
- Template remarks, such as reason for application and use case.
- sms
Template stringId - ID of the resource.
- sms
Type number - SMS type. 0: regular SMS, 1: marketing SMS.
- template
Content string - Message Template Content.
- template
Name string - Message Template name, which must be unique.
- international float
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark str
- Template remarks, such as reason for application and use case.
- sms_
template_ strid - ID of the resource.
- sms_
type float - SMS type. 0: regular SMS, 1: marketing SMS.
- template_
content str - Message Template Content.
- template_
name str - Message Template name, which must be unique.
- international Number
- Whether it is Global SMS: 0: Mainland China SMS; 1: Global SMS.
- remark String
- Template remarks, such as reason for application and use case.
- sms
Template StringId - ID of the resource.
- sms
Type Number - SMS type. 0: regular SMS, 1: marketing SMS.
- template
Content String - Message Template Content.
- template
Name String - Message Template name, which must be unique.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.