1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ClsNoticeContent
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.ClsNoticeContent

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cls notice content

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsNoticeContent("example", {
        noticeContents: {
            recoveryContent: {
                content: "This is content.",
                headers: ["Content-Type:application/json"],
                title: "title",
            },
            triggerContent: {
                content: "This is content.",
                headers: ["Content-Type:application/json"],
                title: "title",
            },
            type: "Email",
        },
        type: 0,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsNoticeContent("example",
        notice_contents={
            "recovery_content": {
                "content": "This is content.",
                "headers": ["Content-Type:application/json"],
                "title": "title",
            },
            "trigger_content": {
                "content": "This is content.",
                "headers": ["Content-Type:application/json"],
                "title": "title",
            },
            "type": "Email",
        },
        type=0)
    
    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.NewClsNoticeContent(ctx, "example", &tencentcloud.ClsNoticeContentArgs{
    			NoticeContents: &tencentcloud.ClsNoticeContentNoticeContentsArgs{
    				RecoveryContent: &tencentcloud.ClsNoticeContentNoticeContentsRecoveryContentArgs{
    					Content: pulumi.String("This is content."),
    					Headers: pulumi.StringArray{
    						pulumi.String("Content-Type:application/json"),
    					},
    					Title: pulumi.String("title"),
    				},
    				TriggerContent: &tencentcloud.ClsNoticeContentNoticeContentsTriggerContentArgs{
    					Content: pulumi.String("This is content."),
    					Headers: pulumi.StringArray{
    						pulumi.String("Content-Type:application/json"),
    					},
    					Title: pulumi.String("title"),
    				},
    				Type: pulumi.String("Email"),
    			},
    			Type: pulumi.Float64(0),
    		})
    		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 example = new Tencentcloud.ClsNoticeContent("example", new()
        {
            NoticeContents = new Tencentcloud.Inputs.ClsNoticeContentNoticeContentsArgs
            {
                RecoveryContent = new Tencentcloud.Inputs.ClsNoticeContentNoticeContentsRecoveryContentArgs
                {
                    Content = "This is content.",
                    Headers = new[]
                    {
                        "Content-Type:application/json",
                    },
                    Title = "title",
                },
                TriggerContent = new Tencentcloud.Inputs.ClsNoticeContentNoticeContentsTriggerContentArgs
                {
                    Content = "This is content.",
                    Headers = new[]
                    {
                        "Content-Type:application/json",
                    },
                    Title = "title",
                },
                Type = "Email",
            },
            Type = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsNoticeContent;
    import com.pulumi.tencentcloud.ClsNoticeContentArgs;
    import com.pulumi.tencentcloud.inputs.ClsNoticeContentNoticeContentsArgs;
    import com.pulumi.tencentcloud.inputs.ClsNoticeContentNoticeContentsRecoveryContentArgs;
    import com.pulumi.tencentcloud.inputs.ClsNoticeContentNoticeContentsTriggerContentArgs;
    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 ClsNoticeContent("example", ClsNoticeContentArgs.builder()
                .noticeContents(ClsNoticeContentNoticeContentsArgs.builder()
                    .recoveryContent(ClsNoticeContentNoticeContentsRecoveryContentArgs.builder()
                        .content("This is content.")
                        .headers("Content-Type:application/json")
                        .title("title")
                        .build())
                    .triggerContent(ClsNoticeContentNoticeContentsTriggerContentArgs.builder()
                        .content("This is content.")
                        .headers("Content-Type:application/json")
                        .title("title")
                        .build())
                    .type("Email")
                    .build())
                .type(0)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsNoticeContent
        properties:
          noticeContents:
            recoveryContent:
              content: This is content.
              headers:
                - Content-Type:application/json
              title: title
            triggerContent:
              content: This is content.
              headers:
                - Content-Type:application/json
              title: title
            type: Email
          type: 0
    

    Create ClsNoticeContent Resource

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

    Constructor syntax

    new ClsNoticeContent(name: string, args?: ClsNoticeContentArgs, opts?: CustomResourceOptions);
    @overload
    def ClsNoticeContent(resource_name: str,
                         args: Optional[ClsNoticeContentArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClsNoticeContent(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         cls_notice_content_id: Optional[str] = None,
                         name: Optional[str] = None,
                         notice_contents: Optional[ClsNoticeContentNoticeContentsArgs] = None,
                         type: Optional[float] = None)
    func NewClsNoticeContent(ctx *Context, name string, args *ClsNoticeContentArgs, opts ...ResourceOption) (*ClsNoticeContent, error)
    public ClsNoticeContent(string name, ClsNoticeContentArgs? args = null, CustomResourceOptions? opts = null)
    public ClsNoticeContent(String name, ClsNoticeContentArgs args)
    public ClsNoticeContent(String name, ClsNoticeContentArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClsNoticeContent
    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 ClsNoticeContentArgs
    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 ClsNoticeContentArgs
    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 ClsNoticeContentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClsNoticeContentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClsNoticeContentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ClsNoticeContentId string
    ID of the resource.
    Name string
    Notice content name.
    NoticeContents ClsNoticeContentNoticeContents
    Template detailed configuration.
    Type double
    Template content language. 0: Chinese 1: English.
    ClsNoticeContentId string
    ID of the resource.
    Name string
    Notice content name.
    NoticeContents ClsNoticeContentNoticeContentsArgs
    Template detailed configuration.
    Type float64
    Template content language. 0: Chinese 1: English.
    clsNoticeContentId String
    ID of the resource.
    name String
    Notice content name.
    noticeContents ClsNoticeContentNoticeContents
    Template detailed configuration.
    type Double
    Template content language. 0: Chinese 1: English.
    clsNoticeContentId string
    ID of the resource.
    name string
    Notice content name.
    noticeContents ClsNoticeContentNoticeContents
    Template detailed configuration.
    type number
    Template content language. 0: Chinese 1: English.
    cls_notice_content_id str
    ID of the resource.
    name str
    Notice content name.
    notice_contents ClsNoticeContentNoticeContentsArgs
    Template detailed configuration.
    type float
    Template content language. 0: Chinese 1: English.
    clsNoticeContentId String
    ID of the resource.
    name String
    Notice content name.
    noticeContents Property Map
    Template detailed configuration.
    type Number
    Template content language. 0: Chinese 1: English.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClsNoticeContent 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 ClsNoticeContent Resource

    Get an existing ClsNoticeContent 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?: ClsNoticeContentState, opts?: CustomResourceOptions): ClsNoticeContent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cls_notice_content_id: Optional[str] = None,
            name: Optional[str] = None,
            notice_contents: Optional[ClsNoticeContentNoticeContentsArgs] = None,
            type: Optional[float] = None) -> ClsNoticeContent
    func GetClsNoticeContent(ctx *Context, name string, id IDInput, state *ClsNoticeContentState, opts ...ResourceOption) (*ClsNoticeContent, error)
    public static ClsNoticeContent Get(string name, Input<string> id, ClsNoticeContentState? state, CustomResourceOptions? opts = null)
    public static ClsNoticeContent get(String name, Output<String> id, ClsNoticeContentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClsNoticeContent    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:
    ClsNoticeContentId string
    ID of the resource.
    Name string
    Notice content name.
    NoticeContents ClsNoticeContentNoticeContents
    Template detailed configuration.
    Type double
    Template content language. 0: Chinese 1: English.
    ClsNoticeContentId string
    ID of the resource.
    Name string
    Notice content name.
    NoticeContents ClsNoticeContentNoticeContentsArgs
    Template detailed configuration.
    Type float64
    Template content language. 0: Chinese 1: English.
    clsNoticeContentId String
    ID of the resource.
    name String
    Notice content name.
    noticeContents ClsNoticeContentNoticeContents
    Template detailed configuration.
    type Double
    Template content language. 0: Chinese 1: English.
    clsNoticeContentId string
    ID of the resource.
    name string
    Notice content name.
    noticeContents ClsNoticeContentNoticeContents
    Template detailed configuration.
    type number
    Template content language. 0: Chinese 1: English.
    cls_notice_content_id str
    ID of the resource.
    name str
    Notice content name.
    notice_contents ClsNoticeContentNoticeContentsArgs
    Template detailed configuration.
    type float
    Template content language. 0: Chinese 1: English.
    clsNoticeContentId String
    ID of the resource.
    name String
    Notice content name.
    noticeContents Property Map
    Template detailed configuration.
    type Number
    Template content language. 0: Chinese 1: English.

    Supporting Types

    ClsNoticeContentNoticeContents, ClsNoticeContentNoticeContentsArgs

    Type string
    Channel type. Email: Email; Sms: SMS; WeChat: WeChat; Phone: Telephone; WeCom: Enterprise WeChat; DingTalk: DingTalk; Lark: Feishu; Http: Custom callback.
    RecoveryContent ClsNoticeContentNoticeContentsRecoveryContent
    Template for Alarm Recovery Notification Content.
    TriggerContent ClsNoticeContentNoticeContentsTriggerContent
    Alarm triggered notification content template.
    Type string
    Channel type. Email: Email; Sms: SMS; WeChat: WeChat; Phone: Telephone; WeCom: Enterprise WeChat; DingTalk: DingTalk; Lark: Feishu; Http: Custom callback.
    RecoveryContent ClsNoticeContentNoticeContentsRecoveryContent
    Template for Alarm Recovery Notification Content.
    TriggerContent ClsNoticeContentNoticeContentsTriggerContent
    Alarm triggered notification content template.
    type String
    Channel type. Email: Email; Sms: SMS; WeChat: WeChat; Phone: Telephone; WeCom: Enterprise WeChat; DingTalk: DingTalk; Lark: Feishu; Http: Custom callback.
    recoveryContent ClsNoticeContentNoticeContentsRecoveryContent
    Template for Alarm Recovery Notification Content.
    triggerContent ClsNoticeContentNoticeContentsTriggerContent
    Alarm triggered notification content template.
    type string
    Channel type. Email: Email; Sms: SMS; WeChat: WeChat; Phone: Telephone; WeCom: Enterprise WeChat; DingTalk: DingTalk; Lark: Feishu; Http: Custom callback.
    recoveryContent ClsNoticeContentNoticeContentsRecoveryContent
    Template for Alarm Recovery Notification Content.
    triggerContent ClsNoticeContentNoticeContentsTriggerContent
    Alarm triggered notification content template.
    type str
    Channel type. Email: Email; Sms: SMS; WeChat: WeChat; Phone: Telephone; WeCom: Enterprise WeChat; DingTalk: DingTalk; Lark: Feishu; Http: Custom callback.
    recovery_content ClsNoticeContentNoticeContentsRecoveryContent
    Template for Alarm Recovery Notification Content.
    trigger_content ClsNoticeContentNoticeContentsTriggerContent
    Alarm triggered notification content template.
    type String
    Channel type. Email: Email; Sms: SMS; WeChat: WeChat; Phone: Telephone; WeCom: Enterprise WeChat; DingTalk: DingTalk; Lark: Feishu; Http: Custom callback.
    recoveryContent Property Map
    Template for Alarm Recovery Notification Content.
    triggerContent Property Map
    Alarm triggered notification content template.

    ClsNoticeContentNoticeContentsRecoveryContent, ClsNoticeContentNoticeContentsRecoveryContentArgs

    Content string
    Notification content template body information.
    Headers List<string>
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    Title string
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    Content string
    Notification content template body information.
    Headers []string
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    Title string
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content String
    Notification content template body information.
    headers List<String>
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title String
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content string
    Notification content template body information.
    headers string[]
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title string
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content str
    Notification content template body information.
    headers Sequence[str]
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title str
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content String
    Notification content template body information.
    headers List<String>
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title String
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.

    ClsNoticeContentNoticeContentsTriggerContent, ClsNoticeContentNoticeContentsTriggerContentArgs

    Content string
    Notification content template body information.
    Headers List<string>
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    Title string
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    Content string
    Notification content template body information.
    Headers []string
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    Title string
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content String
    Notification content template body information.
    headers List<String>
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title String
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content string
    Notification content template body information.
    headers string[]
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title string
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content str
    Notification content template body information.
    headers Sequence[str]
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title str
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.
    content String
    Notification content template body information.
    headers List<String>
    Request headers: In HTTP requests, request headers contain additional information sent by the client to the server, such as user agent, authorization credentials, expected response format, etc. Only custom callback supports this configuration.
    title String
    Notification content template title information. Some notification channel types do not support 'title', please refer to the Tencent Cloud Console page.

    Import

    cls notice content can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/clsNoticeContent:ClsNoticeContent example noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack