published on Wednesday, Mar 25, 2026 by tencentcloudstack
published on Wednesday, Mar 25, 2026 by tencentcloudstack
Provides a resource to create a cls alarm
Example Usage
Use single condition with<span pulumi-lang-nodejs=" alarmNoticeIds
" pulumi-lang-dotnet=" AlarmNoticeIds " pulumi-lang-go=" alarmNoticeIds " pulumi-lang-python=" alarm_notice_ids " pulumi-lang-yaml=" alarmNoticeIds " pulumi-lang-java=" alarmNoticeIds “> alarm_notice_ids
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.ClsAlarm("example", {
name: "tf-example",
alarmNoticeIds: ["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarmPeriod: 15,
condition: "$1.source='10.0.0.1'",
alarmLevel: 1,
messageTemplate: "{{.Label}}",
status: true,
triggerCount: 1,
alarmTargets: [{
logsetId: "e74efb8e-f647-48b2-a725-43f11b122081",
topicId: "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
query: "status:>500 | select count(*) as errorCounts",
startTimeOffset: -15,
endTimeOffset: 0,
number: 1,
syntaxRule: 1,
}],
analyses: [{
content: "__FILENAME__",
name: "terraform",
type: "field",
configInfos: [{
key: "QueryIndex",
value: "1",
}],
}],
monitorTime: {
time: 1,
type: "Period",
},
classifications: {
env: "production",
service: "api-gateway",
},
tags: {
createdBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.ClsAlarm("example",
name="tf-example",
alarm_notice_ids=["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarm_period=15,
condition="$1.source='10.0.0.1'",
alarm_level=1,
message_template="{{.Label}}",
status=True,
trigger_count=1,
alarm_targets=[{
"logset_id": "e74efb8e-f647-48b2-a725-43f11b122081",
"topic_id": "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
"query": "status:>500 | select count(*) as errorCounts",
"start_time_offset": -15,
"end_time_offset": 0,
"number": 1,
"syntax_rule": 1,
}],
analyses=[{
"content": "__FILENAME__",
"name": "terraform",
"type": "field",
"config_infos": [{
"key": "QueryIndex",
"value": "1",
}],
}],
monitor_time={
"time": 1,
"type": "Period",
},
classifications={
"env": "production",
"service": "api-gateway",
},
tags={
"createdBy": "terraform",
})
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.NewClsAlarm(ctx, "example", &tencentcloud.ClsAlarmArgs{
Name: pulumi.String("tf-example"),
AlarmNoticeIds: pulumi.StringArray{
pulumi.String("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"),
},
AlarmPeriod: pulumi.Float64(15),
Condition: pulumi.String("$1.source='10.0.0.1'"),
AlarmLevel: pulumi.Float64(1),
MessageTemplate: pulumi.String("{{.Label}}"),
Status: pulumi.Bool(true),
TriggerCount: pulumi.Float64(1),
AlarmTargets: tencentcloud.ClsAlarmAlarmTargetArray{
&tencentcloud.ClsAlarmAlarmTargetArgs{
LogsetId: pulumi.String("e74efb8e-f647-48b2-a725-43f11b122081"),
TopicId: pulumi.String("59cf3ec0-1612-4157-be3f-341b2e7a53cb"),
Query: pulumi.String("status:>500 | select count(*) as errorCounts"),
StartTimeOffset: pulumi.Float64(-15),
EndTimeOffset: pulumi.Float64(0),
Number: pulumi.Float64(1),
SyntaxRule: pulumi.Float64(1),
},
},
Analyses: tencentcloud.ClsAlarmAnalysisArray{
&tencentcloud.ClsAlarmAnalysisArgs{
Content: pulumi.String("__FILENAME__"),
Name: pulumi.String("terraform"),
Type: pulumi.String("field"),
ConfigInfos: tencentcloud.ClsAlarmAnalysisConfigInfoArray{
&tencentcloud.ClsAlarmAnalysisConfigInfoArgs{
Key: pulumi.String("QueryIndex"),
Value: pulumi.String("1"),
},
},
},
},
MonitorTime: &tencentcloud.ClsAlarmMonitorTimeArgs{
Time: pulumi.Float64(1),
Type: pulumi.String("Period"),
},
Classifications: pulumi.StringMap{
"env": pulumi.String("production"),
"service": pulumi.String("api-gateway"),
},
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
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.ClsAlarm("example", new()
{
Name = "tf-example",
AlarmNoticeIds = new[]
{
"notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
},
AlarmPeriod = 15,
Condition = "$1.source='10.0.0.1'",
AlarmLevel = 1,
MessageTemplate = "{{.Label}}",
Status = true,
TriggerCount = 1,
AlarmTargets = new[]
{
new Tencentcloud.Inputs.ClsAlarmAlarmTargetArgs
{
LogsetId = "e74efb8e-f647-48b2-a725-43f11b122081",
TopicId = "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
Query = "status:>500 | select count(*) as errorCounts",
StartTimeOffset = -15,
EndTimeOffset = 0,
Number = 1,
SyntaxRule = 1,
},
},
Analyses = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisArgs
{
Content = "__FILENAME__",
Name = "terraform",
Type = "field",
ConfigInfos = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisConfigInfoArgs
{
Key = "QueryIndex",
Value = "1",
},
},
},
},
MonitorTime = new Tencentcloud.Inputs.ClsAlarmMonitorTimeArgs
{
Time = 1,
Type = "Period",
},
Classifications =
{
{ "env", "production" },
{ "service", "api-gateway" },
},
Tags =
{
{ "createdBy", "terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsAlarm;
import com.pulumi.tencentcloud.ClsAlarmArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmAlarmTargetArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmAnalysisArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmMonitorTimeArgs;
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 ClsAlarm("example", ClsAlarmArgs.builder()
.name("tf-example")
.alarmNoticeIds("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101")
.alarmPeriod(15.0)
.condition("$1.source='10.0.0.1'")
.alarmLevel(1.0)
.messageTemplate("{{.Label}}")
.status(true)
.triggerCount(1.0)
.alarmTargets(ClsAlarmAlarmTargetArgs.builder()
.logsetId("e74efb8e-f647-48b2-a725-43f11b122081")
.topicId("59cf3ec0-1612-4157-be3f-341b2e7a53cb")
.query("status:>500 | select count(*) as errorCounts")
.startTimeOffset(-15.0)
.endTimeOffset(0.0)
.number(1.0)
.syntaxRule(1.0)
.build())
.analyses(ClsAlarmAnalysisArgs.builder()
.content("__FILENAME__")
.name("terraform")
.type("field")
.configInfos(ClsAlarmAnalysisConfigInfoArgs.builder()
.key("QueryIndex")
.value("1")
.build())
.build())
.monitorTime(ClsAlarmMonitorTimeArgs.builder()
.time(1.0)
.type("Period")
.build())
.classifications(Map.ofEntries(
Map.entry("env", "production"),
Map.entry("service", "api-gateway")
))
.tags(Map.of("createdBy", "terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:ClsAlarm
properties:
name: tf-example
alarmNoticeIds:
- notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101
alarmPeriod: 15
condition: $1.source='10.0.0.1'
alarmLevel: 1
messageTemplate: '{{.Label}}'
status: true
triggerCount: 1
alarmTargets:
- logsetId: e74efb8e-f647-48b2-a725-43f11b122081
topicId: 59cf3ec0-1612-4157-be3f-341b2e7a53cb
query: status:>500 | select count(*) as errorCounts
startTimeOffset: -15
endTimeOffset: 0
number: 1
syntaxRule: 1
analyses:
- content: __FILENAME__
name: terraform
type: field
configInfos:
- key: QueryIndex
value: '1'
monitorTime:
time: 1
type: Period
classifications:
env: production
service: api-gateway
tags:
createdBy: terraform
are mutually exclusive. You can only use one of them.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleMonitorNotice = new tencentcloud.ClsAlarm("example_monitor_notice", {
name: "tf-example-monitor-notice",
monitorNotice: {
notices: [
{
noticeId: "notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
contentTmplId: "tmpl-5f7c8a9b-1234-5678-90ab-cdef12345678",
alarmLevels: [
1,
2,
],
},
{
noticeId: "notice-d3bf54ff-2b5c-5d5b-bf4f-f92582391202",
contentTmplId: "tmpl-6g8d9b0c-2345-6789-01bc-def123456789",
alarmLevels: [3],
},
],
},
alarmPeriod: 15,
condition: "$1.errorCounts > 100",
alarmLevel: 1,
messageTemplate: "{{.Label}}",
status: true,
triggerCount: 1,
alarmTargets: [{
logsetId: "e74efb8e-f647-48b2-a725-43f11b122081",
topicId: "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
query: "status:>500 | select count(*) as errorCounts",
startTimeOffset: -15,
endTimeOffset: 0,
number: 1,
syntaxRule: 1,
}],
analyses: [{
content: "__FILENAME__",
name: "terraform",
type: "field",
configInfos: [{
key: "QueryIndex",
value: "1",
}],
}],
monitorTime: {
time: 1,
type: "Period",
},
classifications: {
env: "production",
service: "data-pipeline",
},
tags: {
createdBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_monitor_notice = tencentcloud.ClsAlarm("example_monitor_notice",
name="tf-example-monitor-notice",
monitor_notice={
"notices": [
{
"notice_id": "notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
"content_tmpl_id": "tmpl-5f7c8a9b-1234-5678-90ab-cdef12345678",
"alarm_levels": [
1,
2,
],
},
{
"notice_id": "notice-d3bf54ff-2b5c-5d5b-bf4f-f92582391202",
"content_tmpl_id": "tmpl-6g8d9b0c-2345-6789-01bc-def123456789",
"alarm_levels": [3],
},
],
},
alarm_period=15,
condition="$1.errorCounts > 100",
alarm_level=1,
message_template="{{.Label}}",
status=True,
trigger_count=1,
alarm_targets=[{
"logset_id": "e74efb8e-f647-48b2-a725-43f11b122081",
"topic_id": "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
"query": "status:>500 | select count(*) as errorCounts",
"start_time_offset": -15,
"end_time_offset": 0,
"number": 1,
"syntax_rule": 1,
}],
analyses=[{
"content": "__FILENAME__",
"name": "terraform",
"type": "field",
"config_infos": [{
"key": "QueryIndex",
"value": "1",
}],
}],
monitor_time={
"time": 1,
"type": "Period",
},
classifications={
"env": "production",
"service": "data-pipeline",
},
tags={
"createdBy": "terraform",
})
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.NewClsAlarm(ctx, "example_monitor_notice", &tencentcloud.ClsAlarmArgs{
Name: pulumi.String("tf-example-monitor-notice"),
MonitorNotice: &tencentcloud.ClsAlarmMonitorNoticeArgs{
Notices: tencentcloud.ClsAlarmMonitorNoticeNoticeArray{
&tencentcloud.ClsAlarmMonitorNoticeNoticeArgs{
NoticeId: pulumi.String("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"),
ContentTmplId: pulumi.String("tmpl-5f7c8a9b-1234-5678-90ab-cdef12345678"),
AlarmLevels: pulumi.Float64Array{
pulumi.Float64(1),
pulumi.Float64(2),
},
},
&tencentcloud.ClsAlarmMonitorNoticeNoticeArgs{
NoticeId: pulumi.String("notice-d3bf54ff-2b5c-5d5b-bf4f-f92582391202"),
ContentTmplId: pulumi.String("tmpl-6g8d9b0c-2345-6789-01bc-def123456789"),
AlarmLevels: pulumi.Float64Array{
pulumi.Float64(3),
},
},
},
},
AlarmPeriod: pulumi.Float64(15),
Condition: pulumi.String("$1.errorCounts > 100"),
AlarmLevel: pulumi.Float64(1),
MessageTemplate: pulumi.String("{{.Label}}"),
Status: pulumi.Bool(true),
TriggerCount: pulumi.Float64(1),
AlarmTargets: tencentcloud.ClsAlarmAlarmTargetArray{
&tencentcloud.ClsAlarmAlarmTargetArgs{
LogsetId: pulumi.String("e74efb8e-f647-48b2-a725-43f11b122081"),
TopicId: pulumi.String("59cf3ec0-1612-4157-be3f-341b2e7a53cb"),
Query: pulumi.String("status:>500 | select count(*) as errorCounts"),
StartTimeOffset: pulumi.Float64(-15),
EndTimeOffset: pulumi.Float64(0),
Number: pulumi.Float64(1),
SyntaxRule: pulumi.Float64(1),
},
},
Analyses: tencentcloud.ClsAlarmAnalysisArray{
&tencentcloud.ClsAlarmAnalysisArgs{
Content: pulumi.String("__FILENAME__"),
Name: pulumi.String("terraform"),
Type: pulumi.String("field"),
ConfigInfos: tencentcloud.ClsAlarmAnalysisConfigInfoArray{
&tencentcloud.ClsAlarmAnalysisConfigInfoArgs{
Key: pulumi.String("QueryIndex"),
Value: pulumi.String("1"),
},
},
},
},
MonitorTime: &tencentcloud.ClsAlarmMonitorTimeArgs{
Time: pulumi.Float64(1),
Type: pulumi.String("Period"),
},
Classifications: pulumi.StringMap{
"env": pulumi.String("production"),
"service": pulumi.String("data-pipeline"),
},
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
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 exampleMonitorNotice = new Tencentcloud.ClsAlarm("example_monitor_notice", new()
{
Name = "tf-example-monitor-notice",
MonitorNotice = new Tencentcloud.Inputs.ClsAlarmMonitorNoticeArgs
{
Notices = new[]
{
new Tencentcloud.Inputs.ClsAlarmMonitorNoticeNoticeArgs
{
NoticeId = "notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
ContentTmplId = "tmpl-5f7c8a9b-1234-5678-90ab-cdef12345678",
AlarmLevels = new[]
{
1,
2,
},
},
new Tencentcloud.Inputs.ClsAlarmMonitorNoticeNoticeArgs
{
NoticeId = "notice-d3bf54ff-2b5c-5d5b-bf4f-f92582391202",
ContentTmplId = "tmpl-6g8d9b0c-2345-6789-01bc-def123456789",
AlarmLevels = new[]
{
3,
},
},
},
},
AlarmPeriod = 15,
Condition = "$1.errorCounts > 100",
AlarmLevel = 1,
MessageTemplate = "{{.Label}}",
Status = true,
TriggerCount = 1,
AlarmTargets = new[]
{
new Tencentcloud.Inputs.ClsAlarmAlarmTargetArgs
{
LogsetId = "e74efb8e-f647-48b2-a725-43f11b122081",
TopicId = "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
Query = "status:>500 | select count(*) as errorCounts",
StartTimeOffset = -15,
EndTimeOffset = 0,
Number = 1,
SyntaxRule = 1,
},
},
Analyses = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisArgs
{
Content = "__FILENAME__",
Name = "terraform",
Type = "field",
ConfigInfos = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisConfigInfoArgs
{
Key = "QueryIndex",
Value = "1",
},
},
},
},
MonitorTime = new Tencentcloud.Inputs.ClsAlarmMonitorTimeArgs
{
Time = 1,
Type = "Period",
},
Classifications =
{
{ "env", "production" },
{ "service", "data-pipeline" },
},
Tags =
{
{ "createdBy", "terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsAlarm;
import com.pulumi.tencentcloud.ClsAlarmArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmMonitorNoticeArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmAlarmTargetArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmAnalysisArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmMonitorTimeArgs;
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 exampleMonitorNotice = new ClsAlarm("exampleMonitorNotice", ClsAlarmArgs.builder()
.name("tf-example-monitor-notice")
.monitorNotice(ClsAlarmMonitorNoticeArgs.builder()
.notices(
ClsAlarmMonitorNoticeNoticeArgs.builder()
.noticeId("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101")
.contentTmplId("tmpl-5f7c8a9b-1234-5678-90ab-cdef12345678")
.alarmLevels(
1.0,
2.0)
.build(),
ClsAlarmMonitorNoticeNoticeArgs.builder()
.noticeId("notice-d3bf54ff-2b5c-5d5b-bf4f-f92582391202")
.contentTmplId("tmpl-6g8d9b0c-2345-6789-01bc-def123456789")
.alarmLevels(3.0)
.build())
.build())
.alarmPeriod(15.0)
.condition("$1.errorCounts > 100")
.alarmLevel(1.0)
.messageTemplate("{{.Label}}")
.status(true)
.triggerCount(1.0)
.alarmTargets(ClsAlarmAlarmTargetArgs.builder()
.logsetId("e74efb8e-f647-48b2-a725-43f11b122081")
.topicId("59cf3ec0-1612-4157-be3f-341b2e7a53cb")
.query("status:>500 | select count(*) as errorCounts")
.startTimeOffset(-15.0)
.endTimeOffset(0.0)
.number(1.0)
.syntaxRule(1.0)
.build())
.analyses(ClsAlarmAnalysisArgs.builder()
.content("__FILENAME__")
.name("terraform")
.type("field")
.configInfos(ClsAlarmAnalysisConfigInfoArgs.builder()
.key("QueryIndex")
.value("1")
.build())
.build())
.monitorTime(ClsAlarmMonitorTimeArgs.builder()
.time(1.0)
.type("Period")
.build())
.classifications(Map.ofEntries(
Map.entry("env", "production"),
Map.entry("service", "data-pipeline")
))
.tags(Map.of("createdBy", "terraform"))
.build());
}
}
resources:
exampleMonitorNotice:
type: tencentcloud:ClsAlarm
name: example_monitor_notice
properties:
name: tf-example-monitor-notice
monitorNotice:
notices:
- noticeId: notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101
contentTmplId: tmpl-5f7c8a9b-1234-5678-90ab-cdef12345678
alarmLevels:
- 1
- 2
- noticeId: notice-d3bf54ff-2b5c-5d5b-bf4f-f92582391202
contentTmplId: tmpl-6g8d9b0c-2345-6789-01bc-def123456789
alarmLevels:
- 3
alarmPeriod: 15
condition: $1.errorCounts > 100
alarmLevel: 1
messageTemplate: '{{.Label}}'
status: true
triggerCount: 1
alarmTargets:
- logsetId: e74efb8e-f647-48b2-a725-43f11b122081
topicId: 59cf3ec0-1612-4157-be3f-341b2e7a53cb
query: status:>500 | select count(*) as errorCounts
startTimeOffset: -15
endTimeOffset: 0
number: 1
syntaxRule: 1
analyses:
- content: __FILENAME__
name: terraform
type: field
configInfos:
- key: QueryIndex
value: '1'
monitorTime:
time: 1
type: Period
classifications:
env: production
service: data-pipeline
tags:
createdBy: terraform
Use multi conditions
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.ClsAlarm("example", {
name: "tf-example",
alarmNoticeIds: ["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarmPeriod: 15,
messageTemplate: "{{.Label}}",
status: true,
triggerCount: 1,
alarmTargets: [{
logsetId: "e74efb8e-f647-48b2-a725-43f11b122081",
topicId: "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
query: "status:>500 | select count(*) as errorCounts",
startTimeOffset: -15,
endTimeOffset: 0,
number: 1,
syntaxRule: 1,
}],
analyses: [{
content: "__FILENAME__",
name: "terraform",
type: "field",
configInfos: [{
key: "QueryIndex",
value: "1",
}],
}],
multiConditions: [
{
condition: "[$1.__QUERYCOUNT__]> 0",
alarmLevel: 1,
},
{
condition: "$1.source='10.0.0.1'",
alarmLevel: 2,
},
],
monitorTime: {
time: 1,
type: "Period",
},
classifications: {
env: "staging",
service: "data-pipeline",
},
tags: {
createdBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.ClsAlarm("example",
name="tf-example",
alarm_notice_ids=["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarm_period=15,
message_template="{{.Label}}",
status=True,
trigger_count=1,
alarm_targets=[{
"logset_id": "e74efb8e-f647-48b2-a725-43f11b122081",
"topic_id": "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
"query": "status:>500 | select count(*) as errorCounts",
"start_time_offset": -15,
"end_time_offset": 0,
"number": 1,
"syntax_rule": 1,
}],
analyses=[{
"content": "__FILENAME__",
"name": "terraform",
"type": "field",
"config_infos": [{
"key": "QueryIndex",
"value": "1",
}],
}],
multi_conditions=[
{
"condition": "[$1.__QUERYCOUNT__]> 0",
"alarm_level": 1,
},
{
"condition": "$1.source='10.0.0.1'",
"alarm_level": 2,
},
],
monitor_time={
"time": 1,
"type": "Period",
},
classifications={
"env": "staging",
"service": "data-pipeline",
},
tags={
"createdBy": "terraform",
})
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.NewClsAlarm(ctx, "example", &tencentcloud.ClsAlarmArgs{
Name: pulumi.String("tf-example"),
AlarmNoticeIds: pulumi.StringArray{
pulumi.String("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"),
},
AlarmPeriod: pulumi.Float64(15),
MessageTemplate: pulumi.String("{{.Label}}"),
Status: pulumi.Bool(true),
TriggerCount: pulumi.Float64(1),
AlarmTargets: tencentcloud.ClsAlarmAlarmTargetArray{
&tencentcloud.ClsAlarmAlarmTargetArgs{
LogsetId: pulumi.String("e74efb8e-f647-48b2-a725-43f11b122081"),
TopicId: pulumi.String("59cf3ec0-1612-4157-be3f-341b2e7a53cb"),
Query: pulumi.String("status:>500 | select count(*) as errorCounts"),
StartTimeOffset: pulumi.Float64(-15),
EndTimeOffset: pulumi.Float64(0),
Number: pulumi.Float64(1),
SyntaxRule: pulumi.Float64(1),
},
},
Analyses: tencentcloud.ClsAlarmAnalysisArray{
&tencentcloud.ClsAlarmAnalysisArgs{
Content: pulumi.String("__FILENAME__"),
Name: pulumi.String("terraform"),
Type: pulumi.String("field"),
ConfigInfos: tencentcloud.ClsAlarmAnalysisConfigInfoArray{
&tencentcloud.ClsAlarmAnalysisConfigInfoArgs{
Key: pulumi.String("QueryIndex"),
Value: pulumi.String("1"),
},
},
},
},
MultiConditions: tencentcloud.ClsAlarmMultiConditionArray{
&tencentcloud.ClsAlarmMultiConditionArgs{
Condition: pulumi.String("[$1.__QUERYCOUNT__]> 0"),
AlarmLevel: pulumi.Float64(1),
},
&tencentcloud.ClsAlarmMultiConditionArgs{
Condition: pulumi.String("$1.source='10.0.0.1'"),
AlarmLevel: pulumi.Float64(2),
},
},
MonitorTime: &tencentcloud.ClsAlarmMonitorTimeArgs{
Time: pulumi.Float64(1),
Type: pulumi.String("Period"),
},
Classifications: pulumi.StringMap{
"env": pulumi.String("staging"),
"service": pulumi.String("data-pipeline"),
},
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
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.ClsAlarm("example", new()
{
Name = "tf-example",
AlarmNoticeIds = new[]
{
"notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
},
AlarmPeriod = 15,
MessageTemplate = "{{.Label}}",
Status = true,
TriggerCount = 1,
AlarmTargets = new[]
{
new Tencentcloud.Inputs.ClsAlarmAlarmTargetArgs
{
LogsetId = "e74efb8e-f647-48b2-a725-43f11b122081",
TopicId = "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
Query = "status:>500 | select count(*) as errorCounts",
StartTimeOffset = -15,
EndTimeOffset = 0,
Number = 1,
SyntaxRule = 1,
},
},
Analyses = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisArgs
{
Content = "__FILENAME__",
Name = "terraform",
Type = "field",
ConfigInfos = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisConfigInfoArgs
{
Key = "QueryIndex",
Value = "1",
},
},
},
},
MultiConditions = new[]
{
new Tencentcloud.Inputs.ClsAlarmMultiConditionArgs
{
Condition = "[$1.__QUERYCOUNT__]> 0",
AlarmLevel = 1,
},
new Tencentcloud.Inputs.ClsAlarmMultiConditionArgs
{
Condition = "$1.source='10.0.0.1'",
AlarmLevel = 2,
},
},
MonitorTime = new Tencentcloud.Inputs.ClsAlarmMonitorTimeArgs
{
Time = 1,
Type = "Period",
},
Classifications =
{
{ "env", "staging" },
{ "service", "data-pipeline" },
},
Tags =
{
{ "createdBy", "terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsAlarm;
import com.pulumi.tencentcloud.ClsAlarmArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmAlarmTargetArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmAnalysisArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmMultiConditionArgs;
import com.pulumi.tencentcloud.inputs.ClsAlarmMonitorTimeArgs;
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 ClsAlarm("example", ClsAlarmArgs.builder()
.name("tf-example")
.alarmNoticeIds("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101")
.alarmPeriod(15.0)
.messageTemplate("{{.Label}}")
.status(true)
.triggerCount(1.0)
.alarmTargets(ClsAlarmAlarmTargetArgs.builder()
.logsetId("e74efb8e-f647-48b2-a725-43f11b122081")
.topicId("59cf3ec0-1612-4157-be3f-341b2e7a53cb")
.query("status:>500 | select count(*) as errorCounts")
.startTimeOffset(-15.0)
.endTimeOffset(0.0)
.number(1.0)
.syntaxRule(1.0)
.build())
.analyses(ClsAlarmAnalysisArgs.builder()
.content("__FILENAME__")
.name("terraform")
.type("field")
.configInfos(ClsAlarmAnalysisConfigInfoArgs.builder()
.key("QueryIndex")
.value("1")
.build())
.build())
.multiConditions(
ClsAlarmMultiConditionArgs.builder()
.condition("[$1.__QUERYCOUNT__]> 0")
.alarmLevel(1.0)
.build(),
ClsAlarmMultiConditionArgs.builder()
.condition("$1.source='10.0.0.1'")
.alarmLevel(2.0)
.build())
.monitorTime(ClsAlarmMonitorTimeArgs.builder()
.time(1.0)
.type("Period")
.build())
.classifications(Map.ofEntries(
Map.entry("env", "staging"),
Map.entry("service", "data-pipeline")
))
.tags(Map.of("createdBy", "terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:ClsAlarm
properties:
name: tf-example
alarmNoticeIds:
- notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101
alarmPeriod: 15
messageTemplate: '{{.Label}}'
status: true
triggerCount: 1
alarmTargets:
- logsetId: e74efb8e-f647-48b2-a725-43f11b122081
topicId: 59cf3ec0-1612-4157-be3f-341b2e7a53cb
query: status:>500 | select count(*) as errorCounts
startTimeOffset: -15
endTimeOffset: 0
number: 1
syntaxRule: 1
analyses:
- content: __FILENAME__
name: terraform
type: field
configInfos:
- key: QueryIndex
value: '1'
multiConditions:
- condition: '[$1.__QUERYCOUNT__]> 0'
alarmLevel: 1
- condition: $1.source='10.0.0.1'
alarmLevel: 2
monitorTime:
time: 1
type: Period
classifications:
env: staging
service: data-pipeline
tags:
createdBy: terraform
Create ClsAlarm Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClsAlarm(name: string, args: ClsAlarmArgs, opts?: CustomResourceOptions);@overload
def ClsAlarm(resource_name: str,
args: ClsAlarmArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClsAlarm(resource_name: str,
opts: Optional[ResourceOptions] = None,
monitor_time: Optional[ClsAlarmMonitorTimeArgs] = None,
trigger_count: Optional[float] = None,
alarm_period: Optional[float] = None,
alarm_targets: Optional[Sequence[ClsAlarmAlarmTargetArgs]] = None,
condition: Optional[str] = None,
call_back: Optional[ClsAlarmCallBackArgs] = None,
classifications: Optional[Mapping[str, str]] = None,
cls_alarm_id: Optional[str] = None,
alarm_level: Optional[float] = None,
message_template: Optional[str] = None,
monitor_notice: Optional[ClsAlarmMonitorNoticeArgs] = None,
analyses: Optional[Sequence[ClsAlarmAnalysisArgs]] = None,
multi_conditions: Optional[Sequence[ClsAlarmMultiConditionArgs]] = None,
name: Optional[str] = None,
status: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
alarm_notice_ids: Optional[Sequence[str]] = None)func NewClsAlarm(ctx *Context, name string, args ClsAlarmArgs, opts ...ResourceOption) (*ClsAlarm, error)public ClsAlarm(string name, ClsAlarmArgs args, CustomResourceOptions? opts = null)
public ClsAlarm(String name, ClsAlarmArgs args)
public ClsAlarm(String name, ClsAlarmArgs args, CustomResourceOptions options)
type: tencentcloud:ClsAlarm
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 ClsAlarmArgs
- 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 ClsAlarmArgs
- 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 ClsAlarmArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClsAlarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClsAlarmArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClsAlarm 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 ClsAlarm resource accepts the following input properties:
- Alarm
Period double - alarm repeat cycle.
- Alarm
Targets List<ClsAlarm Alarm Target> - list of alarm target.
- Monitor
Time ClsAlarm Monitor Time - monitor task execution time.
- Trigger
Count double - continuous cycle.
- Alarm
Level double - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- Alarm
Notice List<string>Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Analyses
List<Cls
Alarm Analysis> - multidimensional analysis.
- Call
Back ClsAlarm Call Back - user define callback.
- Classifications Dictionary<string, string>
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- Monitor
Notice ClsAlarm Monitor Notice - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Multi
Conditions List<ClsAlarm Multi Condition> - Multiple triggering conditions.
- Name string
- log alarm name.
- Status bool
- whether to enable the alarm policy.
- Dictionary<string, string>
- Tag description list.
- Alarm
Period float64 - alarm repeat cycle.
- Alarm
Targets []ClsAlarm Alarm Target Args - list of alarm target.
- Monitor
Time ClsAlarm Monitor Time Args - monitor task execution time.
- Trigger
Count float64 - continuous cycle.
- Alarm
Level float64 - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- Alarm
Notice []stringIds - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Analyses
[]Cls
Alarm Analysis Args - multidimensional analysis.
- Call
Back ClsAlarm Call Back Args - user define callback.
- Classifications map[string]string
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- Monitor
Notice ClsAlarm Monitor Notice Args - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Multi
Conditions []ClsAlarm Multi Condition Args - Multiple triggering conditions.
- Name string
- log alarm name.
- Status bool
- whether to enable the alarm policy.
- map[string]string
- Tag description list.
- alarm
Period Double - alarm repeat cycle.
- alarm
Targets List<ClsAlarm Alarm Target> - list of alarm target.
- monitor
Time ClsAlarm Monitor Time - monitor task execution time.
- trigger
Count Double - continuous cycle.
- alarm
Level Double - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm
Notice List<String>Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- analyses
List<Cls
Alarm Analysis> - multidimensional analysis.
- call
Back ClsAlarm Call Back - user define callback.
- classifications Map<String,String>
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- monitor
Notice ClsAlarm Monitor Notice - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- multi
Conditions List<ClsAlarm Multi Condition> - Multiple triggering conditions.
- name String
- log alarm name.
- status Boolean
- whether to enable the alarm policy.
- Map<String,String>
- Tag description list.
- alarm
Period number - alarm repeat cycle.
- alarm
Targets ClsAlarm Alarm Target[] - list of alarm target.
- monitor
Time ClsAlarm Monitor Time - monitor task execution time.
- trigger
Count number - continuous cycle.
- alarm
Level number - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm
Notice string[]Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- analyses
Cls
Alarm Analysis[] - multidimensional analysis.
- call
Back ClsAlarm Call Back - user define callback.
- classifications {[key: string]: string}
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls
Alarm stringId - ID of the resource.
- condition string
- Trigger condition.
- message
Template string - user define alarm notice.
- monitor
Notice ClsAlarm Monitor Notice - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- multi
Conditions ClsAlarm Multi Condition[] - Multiple triggering conditions.
- name string
- log alarm name.
- status boolean
- whether to enable the alarm policy.
- {[key: string]: string}
- Tag description list.
- alarm_
period float - alarm repeat cycle.
- alarm_
targets Sequence[ClsAlarm Alarm Target Args] - list of alarm target.
- monitor_
time ClsAlarm Monitor Time Args - monitor task execution time.
- trigger_
count float - continuous cycle.
- alarm_
level float - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm_
notice_ Sequence[str]ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- analyses
Sequence[Cls
Alarm Analysis Args] - multidimensional analysis.
- call_
back ClsAlarm Call Back Args - user define callback.
- classifications Mapping[str, str]
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls_
alarm_ strid - ID of the resource.
- condition str
- Trigger condition.
- message_
template str - user define alarm notice.
- monitor_
notice ClsAlarm Monitor Notice Args - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- multi_
conditions Sequence[ClsAlarm Multi Condition Args] - Multiple triggering conditions.
- name str
- log alarm name.
- status bool
- whether to enable the alarm policy.
- Mapping[str, str]
- Tag description list.
- alarm
Period Number - alarm repeat cycle.
- alarm
Targets List<Property Map> - list of alarm target.
- monitor
Time Property Map - monitor task execution time.
- trigger
Count Number - continuous cycle.
- alarm
Level Number - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm
Notice List<String>Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- analyses List<Property Map>
- multidimensional analysis.
- call
Back Property Map - user define callback.
- classifications Map<String>
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- monitor
Notice Property Map - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- multi
Conditions List<Property Map> - Multiple triggering conditions.
- name String
- log alarm name.
- status Boolean
- whether to enable the alarm policy.
- Map<String>
- Tag description list.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClsAlarm 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 ClsAlarm Resource
Get an existing ClsAlarm 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?: ClsAlarmState, opts?: CustomResourceOptions): ClsAlarm@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alarm_level: Optional[float] = None,
alarm_notice_ids: Optional[Sequence[str]] = None,
alarm_period: Optional[float] = None,
alarm_targets: Optional[Sequence[ClsAlarmAlarmTargetArgs]] = None,
analyses: Optional[Sequence[ClsAlarmAnalysisArgs]] = None,
call_back: Optional[ClsAlarmCallBackArgs] = None,
classifications: Optional[Mapping[str, str]] = None,
cls_alarm_id: Optional[str] = None,
condition: Optional[str] = None,
message_template: Optional[str] = None,
monitor_notice: Optional[ClsAlarmMonitorNoticeArgs] = None,
monitor_time: Optional[ClsAlarmMonitorTimeArgs] = None,
multi_conditions: Optional[Sequence[ClsAlarmMultiConditionArgs]] = None,
name: Optional[str] = None,
status: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
trigger_count: Optional[float] = None) -> ClsAlarmfunc GetClsAlarm(ctx *Context, name string, id IDInput, state *ClsAlarmState, opts ...ResourceOption) (*ClsAlarm, error)public static ClsAlarm Get(string name, Input<string> id, ClsAlarmState? state, CustomResourceOptions? opts = null)public static ClsAlarm get(String name, Output<String> id, ClsAlarmState state, CustomResourceOptions options)resources: _: type: tencentcloud:ClsAlarm 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.
- Alarm
Level double - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- Alarm
Notice List<string>Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Alarm
Period double - alarm repeat cycle.
- Alarm
Targets List<ClsAlarm Alarm Target> - list of alarm target.
- Analyses
List<Cls
Alarm Analysis> - multidimensional analysis.
- Call
Back ClsAlarm Call Back - user define callback.
- Classifications Dictionary<string, string>
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- Monitor
Notice ClsAlarm Monitor Notice - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Monitor
Time ClsAlarm Monitor Time - monitor task execution time.
- Multi
Conditions List<ClsAlarm Multi Condition> - Multiple triggering conditions.
- Name string
- log alarm name.
- Status bool
- whether to enable the alarm policy.
- Dictionary<string, string>
- Tag description list.
- Trigger
Count double - continuous cycle.
- Alarm
Level float64 - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- Alarm
Notice []stringIds - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Alarm
Period float64 - alarm repeat cycle.
- Alarm
Targets []ClsAlarm Alarm Target Args - list of alarm target.
- Analyses
[]Cls
Alarm Analysis Args - multidimensional analysis.
- Call
Back ClsAlarm Call Back Args - user define callback.
- Classifications map[string]string
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- Monitor
Notice ClsAlarm Monitor Notice Args - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- Monitor
Time ClsAlarm Monitor Time Args - monitor task execution time.
- Multi
Conditions []ClsAlarm Multi Condition Args - Multiple triggering conditions.
- Name string
- log alarm name.
- Status bool
- whether to enable the alarm policy.
- map[string]string
- Tag description list.
- Trigger
Count float64 - continuous cycle.
- alarm
Level Double - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm
Notice List<String>Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- alarm
Period Double - alarm repeat cycle.
- alarm
Targets List<ClsAlarm Alarm Target> - list of alarm target.
- analyses
List<Cls
Alarm Analysis> - multidimensional analysis.
- call
Back ClsAlarm Call Back - user define callback.
- classifications Map<String,String>
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- monitor
Notice ClsAlarm Monitor Notice - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- monitor
Time ClsAlarm Monitor Time - monitor task execution time.
- multi
Conditions List<ClsAlarm Multi Condition> - Multiple triggering conditions.
- name String
- log alarm name.
- status Boolean
- whether to enable the alarm policy.
- Map<String,String>
- Tag description list.
- trigger
Count Double - continuous cycle.
- alarm
Level number - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm
Notice string[]Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- alarm
Period number - alarm repeat cycle.
- alarm
Targets ClsAlarm Alarm Target[] - list of alarm target.
- analyses
Cls
Alarm Analysis[] - multidimensional analysis.
- call
Back ClsAlarm Call Back - user define callback.
- classifications {[key: string]: string}
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls
Alarm stringId - ID of the resource.
- condition string
- Trigger condition.
- message
Template string - user define alarm notice.
- monitor
Notice ClsAlarm Monitor Notice - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- monitor
Time ClsAlarm Monitor Time - monitor task execution time.
- multi
Conditions ClsAlarm Multi Condition[] - Multiple triggering conditions.
- name string
- log alarm name.
- status boolean
- whether to enable the alarm policy.
- {[key: string]: string}
- Tag description list.
- trigger
Count number - continuous cycle.
- alarm_
level float - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm_
notice_ Sequence[str]ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- alarm_
period float - alarm repeat cycle.
- alarm_
targets Sequence[ClsAlarm Alarm Target Args] - list of alarm target.
- analyses
Sequence[Cls
Alarm Analysis Args] - multidimensional analysis.
- call_
back ClsAlarm Call Back Args - user define callback.
- classifications Mapping[str, str]
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls_
alarm_ strid - ID of the resource.
- condition str
- Trigger condition.
- message_
template str - user define alarm notice.
- monitor_
notice ClsAlarm Monitor Notice Args - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- monitor_
time ClsAlarm Monitor Time Args - monitor task execution time.
- multi_
conditions Sequence[ClsAlarm Multi Condition Args] - Multiple triggering conditions.
- name str
- log alarm name.
- status bool
- whether to enable the alarm policy.
- Mapping[str, str]
- Tag description list.
- trigger_
count float - continuous cycle.
- alarm
Level Number - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- alarm
Notice List<String>Ids - List of alarm notice id. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- alarm
Period Number - alarm repeat cycle.
- alarm
Targets List<Property Map> - list of alarm target.
- analyses List<Property Map>
- multidimensional analysis.
- call
Back Property Map - user define callback.
- classifications Map<String>
- Alarm classification information map. Key must match regex
^a-z$, value length cannot exceed 200 characters. Maximum 20 entries. - cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- monitor
Notice Property Map - Monitor notice configuration for observable platform. Note: AlarmNoticeIds and MonitorNotice cannot be set at the same time.
- monitor
Time Property Map - monitor task execution time.
- multi
Conditions List<Property Map> - Multiple triggering conditions.
- name String
- log alarm name.
- status Boolean
- whether to enable the alarm policy.
- Map<String>
- Tag description list.
- trigger
Count Number - continuous cycle.
Supporting Types
ClsAlarmAlarmTarget, ClsAlarmAlarmTargetArgs
- End
Time doubleOffset - search end time of offset.
- Logset
Id string - logset id.
- Number double
- the number of alarm object.
- Query string
- query rules.
- Start
Time doubleOffset - search start time of offset.
- Topic
Id string - topic id.
- Syntax
Rule double - Retrieve grammar rules, 0: Lucene syntax, 1: CQL syntax, Default value is 0.
- End
Time float64Offset - search end time of offset.
- Logset
Id string - logset id.
- Number float64
- the number of alarm object.
- Query string
- query rules.
- Start
Time float64Offset - search start time of offset.
- Topic
Id string - topic id.
- Syntax
Rule float64 - Retrieve grammar rules, 0: Lucene syntax, 1: CQL syntax, Default value is 0.
- end
Time DoubleOffset - search end time of offset.
- logset
Id String - logset id.
- number Double
- the number of alarm object.
- query String
- query rules.
- start
Time DoubleOffset - search start time of offset.
- topic
Id String - topic id.
- syntax
Rule Double - Retrieve grammar rules, 0: Lucene syntax, 1: CQL syntax, Default value is 0.
- end
Time numberOffset - search end time of offset.
- logset
Id string - logset id.
- number number
- the number of alarm object.
- query string
- query rules.
- start
Time numberOffset - search start time of offset.
- topic
Id string - topic id.
- syntax
Rule number - Retrieve grammar rules, 0: Lucene syntax, 1: CQL syntax, Default value is 0.
- end_
time_ floatoffset - search end time of offset.
- logset_
id str - logset id.
- number float
- the number of alarm object.
- query str
- query rules.
- start_
time_ floatoffset - search start time of offset.
- topic_
id str - topic id.
- syntax_
rule float - Retrieve grammar rules, 0: Lucene syntax, 1: CQL syntax, Default value is 0.
- end
Time NumberOffset - search end time of offset.
- logset
Id String - logset id.
- number Number
- the number of alarm object.
- query String
- query rules.
- start
Time NumberOffset - search start time of offset.
- topic
Id String - topic id.
- syntax
Rule Number - Retrieve grammar rules, 0: Lucene syntax, 1: CQL syntax, Default value is 0.
ClsAlarmAnalysis, ClsAlarmAnalysisArgs
- Content string
- analysis content.
- Name string
- analysis name.
- Type string
- analysis type.
- Config
Infos List<ClsAlarm Analysis Config Info> - configuration.
- Content string
- analysis content.
- Name string
- analysis name.
- Type string
- analysis type.
- Config
Infos []ClsAlarm Analysis Config Info - configuration.
- content String
- analysis content.
- name String
- analysis name.
- type String
- analysis type.
- config
Infos List<ClsAlarm Analysis Config Info> - configuration.
- content string
- analysis content.
- name string
- analysis name.
- type string
- analysis type.
- config
Infos ClsAlarm Analysis Config Info[] - configuration.
- content str
- analysis content.
- name str
- analysis name.
- type str
- analysis type.
- config_
infos Sequence[ClsAlarm Analysis Config Info] - configuration.
- content String
- analysis content.
- name String
- analysis name.
- type String
- analysis type.
- config
Infos List<Property Map> - configuration.
ClsAlarmAnalysisConfigInfo, ClsAlarmAnalysisConfigInfoArgs
ClsAlarmCallBack, ClsAlarmCallBackArgs
ClsAlarmMonitorNotice, ClsAlarmMonitorNoticeArgs
- Notices
List<Cls
Alarm Monitor Notice Notice> - List of monitor notice rules.
- Notices
[]Cls
Alarm Monitor Notice Notice - List of monitor notice rules.
- notices
List<Cls
Alarm Monitor Notice Notice> - List of monitor notice rules.
- notices
Cls
Alarm Monitor Notice Notice[] - List of monitor notice rules.
- notices
Sequence[Cls
Alarm Monitor Notice Notice] - List of monitor notice rules.
- notices List<Property Map>
- List of monitor notice rules.
ClsAlarmMonitorNoticeNotice, ClsAlarmMonitorNoticeNoticeArgs
- Notice
Id string - Observable platform notification template ID.
- Alarm
Levels List<double> - Alarm levels. 0: Warning; 1: Info; 2: Critical.
- Content
Tmpl stringId - Observable platform content template ID. If empty, use default content template.
- Notice
Id string - Observable platform notification template ID.
- Alarm
Levels []float64 - Alarm levels. 0: Warning; 1: Info; 2: Critical.
- Content
Tmpl stringId - Observable platform content template ID. If empty, use default content template.
- notice
Id String - Observable platform notification template ID.
- alarm
Levels List<Double> - Alarm levels. 0: Warning; 1: Info; 2: Critical.
- content
Tmpl StringId - Observable platform content template ID. If empty, use default content template.
- notice
Id string - Observable platform notification template ID.
- alarm
Levels number[] - Alarm levels. 0: Warning; 1: Info; 2: Critical.
- content
Tmpl stringId - Observable platform content template ID. If empty, use default content template.
- notice_
id str - Observable platform notification template ID.
- alarm_
levels Sequence[float] - Alarm levels. 0: Warning; 1: Info; 2: Critical.
- content_
tmpl_ strid - Observable platform content template ID. If empty, use default content template.
- notice
Id String - Observable platform notification template ID.
- alarm
Levels List<Number> - Alarm levels. 0: Warning; 1: Info; 2: Critical.
- content
Tmpl StringId - Observable platform content template ID. If empty, use default content template.
ClsAlarmMonitorTime, ClsAlarmMonitorTimeArgs
ClsAlarmMultiCondition, ClsAlarmMultiConditionArgs
- Alarm
Level double - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- Condition string
- Trigger condition.
- Alarm
Level float64 - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- Condition string
- Trigger condition.
- alarm
Level Double - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- condition String
- Trigger condition.
- alarm
Level number - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- condition string
- Trigger condition.
- alarm_
level float - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- condition str
- Trigger condition.
- alarm
Level Number - Alarm level. 0: Warning; 1: Info; 2: Critical. Default is 0.
- condition String
- Trigger condition.
Import
cls alarm can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clsAlarm:ClsAlarm example alarm-d8529662-e10f-440c-ba80-50f3dcf215a3
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.
published on Wednesday, Mar 25, 2026 by tencentcloudstack
