tencentcloud.ClsAlarm
Explore with Pulumi AI
Provides a resource to create a cls alarm
Example Usage
Use single condition
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.ClsAlarm("example", {
alarmLevel: 1,
alarmNoticeIds: ["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarmPeriod: 15,
alarmTargets: [{
endTimeOffset: 0,
logsetId: "e74efb8e-f647-48b2-a725-43f11b122081",
number: 1,
query: "status:>500 | select count(*) as errorCounts",
startTimeOffset: -15,
syntaxRule: 1,
topicId: "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
}],
analyses: [{
configInfos: [{
key: "QueryIndex",
value: "1",
}],
content: "__FILENAME__",
name: "terraform",
type: "field",
}],
condition: "$1.source='10.0.0.1'",
messageTemplate: "{{.Label}}",
monitorTime: {
time: 1,
type: "Period",
},
status: true,
tags: {
createdBy: "terraform",
},
triggerCount: 1,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.ClsAlarm("example",
alarm_level=1,
alarm_notice_ids=["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarm_period=15,
alarm_targets=[{
"end_time_offset": 0,
"logset_id": "e74efb8e-f647-48b2-a725-43f11b122081",
"number": 1,
"query": "status:>500 | select count(*) as errorCounts",
"start_time_offset": -15,
"syntax_rule": 1,
"topic_id": "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
}],
analyses=[{
"config_infos": [{
"key": "QueryIndex",
"value": "1",
}],
"content": "__FILENAME__",
"name": "terraform",
"type": "field",
}],
condition="$1.source='10.0.0.1'",
message_template="{{.Label}}",
monitor_time={
"time": 1,
"type": "Period",
},
status=True,
tags={
"createdBy": "terraform",
},
trigger_count=1)
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{
AlarmLevel: pulumi.Float64(1),
AlarmNoticeIds: pulumi.StringArray{
pulumi.String("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"),
},
AlarmPeriod: pulumi.Float64(15),
AlarmTargets: tencentcloud.ClsAlarmAlarmTargetArray{
&tencentcloud.ClsAlarmAlarmTargetArgs{
EndTimeOffset: pulumi.Float64(0),
LogsetId: pulumi.String("e74efb8e-f647-48b2-a725-43f11b122081"),
Number: pulumi.Float64(1),
Query: pulumi.String("status:>500 | select count(*) as errorCounts"),
StartTimeOffset: pulumi.Float64(-15),
SyntaxRule: pulumi.Float64(1),
TopicId: pulumi.String("59cf3ec0-1612-4157-be3f-341b2e7a53cb"),
},
},
Analyses: tencentcloud.ClsAlarmAnalysisArray{
&tencentcloud.ClsAlarmAnalysisArgs{
ConfigInfos: tencentcloud.ClsAlarmAnalysisConfigInfoArray{
&tencentcloud.ClsAlarmAnalysisConfigInfoArgs{
Key: pulumi.String("QueryIndex"),
Value: pulumi.String("1"),
},
},
Content: pulumi.String("__FILENAME__"),
Name: pulumi.String("terraform"),
Type: pulumi.String("field"),
},
},
Condition: pulumi.String("$1.source='10.0.0.1'"),
MessageTemplate: pulumi.String("{{.Label}}"),
MonitorTime: &tencentcloud.ClsAlarmMonitorTimeArgs{
Time: pulumi.Float64(1),
Type: pulumi.String("Period"),
},
Status: pulumi.Bool(true),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
TriggerCount: pulumi.Float64(1),
})
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()
{
AlarmLevel = 1,
AlarmNoticeIds = new[]
{
"notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
},
AlarmPeriod = 15,
AlarmTargets = new[]
{
new Tencentcloud.Inputs.ClsAlarmAlarmTargetArgs
{
EndTimeOffset = 0,
LogsetId = "e74efb8e-f647-48b2-a725-43f11b122081",
Number = 1,
Query = "status:>500 | select count(*) as errorCounts",
StartTimeOffset = -15,
SyntaxRule = 1,
TopicId = "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
},
},
Analyses = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisArgs
{
ConfigInfos = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisConfigInfoArgs
{
Key = "QueryIndex",
Value = "1",
},
},
Content = "__FILENAME__",
Name = "terraform",
Type = "field",
},
},
Condition = "$1.source='10.0.0.1'",
MessageTemplate = "{{.Label}}",
MonitorTime = new Tencentcloud.Inputs.ClsAlarmMonitorTimeArgs
{
Time = 1,
Type = "Period",
},
Status = true,
Tags =
{
{ "createdBy", "terraform" },
},
TriggerCount = 1,
});
});
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()
.alarmLevel(1)
.alarmNoticeIds("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101")
.alarmPeriod(15)
.alarmTargets(ClsAlarmAlarmTargetArgs.builder()
.endTimeOffset(0)
.logsetId("e74efb8e-f647-48b2-a725-43f11b122081")
.number(1)
.query("status:>500 | select count(*) as errorCounts")
.startTimeOffset(-15)
.syntaxRule(1)
.topicId("59cf3ec0-1612-4157-be3f-341b2e7a53cb")
.build())
.analyses(ClsAlarmAnalysisArgs.builder()
.configInfos(ClsAlarmAnalysisConfigInfoArgs.builder()
.key("QueryIndex")
.value("1")
.build())
.content("__FILENAME__")
.name("terraform")
.type("field")
.build())
.condition("$1.source='10.0.0.1'")
.messageTemplate("{{.Label}}")
.monitorTime(ClsAlarmMonitorTimeArgs.builder()
.time(1)
.type("Period")
.build())
.status(true)
.tags(Map.of("createdBy", "terraform"))
.triggerCount(1)
.build());
}
}
resources:
example:
type: tencentcloud:ClsAlarm
properties:
alarmLevel: 1
alarmNoticeIds:
- notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101
alarmPeriod: 15
alarmTargets:
- endTimeOffset: 0
logsetId: e74efb8e-f647-48b2-a725-43f11b122081
number: 1
query: status:>500 | select count(*) as errorCounts
startTimeOffset: -15
syntaxRule: 1
topicId: 59cf3ec0-1612-4157-be3f-341b2e7a53cb
analyses:
- configInfos:
- key: QueryIndex
value: '1'
content: __FILENAME__
name: terraform
type: field
condition: $1.source='10.0.0.1'
messageTemplate: '{{.Label}}'
monitorTime:
time: 1
type: Period
status: true
tags:
createdBy: terraform
triggerCount: 1
Use multi conditions
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.ClsAlarm("example", {
alarmNoticeIds: ["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarmPeriod: 15,
alarmTargets: [{
endTimeOffset: 0,
logsetId: "e74efb8e-f647-48b2-a725-43f11b122081",
number: 1,
query: "status:>500 | select count(*) as errorCounts",
startTimeOffset: -15,
syntaxRule: 1,
topicId: "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
}],
analyses: [{
configInfos: [{
key: "QueryIndex",
value: "1",
}],
content: "__FILENAME__",
name: "terraform",
type: "field",
}],
messageTemplate: "{{.Label}}",
monitorTime: {
time: 1,
type: "Period",
},
multiConditions: [
{
alarmLevel: 1,
condition: "[$1.__QUERYCOUNT__]> 0",
},
{
alarmLevel: 2,
condition: "$1.source='10.0.0.1'",
},
],
status: true,
tags: {
createdBy: "terraform",
},
triggerCount: 1,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.ClsAlarm("example",
alarm_notice_ids=["notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"],
alarm_period=15,
alarm_targets=[{
"end_time_offset": 0,
"logset_id": "e74efb8e-f647-48b2-a725-43f11b122081",
"number": 1,
"query": "status:>500 | select count(*) as errorCounts",
"start_time_offset": -15,
"syntax_rule": 1,
"topic_id": "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
}],
analyses=[{
"config_infos": [{
"key": "QueryIndex",
"value": "1",
}],
"content": "__FILENAME__",
"name": "terraform",
"type": "field",
}],
message_template="{{.Label}}",
monitor_time={
"time": 1,
"type": "Period",
},
multi_conditions=[
{
"alarm_level": 1,
"condition": "[$1.__QUERYCOUNT__]> 0",
},
{
"alarm_level": 2,
"condition": "$1.source='10.0.0.1'",
},
],
status=True,
tags={
"createdBy": "terraform",
},
trigger_count=1)
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{
AlarmNoticeIds: pulumi.StringArray{
pulumi.String("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101"),
},
AlarmPeriod: pulumi.Float64(15),
AlarmTargets: tencentcloud.ClsAlarmAlarmTargetArray{
&tencentcloud.ClsAlarmAlarmTargetArgs{
EndTimeOffset: pulumi.Float64(0),
LogsetId: pulumi.String("e74efb8e-f647-48b2-a725-43f11b122081"),
Number: pulumi.Float64(1),
Query: pulumi.String("status:>500 | select count(*) as errorCounts"),
StartTimeOffset: pulumi.Float64(-15),
SyntaxRule: pulumi.Float64(1),
TopicId: pulumi.String("59cf3ec0-1612-4157-be3f-341b2e7a53cb"),
},
},
Analyses: tencentcloud.ClsAlarmAnalysisArray{
&tencentcloud.ClsAlarmAnalysisArgs{
ConfigInfos: tencentcloud.ClsAlarmAnalysisConfigInfoArray{
&tencentcloud.ClsAlarmAnalysisConfigInfoArgs{
Key: pulumi.String("QueryIndex"),
Value: pulumi.String("1"),
},
},
Content: pulumi.String("__FILENAME__"),
Name: pulumi.String("terraform"),
Type: pulumi.String("field"),
},
},
MessageTemplate: pulumi.String("{{.Label}}"),
MonitorTime: &tencentcloud.ClsAlarmMonitorTimeArgs{
Time: pulumi.Float64(1),
Type: pulumi.String("Period"),
},
MultiConditions: tencentcloud.ClsAlarmMultiConditionArray{
&tencentcloud.ClsAlarmMultiConditionArgs{
AlarmLevel: pulumi.Float64(1),
Condition: pulumi.String("[$1.__QUERYCOUNT__]> 0"),
},
&tencentcloud.ClsAlarmMultiConditionArgs{
AlarmLevel: pulumi.Float64(2),
Condition: pulumi.String("$1.source='10.0.0.1'"),
},
},
Status: pulumi.Bool(true),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
TriggerCount: pulumi.Float64(1),
})
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()
{
AlarmNoticeIds = new[]
{
"notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101",
},
AlarmPeriod = 15,
AlarmTargets = new[]
{
new Tencentcloud.Inputs.ClsAlarmAlarmTargetArgs
{
EndTimeOffset = 0,
LogsetId = "e74efb8e-f647-48b2-a725-43f11b122081",
Number = 1,
Query = "status:>500 | select count(*) as errorCounts",
StartTimeOffset = -15,
SyntaxRule = 1,
TopicId = "59cf3ec0-1612-4157-be3f-341b2e7a53cb",
},
},
Analyses = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisArgs
{
ConfigInfos = new[]
{
new Tencentcloud.Inputs.ClsAlarmAnalysisConfigInfoArgs
{
Key = "QueryIndex",
Value = "1",
},
},
Content = "__FILENAME__",
Name = "terraform",
Type = "field",
},
},
MessageTemplate = "{{.Label}}",
MonitorTime = new Tencentcloud.Inputs.ClsAlarmMonitorTimeArgs
{
Time = 1,
Type = "Period",
},
MultiConditions = new[]
{
new Tencentcloud.Inputs.ClsAlarmMultiConditionArgs
{
AlarmLevel = 1,
Condition = "[$1.__QUERYCOUNT__]> 0",
},
new Tencentcloud.Inputs.ClsAlarmMultiConditionArgs
{
AlarmLevel = 2,
Condition = "$1.source='10.0.0.1'",
},
},
Status = true,
Tags =
{
{ "createdBy", "terraform" },
},
TriggerCount = 1,
});
});
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 com.pulumi.tencentcloud.inputs.ClsAlarmMultiConditionArgs;
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()
.alarmNoticeIds("notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101")
.alarmPeriod(15)
.alarmTargets(ClsAlarmAlarmTargetArgs.builder()
.endTimeOffset(0)
.logsetId("e74efb8e-f647-48b2-a725-43f11b122081")
.number(1)
.query("status:>500 | select count(*) as errorCounts")
.startTimeOffset(-15)
.syntaxRule(1)
.topicId("59cf3ec0-1612-4157-be3f-341b2e7a53cb")
.build())
.analyses(ClsAlarmAnalysisArgs.builder()
.configInfos(ClsAlarmAnalysisConfigInfoArgs.builder()
.key("QueryIndex")
.value("1")
.build())
.content("__FILENAME__")
.name("terraform")
.type("field")
.build())
.messageTemplate("{{.Label}}")
.monitorTime(ClsAlarmMonitorTimeArgs.builder()
.time(1)
.type("Period")
.build())
.multiConditions(
ClsAlarmMultiConditionArgs.builder()
.alarmLevel(1)
.condition("[$1.__QUERYCOUNT__]> 0")
.build(),
ClsAlarmMultiConditionArgs.builder()
.alarmLevel(2)
.condition("$1.source='10.0.0.1'")
.build())
.status(true)
.tags(Map.of("createdBy", "terraform"))
.triggerCount(1)
.build());
}
}
resources:
example:
type: tencentcloud:ClsAlarm
properties:
alarmNoticeIds:
- notice-c2af43ee-1a4b-4c4a-ae3e-f81481280101
alarmPeriod: 15
alarmTargets:
- endTimeOffset: 0
logsetId: e74efb8e-f647-48b2-a725-43f11b122081
number: 1
query: status:>500 | select count(*) as errorCounts
startTimeOffset: -15
syntaxRule: 1
topicId: 59cf3ec0-1612-4157-be3f-341b2e7a53cb
analyses:
- configInfos:
- key: QueryIndex
value: '1'
content: __FILENAME__
name: terraform
type: field
messageTemplate: '{{.Label}}'
monitorTime:
time: 1
type: Period
multiConditions:
- alarmLevel: 1
condition: '[$1.__QUERYCOUNT__]> 0'
- alarmLevel: 2
condition: $1.source='10.0.0.1'
status: true
tags:
createdBy: terraform
triggerCount: 1
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,
alarm_notice_ids: Optional[Sequence[str]] = None,
alarm_period: Optional[float] = None,
alarm_targets: Optional[Sequence[ClsAlarmAlarmTargetArgs]] = None,
trigger_count: Optional[float] = None,
multi_conditions: Optional[Sequence[ClsAlarmMultiConditionArgs]] = None,
call_back: Optional[ClsAlarmCallBackArgs] = None,
message_template: Optional[str] = None,
cls_alarm_id: Optional[str] = None,
alarm_level: Optional[float] = None,
condition: Optional[str] = None,
name: Optional[str] = None,
status: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
analyses: Optional[Sequence[ClsAlarmAnalysisArgs]] = 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
Notice List<string>Ids - list of alarm notice id.
- 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.
- Analyses
List<Cls
Alarm Analysis> - multidimensional analysis.
- Call
Back ClsAlarm Call Back - user define callback.
- Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- 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
Notice []stringIds - list of alarm notice id.
- 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.
- Analyses
[]Cls
Alarm Analysis Args - multidimensional analysis.
- Call
Back ClsAlarm Call Back Args - user define callback.
- Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- 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
Notice List<String>Ids - list of alarm notice id.
- 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.
- analyses
List<Cls
Alarm Analysis> - multidimensional analysis.
- call
Back ClsAlarm Call Back - user define callback.
- cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- 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
Notice string[]Ids - list of alarm notice id.
- 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.
- analyses
Cls
Alarm Analysis[] - multidimensional analysis.
- call
Back ClsAlarm Call Back - user define callback.
- cls
Alarm stringId - ID of the resource.
- condition string
- Trigger condition.
- message
Template string - user define alarm notice.
- 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_
notice_ Sequence[str]ids - list of alarm notice id.
- 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.
- analyses
Sequence[Cls
Alarm Analysis Args] - multidimensional analysis.
- call_
back ClsAlarm Call Back Args - user define callback.
- cls_
alarm_ strid - ID of the resource.
- condition str
- Trigger condition.
- message_
template str - user define alarm notice.
- 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
Notice List<String>Ids - list of alarm notice id.
- 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.
- analyses List<Property Map>
- multidimensional analysis.
- call
Back Property Map - user define callback.
- cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- 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,
cls_alarm_id: Optional[str] = None,
condition: Optional[str] = None,
message_template: Optional[str] = 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) -> ClsAlarm
func 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.
- 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.
- Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- 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.
- 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.
- Cls
Alarm stringId - ID of the resource.
- Condition string
- Trigger condition.
- Message
Template string - user define alarm notice.
- 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.
- 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.
- cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- 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.
- 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.
- cls
Alarm stringId - ID of the resource.
- condition string
- Trigger condition.
- message
Template string - user define alarm notice.
- 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.
- 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.
- cls_
alarm_ strid - ID of the resource.
- condition str
- Trigger condition.
- message_
template str - user define alarm notice.
- 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.
- 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.
- cls
Alarm StringId - ID of the resource.
- condition String
- Trigger condition.
- message
Template String - user define alarm notice.
- 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
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
tencentcloud
Terraform Provider.