tencentcloud.ClsAlarmNotice
Explore with Pulumi AI
Provides a resource to create a cls alarm notice
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.ClsAlarmNotice("example", {
    noticeReceivers: [{
        endTime: "23:59:59",
        noticeContentId: "noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7",
        receiverChannels: [
            "Email",
            "Sms",
        ],
        receiverIds: [100037718139],
        receiverType: "Uin",
        startTime: "00:00:00",
    }],
    tags: {
        createdBy: "terraform",
    },
    type: "All",
    webCallbacks: [{
        callbackType: "Http",
        method: "POST",
        noticeContentId: "noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7",
        remindType: 1,
        url: "example.com",
    }],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.ClsAlarmNotice("example",
    notice_receivers=[{
        "end_time": "23:59:59",
        "notice_content_id": "noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7",
        "receiver_channels": [
            "Email",
            "Sms",
        ],
        "receiver_ids": [100037718139],
        "receiver_type": "Uin",
        "start_time": "00:00:00",
    }],
    tags={
        "createdBy": "terraform",
    },
    type="All",
    web_callbacks=[{
        "callback_type": "Http",
        "method": "POST",
        "notice_content_id": "noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7",
        "remind_type": 1,
        "url": "example.com",
    }])
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.NewClsAlarmNotice(ctx, "example", &tencentcloud.ClsAlarmNoticeArgs{
			NoticeReceivers: tencentcloud.ClsAlarmNoticeNoticeReceiverArray{
				&tencentcloud.ClsAlarmNoticeNoticeReceiverArgs{
					EndTime:         pulumi.String("23:59:59"),
					NoticeContentId: pulumi.String("noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7"),
					ReceiverChannels: pulumi.StringArray{
						pulumi.String("Email"),
						pulumi.String("Sms"),
					},
					ReceiverIds: pulumi.Float64Array{
						pulumi.Float64(100037718139),
					},
					ReceiverType: pulumi.String("Uin"),
					StartTime:    pulumi.String("00:00:00"),
				},
			},
			Tags: pulumi.StringMap{
				"createdBy": pulumi.String("terraform"),
			},
			Type: pulumi.String("All"),
			WebCallbacks: tencentcloud.ClsAlarmNoticeWebCallbackArray{
				&tencentcloud.ClsAlarmNoticeWebCallbackArgs{
					CallbackType:    pulumi.String("Http"),
					Method:          pulumi.String("POST"),
					NoticeContentId: pulumi.String("noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7"),
					RemindType:      pulumi.Float64(1),
					Url:             pulumi.String("example.com"),
				},
			},
		})
		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.ClsAlarmNotice("example", new()
    {
        NoticeReceivers = new[]
        {
            new Tencentcloud.Inputs.ClsAlarmNoticeNoticeReceiverArgs
            {
                EndTime = "23:59:59",
                NoticeContentId = "noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7",
                ReceiverChannels = new[]
                {
                    "Email",
                    "Sms",
                },
                ReceiverIds = new[]
                {
                    100037718139,
                },
                ReceiverType = "Uin",
                StartTime = "00:00:00",
            },
        },
        Tags = 
        {
            { "createdBy", "terraform" },
        },
        Type = "All",
        WebCallbacks = new[]
        {
            new Tencentcloud.Inputs.ClsAlarmNoticeWebCallbackArgs
            {
                CallbackType = "Http",
                Method = "POST",
                NoticeContentId = "noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7",
                RemindType = 1,
                Url = "example.com",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsAlarmNotice;
import com.pulumi.tencentcloud.ClsAlarmNoticeArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmNoticeNoticeReceiverArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmNoticeWebCallbackArgs;
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 ClsAlarmNotice("example", ClsAlarmNoticeArgs.builder()
            .noticeReceivers(ClsAlarmNoticeNoticeReceiverArgs.builder()
                .endTime("23:59:59")
                .noticeContentId("noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7")
                .receiverChannels(                
                    "Email",
                    "Sms")
                .receiverIds(100037718139)
                .receiverType("Uin")
                .startTime("00:00:00")
                .build())
            .tags(Map.of("createdBy", "terraform"))
            .type("All")
            .webCallbacks(ClsAlarmNoticeWebCallbackArgs.builder()
                .callbackType("Http")
                .method("POST")
                .noticeContentId("noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7")
                .remindType(1)
                .url("example.com")
                .build())
            .build());
    }
}
resources:
  example:
    type: tencentcloud:ClsAlarmNotice
    properties:
      noticeReceivers:
        - endTime: 23:59:59
          noticeContentId: noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7
          receiverChannels:
            - Email
            - Sms
          receiverIds:
            - 1.00037718139e+11
          receiverType: Uin
          startTime: 00:00:00
      tags:
        createdBy: terraform
      type: All
      webCallbacks:
        - callbackType: Http
          method: POST
          noticeContentId: noticetemplate-b417f32a-bdf9-46c5-933e-28c23cd7a6b7
          remindType: 1
          url: example.com
Create ClsAlarmNotice Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClsAlarmNotice(name: string, args: ClsAlarmNoticeArgs, opts?: CustomResourceOptions);@overload
def ClsAlarmNotice(resource_name: str,
                   args: ClsAlarmNoticeArgs,
                   opts: Optional[ResourceOptions] = None)
@overload
def ClsAlarmNotice(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   type: Optional[str] = None,
                   cls_alarm_notice_id: Optional[str] = None,
                   name: Optional[str] = None,
                   notice_receivers: Optional[Sequence[ClsAlarmNoticeNoticeReceiverArgs]] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   web_callbacks: Optional[Sequence[ClsAlarmNoticeWebCallbackArgs]] = None)func NewClsAlarmNotice(ctx *Context, name string, args ClsAlarmNoticeArgs, opts ...ResourceOption) (*ClsAlarmNotice, error)public ClsAlarmNotice(string name, ClsAlarmNoticeArgs args, CustomResourceOptions? opts = null)
public ClsAlarmNotice(String name, ClsAlarmNoticeArgs args)
public ClsAlarmNotice(String name, ClsAlarmNoticeArgs args, CustomResourceOptions options)
type: tencentcloud:ClsAlarmNotice
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 ClsAlarmNoticeArgs
- 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 ClsAlarmNoticeArgs
- 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 ClsAlarmNoticeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClsAlarmNoticeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClsAlarmNoticeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClsAlarmNotice 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 ClsAlarmNotice resource accepts the following input properties:
- Type string
- Notice type. Value: Trigger, Recovery, All.
- ClsAlarm stringNotice Id 
- ID of the resource.
- Name string
- Alarm notice name.
- NoticeReceivers List<ClsAlarm Notice Notice Receiver> 
- Notice receivers.
- Dictionary<string, string>
- Tag description list.
- WebCallbacks List<ClsAlarm Notice Web Callback> 
- Callback info.
- Type string
- Notice type. Value: Trigger, Recovery, All.
- ClsAlarm stringNotice Id 
- ID of the resource.
- Name string
- Alarm notice name.
- NoticeReceivers []ClsAlarm Notice Notice Receiver Args 
- Notice receivers.
- map[string]string
- Tag description list.
- WebCallbacks []ClsAlarm Notice Web Callback Args 
- Callback info.
- type String
- Notice type. Value: Trigger, Recovery, All.
- clsAlarm StringNotice Id 
- ID of the resource.
- name String
- Alarm notice name.
- noticeReceivers List<ClsAlarm Notice Notice Receiver> 
- Notice receivers.
- Map<String,String>
- Tag description list.
- webCallbacks List<ClsAlarm Notice Web Callback> 
- Callback info.
- type string
- Notice type. Value: Trigger, Recovery, All.
- clsAlarm stringNotice Id 
- ID of the resource.
- name string
- Alarm notice name.
- noticeReceivers ClsAlarm Notice Notice Receiver[] 
- Notice receivers.
- {[key: string]: string}
- Tag description list.
- webCallbacks ClsAlarm Notice Web Callback[] 
- Callback info.
- type str
- Notice type. Value: Trigger, Recovery, All.
- cls_alarm_ strnotice_ id 
- ID of the resource.
- name str
- Alarm notice name.
- notice_receivers Sequence[ClsAlarm Notice Notice Receiver Args] 
- Notice receivers.
- Mapping[str, str]
- Tag description list.
- web_callbacks Sequence[ClsAlarm Notice Web Callback Args] 
- Callback info.
- type String
- Notice type. Value: Trigger, Recovery, All.
- clsAlarm StringNotice Id 
- ID of the resource.
- name String
- Alarm notice name.
- noticeReceivers List<Property Map>
- Notice receivers.
- Map<String>
- Tag description list.
- webCallbacks List<Property Map>
- Callback info.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClsAlarmNotice 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 ClsAlarmNotice Resource
Get an existing ClsAlarmNotice 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?: ClsAlarmNoticeState, opts?: CustomResourceOptions): ClsAlarmNotice@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cls_alarm_notice_id: Optional[str] = None,
        name: Optional[str] = None,
        notice_receivers: Optional[Sequence[ClsAlarmNoticeNoticeReceiverArgs]] = None,
        tags: Optional[Mapping[str, str]] = None,
        type: Optional[str] = None,
        web_callbacks: Optional[Sequence[ClsAlarmNoticeWebCallbackArgs]] = None) -> ClsAlarmNoticefunc GetClsAlarmNotice(ctx *Context, name string, id IDInput, state *ClsAlarmNoticeState, opts ...ResourceOption) (*ClsAlarmNotice, error)public static ClsAlarmNotice Get(string name, Input<string> id, ClsAlarmNoticeState? state, CustomResourceOptions? opts = null)public static ClsAlarmNotice get(String name, Output<String> id, ClsAlarmNoticeState state, CustomResourceOptions options)resources:  _:    type: tencentcloud:ClsAlarmNotice    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.
- ClsAlarm stringNotice Id 
- ID of the resource.
- Name string
- Alarm notice name.
- NoticeReceivers List<ClsAlarm Notice Notice Receiver> 
- Notice receivers.
- Dictionary<string, string>
- Tag description list.
- Type string
- Notice type. Value: Trigger, Recovery, All.
- WebCallbacks List<ClsAlarm Notice Web Callback> 
- Callback info.
- ClsAlarm stringNotice Id 
- ID of the resource.
- Name string
- Alarm notice name.
- NoticeReceivers []ClsAlarm Notice Notice Receiver Args 
- Notice receivers.
- map[string]string
- Tag description list.
- Type string
- Notice type. Value: Trigger, Recovery, All.
- WebCallbacks []ClsAlarm Notice Web Callback Args 
- Callback info.
- clsAlarm StringNotice Id 
- ID of the resource.
- name String
- Alarm notice name.
- noticeReceivers List<ClsAlarm Notice Notice Receiver> 
- Notice receivers.
- Map<String,String>
- Tag description list.
- type String
- Notice type. Value: Trigger, Recovery, All.
- webCallbacks List<ClsAlarm Notice Web Callback> 
- Callback info.
- clsAlarm stringNotice Id 
- ID of the resource.
- name string
- Alarm notice name.
- noticeReceivers ClsAlarm Notice Notice Receiver[] 
- Notice receivers.
- {[key: string]: string}
- Tag description list.
- type string
- Notice type. Value: Trigger, Recovery, All.
- webCallbacks ClsAlarm Notice Web Callback[] 
- Callback info.
- cls_alarm_ strnotice_ id 
- ID of the resource.
- name str
- Alarm notice name.
- notice_receivers Sequence[ClsAlarm Notice Notice Receiver Args] 
- Notice receivers.
- Mapping[str, str]
- Tag description list.
- type str
- Notice type. Value: Trigger, Recovery, All.
- web_callbacks Sequence[ClsAlarm Notice Web Callback Args] 
- Callback info.
- clsAlarm StringNotice Id 
- ID of the resource.
- name String
- Alarm notice name.
- noticeReceivers List<Property Map>
- Notice receivers.
- Map<String>
- Tag description list.
- type String
- Notice type. Value: Trigger, Recovery, All.
- webCallbacks List<Property Map>
- Callback info.
Supporting Types
ClsAlarmNoticeNoticeReceiver, ClsAlarmNoticeNoticeReceiverArgs          
- ReceiverChannels List<string>
- Receiver channels, Value: Email, Sms, WeChat, Phone.
- ReceiverIds List<double>
- Receiver id list.
- ReceiverType string
- Receiver type, Uin or Group.
- EndTime string
- End time allowed to receive messages.
- Index double
- Index. The input parameter is invalid, but the output parameter is valid.
- NoticeContent stringId 
- Notice content ID.
- StartTime string
- Start time allowed to receive messages.
- ReceiverChannels []string
- Receiver channels, Value: Email, Sms, WeChat, Phone.
- ReceiverIds []float64
- Receiver id list.
- ReceiverType string
- Receiver type, Uin or Group.
- EndTime string
- End time allowed to receive messages.
- Index float64
- Index. The input parameter is invalid, but the output parameter is valid.
- NoticeContent stringId 
- Notice content ID.
- StartTime string
- Start time allowed to receive messages.
- receiverChannels List<String>
- Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiverIds List<Double>
- Receiver id list.
- receiverType String
- Receiver type, Uin or Group.
- endTime String
- End time allowed to receive messages.
- index Double
- Index. The input parameter is invalid, but the output parameter is valid.
- noticeContent StringId 
- Notice content ID.
- startTime String
- Start time allowed to receive messages.
- receiverChannels string[]
- Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiverIds number[]
- Receiver id list.
- receiverType string
- Receiver type, Uin or Group.
- endTime string
- End time allowed to receive messages.
- index number
- Index. The input parameter is invalid, but the output parameter is valid.
- noticeContent stringId 
- Notice content ID.
- startTime string
- Start time allowed to receive messages.
- receiver_channels Sequence[str]
- Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiver_ids Sequence[float]
- Receiver id list.
- receiver_type str
- Receiver type, Uin or Group.
- end_time str
- End time allowed to receive messages.
- index float
- Index. The input parameter is invalid, but the output parameter is valid.
- notice_content_ strid 
- Notice content ID.
- start_time str
- Start time allowed to receive messages.
- receiverChannels List<String>
- Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiverIds List<Number>
- Receiver id list.
- receiverType String
- Receiver type, Uin or Group.
- endTime String
- End time allowed to receive messages.
- index Number
- Index. The input parameter is invalid, but the output parameter is valid.
- noticeContent StringId 
- Notice content ID.
- startTime String
- Start time allowed to receive messages.
ClsAlarmNoticeWebCallback, ClsAlarmNoticeWebCallbackArgs          
- CallbackType string
- Callback type, Values: Http, WeCom, DingTalk, Lark.
- Url string
- Callback url.
- Body string
- This parameter is deprecated. Please use notice_content_id. Request body.
- Headers List<string>
- This parameter is deprecated. Please use notice_content_id. Request headers.
- Index double
- Index. The input parameter is invalid, but the output parameter is valid.
- Method string
- Method, POST or PUT.
- Mobiles List<string>
- Telephone list.
- NoticeContent stringId 
- Notice content ID.
- RemindType double
- Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- UserIds List<string>
- User ID list.
- WebCallback stringId 
- Integration configuration ID.
- CallbackType string
- Callback type, Values: Http, WeCom, DingTalk, Lark.
- Url string
- Callback url.
- Body string
- This parameter is deprecated. Please use notice_content_id. Request body.
- Headers []string
- This parameter is deprecated. Please use notice_content_id. Request headers.
- Index float64
- Index. The input parameter is invalid, but the output parameter is valid.
- Method string
- Method, POST or PUT.
- Mobiles []string
- Telephone list.
- NoticeContent stringId 
- Notice content ID.
- RemindType float64
- Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- UserIds []string
- User ID list.
- WebCallback stringId 
- Integration configuration ID.
- callbackType String
- Callback type, Values: Http, WeCom, DingTalk, Lark.
- url String
- Callback url.
- body String
- This parameter is deprecated. Please use notice_content_id. Request body.
- headers List<String>
- This parameter is deprecated. Please use notice_content_id. Request headers.
- index Double
- Index. The input parameter is invalid, but the output parameter is valid.
- method String
- Method, POST or PUT.
- mobiles List<String>
- Telephone list.
- noticeContent StringId 
- Notice content ID.
- remindType Double
- Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- userIds List<String>
- User ID list.
- webCallback StringId 
- Integration configuration ID.
- callbackType string
- Callback type, Values: Http, WeCom, DingTalk, Lark.
- url string
- Callback url.
- body string
- This parameter is deprecated. Please use notice_content_id. Request body.
- headers string[]
- This parameter is deprecated. Please use notice_content_id. Request headers.
- index number
- Index. The input parameter is invalid, but the output parameter is valid.
- method string
- Method, POST or PUT.
- mobiles string[]
- Telephone list.
- noticeContent stringId 
- Notice content ID.
- remindType number
- Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- userIds string[]
- User ID list.
- webCallback stringId 
- Integration configuration ID.
- callback_type str
- Callback type, Values: Http, WeCom, DingTalk, Lark.
- url str
- Callback url.
- body str
- This parameter is deprecated. Please use notice_content_id. Request body.
- headers Sequence[str]
- This parameter is deprecated. Please use notice_content_id. Request headers.
- index float
- Index. The input parameter is invalid, but the output parameter is valid.
- method str
- Method, POST or PUT.
- mobiles Sequence[str]
- Telephone list.
- notice_content_ strid 
- Notice content ID.
- remind_type float
- Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- user_ids Sequence[str]
- User ID list.
- web_callback_ strid 
- Integration configuration ID.
- callbackType String
- Callback type, Values: Http, WeCom, DingTalk, Lark.
- url String
- Callback url.
- body String
- This parameter is deprecated. Please use notice_content_id. Request body.
- headers List<String>
- This parameter is deprecated. Please use notice_content_id. Request headers.
- index Number
- Index. The input parameter is invalid, but the output parameter is valid.
- method String
- Method, POST or PUT.
- mobiles List<String>
- Telephone list.
- noticeContent StringId 
- Notice content ID.
- remindType Number
- Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- userIds List<String>
- User ID list.
- webCallback StringId 
- Integration configuration ID.
Import
cls alarm notice can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clsAlarmNotice:ClsAlarmNotice example notice-19076f96-0f9a-4206-b308-b478737cab66
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 tencentcloudTerraform Provider.