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.
- Cls
Alarm stringNotice Id - ID of the resource.
- Name string
- Alarm notice name.
- Notice
Receivers List<ClsAlarm Notice Notice Receiver> - Notice receivers.
- Dictionary<string, string>
- Tag description list.
- Web
Callbacks List<ClsAlarm Notice Web Callback> - Callback info.
- Type string
- Notice type. Value: Trigger, Recovery, All.
- Cls
Alarm stringNotice Id - ID of the resource.
- Name string
- Alarm notice name.
- Notice
Receivers []ClsAlarm Notice Notice Receiver Args - Notice receivers.
- map[string]string
- Tag description list.
- Web
Callbacks []ClsAlarm Notice Web Callback Args - Callback info.
- type String
- Notice type. Value: Trigger, Recovery, All.
- cls
Alarm StringNotice Id - ID of the resource.
- name String
- Alarm notice name.
- notice
Receivers List<ClsAlarm Notice Notice Receiver> - Notice receivers.
- Map<String,String>
- Tag description list.
- web
Callbacks List<ClsAlarm Notice Web Callback> - Callback info.
- type string
- Notice type. Value: Trigger, Recovery, All.
- cls
Alarm stringNotice Id - ID of the resource.
- name string
- Alarm notice name.
- notice
Receivers ClsAlarm Notice Notice Receiver[] - Notice receivers.
- {[key: string]: string}
- Tag description list.
- web
Callbacks 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.
- cls
Alarm StringNotice Id - ID of the resource.
- name String
- Alarm notice name.
- notice
Receivers List<Property Map> - Notice receivers.
- Map<String>
- Tag description list.
- web
Callbacks 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) -> ClsAlarmNotice
func 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.
- Cls
Alarm stringNotice Id - ID of the resource.
- Name string
- Alarm notice name.
- Notice
Receivers List<ClsAlarm Notice Notice Receiver> - Notice receivers.
- Dictionary<string, string>
- Tag description list.
- Type string
- Notice type. Value: Trigger, Recovery, All.
- Web
Callbacks List<ClsAlarm Notice Web Callback> - Callback info.
- Cls
Alarm stringNotice Id - ID of the resource.
- Name string
- Alarm notice name.
- Notice
Receivers []ClsAlarm Notice Notice Receiver Args - Notice receivers.
- map[string]string
- Tag description list.
- Type string
- Notice type. Value: Trigger, Recovery, All.
- Web
Callbacks []ClsAlarm Notice Web Callback Args - Callback info.
- cls
Alarm StringNotice Id - ID of the resource.
- name String
- Alarm notice name.
- notice
Receivers List<ClsAlarm Notice Notice Receiver> - Notice receivers.
- Map<String,String>
- Tag description list.
- type String
- Notice type. Value: Trigger, Recovery, All.
- web
Callbacks List<ClsAlarm Notice Web Callback> - Callback info.
- cls
Alarm stringNotice Id - ID of the resource.
- name string
- Alarm notice name.
- notice
Receivers ClsAlarm Notice Notice Receiver[] - Notice receivers.
- {[key: string]: string}
- Tag description list.
- type string
- Notice type. Value: Trigger, Recovery, All.
- web
Callbacks 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.
- cls
Alarm StringNotice Id - ID of the resource.
- name String
- Alarm notice name.
- notice
Receivers List<Property Map> - Notice receivers.
- Map<String>
- Tag description list.
- type String
- Notice type. Value: Trigger, Recovery, All.
- web
Callbacks List<Property Map> - Callback info.
Supporting Types
ClsAlarmNoticeNoticeReceiver, ClsAlarmNoticeNoticeReceiverArgs
- Receiver
Channels List<string> - Receiver channels, Value: Email, Sms, WeChat, Phone.
- Receiver
Ids List<double> - Receiver id list.
- Receiver
Type string - Receiver type, Uin or Group.
- End
Time string - End time allowed to receive messages.
- Index double
- Index. The input parameter is invalid, but the output parameter is valid.
- Notice
Content stringId - Notice content ID.
- Start
Time string - Start time allowed to receive messages.
- Receiver
Channels []string - Receiver channels, Value: Email, Sms, WeChat, Phone.
- Receiver
Ids []float64 - Receiver id list.
- Receiver
Type string - Receiver type, Uin or Group.
- End
Time string - End time allowed to receive messages.
- Index float64
- Index. The input parameter is invalid, but the output parameter is valid.
- Notice
Content stringId - Notice content ID.
- Start
Time string - Start time allowed to receive messages.
- receiver
Channels List<String> - Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiver
Ids List<Double> - Receiver id list.
- receiver
Type String - Receiver type, Uin or Group.
- end
Time String - End time allowed to receive messages.
- index Double
- Index. The input parameter is invalid, but the output parameter is valid.
- notice
Content StringId - Notice content ID.
- start
Time String - Start time allowed to receive messages.
- receiver
Channels string[] - Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiver
Ids number[] - Receiver id list.
- receiver
Type string - Receiver type, Uin or Group.
- end
Time string - End time allowed to receive messages.
- index number
- Index. The input parameter is invalid, but the output parameter is valid.
- notice
Content stringId - Notice content ID.
- start
Time 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.
- receiver
Channels List<String> - Receiver channels, Value: Email, Sms, WeChat, Phone.
- receiver
Ids List<Number> - Receiver id list.
- receiver
Type String - Receiver type, Uin or Group.
- end
Time String - End time allowed to receive messages.
- index Number
- Index. The input parameter is invalid, but the output parameter is valid.
- notice
Content StringId - Notice content ID.
- start
Time String - Start time allowed to receive messages.
ClsAlarmNoticeWebCallback, ClsAlarmNoticeWebCallbackArgs
- Callback
Type 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.
- Notice
Content stringId - Notice content ID.
- Remind
Type double - Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- User
Ids List<string> - User ID list.
- Web
Callback stringId - Integration configuration ID.
- Callback
Type 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.
- Notice
Content stringId - Notice content ID.
- Remind
Type float64 - Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- User
Ids []string - User ID list.
- Web
Callback stringId - Integration configuration ID.
- callback
Type 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.
- notice
Content StringId - Notice content ID.
- remind
Type Double - Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- user
Ids List<String> - User ID list.
- web
Callback StringId - Integration configuration ID.
- callback
Type 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.
- notice
Content stringId - Notice content ID.
- remind
Type number - Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- user
Ids string[] - User ID list.
- web
Callback 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.
- callback
Type 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.
- notice
Content StringId - Notice content ID.
- remind
Type Number - Remind type. 0: Do not remind; 1: Specified person; 2: Everyone.
- user
Ids List<String> - User ID list.
- web
Callback 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
tencentcloud
Terraform Provider.