volcengine.cloud_monitor.EventRule
Explore with Pulumi AI
Provides a resource to manage cloud monitor event rule
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Cloud_monitor.EventRule("foo", new()
{
ContactGroupIds = new[]
{
"1737941730782699520",
"1737940985502777344",
},
ContactMethods = new[]
{
"Phone",
"TLS",
"MQ",
},
EffectiveTime = new Volcengine.Cloud_monitor.Inputs.EventRuleEffectiveTimeArgs
{
EndTime = "22:00",
StartTime = "01:00",
},
EventSource = "ecs",
EventTypes = new[]
{
"ecs:Disk:DiskError.Redeploy.Canceled",
},
FilterPattern = new Volcengine.Cloud_monitor.Inputs.EventRuleFilterPatternArgs
{
Source = "ecs",
Types = new[]
{
"ecs:Disk:DiskError.Redeploy.Canceled",
},
},
Level = "notice",
MessageQueues = new[]
{
new Volcengine.Cloud_monitor.Inputs.EventRuleMessageQueueArgs
{
InstanceId = "kafka-cnoe4rfrsqfb1d64",
Region = "*****",
Topic = "tftest",
Type = "kafka",
VpcId = "vpc-2d68hz41j7qio58ozfd6jxgtb",
},
},
RuleName = "tftest1",
Status = "enable",
TlsTargets = new[]
{
new Volcengine.Cloud_monitor.Inputs.EventRuleTlsTargetArgs
{
ProjectId = "17ba378d-de43-495e-8906-03ae6567b376",
ProjectName = "tf-test",
RegionNameCn = "*****",
RegionNameEn = "*****",
TopicId = "7ce12237-6670-44a7-9d79-2e36961586e6",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_monitor"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloud_monitor.NewEventRule(ctx, "foo", &cloud_monitor.EventRuleArgs{
ContactGroupIds: pulumi.StringArray{
pulumi.String("1737941730782699520"),
pulumi.String("1737940985502777344"),
},
ContactMethods: pulumi.StringArray{
pulumi.String("Phone"),
pulumi.String("TLS"),
pulumi.String("MQ"),
},
EffectiveTime: &cloud_monitor.EventRuleEffectiveTimeArgs{
EndTime: pulumi.String("22:00"),
StartTime: pulumi.String("01:00"),
},
EventSource: pulumi.String("ecs"),
EventTypes: pulumi.StringArray{
pulumi.String("ecs:Disk:DiskError.Redeploy.Canceled"),
},
FilterPattern: &cloud_monitor.EventRuleFilterPatternArgs{
Source: pulumi.String("ecs"),
Types: pulumi.StringArray{
pulumi.String("ecs:Disk:DiskError.Redeploy.Canceled"),
},
},
Level: pulumi.String("notice"),
MessageQueues: cloud_monitor.EventRuleMessageQueueArray{
&cloud_monitor.EventRuleMessageQueueArgs{
InstanceId: pulumi.String("kafka-cnoe4rfrsqfb1d64"),
Region: pulumi.String("*****"),
Topic: pulumi.String("tftest"),
Type: pulumi.String("kafka"),
VpcId: pulumi.String("vpc-2d68hz41j7qio58ozfd6jxgtb"),
},
},
RuleName: pulumi.String("tftest1"),
Status: pulumi.String("enable"),
TlsTargets: cloud_monitor.EventRuleTlsTargetArray{
&cloud_monitor.EventRuleTlsTargetArgs{
ProjectId: pulumi.String("17ba378d-de43-495e-8906-03ae6567b376"),
ProjectName: pulumi.String("tf-test"),
RegionNameCn: pulumi.String("*****"),
RegionNameEn: pulumi.String("*****"),
TopicId: pulumi.String("7ce12237-6670-44a7-9d79-2e36961586e6"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cloud_monitor.EventRule;
import com.pulumi.volcengine.cloud_monitor.EventRuleArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.EventRuleEffectiveTimeArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.EventRuleFilterPatternArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.EventRuleMessageQueueArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.EventRuleTlsTargetArgs;
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 foo = new EventRule("foo", EventRuleArgs.builder()
.contactGroupIds(
"1737941730782699520",
"1737940985502777344")
.contactMethods(
"Phone",
"TLS",
"MQ")
.effectiveTime(EventRuleEffectiveTimeArgs.builder()
.endTime("22:00")
.startTime("01:00")
.build())
.eventSource("ecs")
.eventTypes("ecs:Disk:DiskError.Redeploy.Canceled")
.filterPattern(EventRuleFilterPatternArgs.builder()
.source("ecs")
.types("ecs:Disk:DiskError.Redeploy.Canceled")
.build())
.level("notice")
.messageQueues(EventRuleMessageQueueArgs.builder()
.instanceId("kafka-cnoe4rfrsqfb1d64")
.region("*****")
.topic("tftest")
.type("kafka")
.vpcId("vpc-2d68hz41j7qio58ozfd6jxgtb")
.build())
.ruleName("tftest1")
.status("enable")
.tlsTargets(EventRuleTlsTargetArgs.builder()
.projectId("17ba378d-de43-495e-8906-03ae6567b376")
.projectName("tf-test")
.regionNameCn("*****")
.regionNameEn("*****")
.topicId("7ce12237-6670-44a7-9d79-2e36961586e6")
.build())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.cloud_monitor.EventRule("foo",
contact_group_ids=[
"1737941730782699520",
"1737940985502777344",
],
contact_methods=[
"Phone",
"TLS",
"MQ",
],
effective_time=volcengine.cloud_monitor.EventRuleEffectiveTimeArgs(
end_time="22:00",
start_time="01:00",
),
event_source="ecs",
event_types=["ecs:Disk:DiskError.Redeploy.Canceled"],
filter_pattern=volcengine.cloud_monitor.EventRuleFilterPatternArgs(
source="ecs",
types=["ecs:Disk:DiskError.Redeploy.Canceled"],
),
level="notice",
message_queues=[volcengine.cloud_monitor.EventRuleMessageQueueArgs(
instance_id="kafka-cnoe4rfrsqfb1d64",
region="*****",
topic="tftest",
type="kafka",
vpc_id="vpc-2d68hz41j7qio58ozfd6jxgtb",
)],
rule_name="tftest1",
status="enable",
tls_targets=[volcengine.cloud_monitor.EventRuleTlsTargetArgs(
project_id="17ba378d-de43-495e-8906-03ae6567b376",
project_name="tf-test",
region_name_cn="*****",
region_name_en="*****",
topic_id="7ce12237-6670-44a7-9d79-2e36961586e6",
)])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.cloud_monitor.EventRule("foo", {
contactGroupIds: [
"1737941730782699520",
"1737940985502777344",
],
contactMethods: [
"Phone",
"TLS",
"MQ",
],
effectiveTime: {
endTime: "22:00",
startTime: "01:00",
},
eventSource: "ecs",
eventTypes: ["ecs:Disk:DiskError.Redeploy.Canceled"],
filterPattern: {
source: "ecs",
types: ["ecs:Disk:DiskError.Redeploy.Canceled"],
},
level: "notice",
messageQueues: [{
instanceId: "kafka-cnoe4rfrsqfb1d64",
region: "*****",
topic: "tftest",
type: "kafka",
vpcId: "vpc-2d68hz41j7qio58ozfd6jxgtb",
}],
ruleName: "tftest1",
status: "enable",
tlsTargets: [{
projectId: "17ba378d-de43-495e-8906-03ae6567b376",
projectName: "tf-test",
regionNameCn: "*****",
regionNameEn: "*****",
topicId: "7ce12237-6670-44a7-9d79-2e36961586e6",
}],
});
resources:
foo:
type: volcengine:cloud_monitor:EventRule
properties:
contactGroupIds:
- '1737941730782699520'
- '1737940985502777344'
contactMethods:
- Phone
- TLS
- MQ
effectiveTime:
endTime: 22:00
startTime: 01:00
eventSource: ecs
eventTypes:
- ecs:Disk:DiskError.Redeploy.Canceled
filterPattern:
source: ecs
types:
- ecs:Disk:DiskError.Redeploy.Canceled
level: notice
messageQueues:
- instanceId: kafka-cnoe4rfrsqfb1d64
region: '*****'
topic: tftest
type: kafka
vpcId: vpc-2d68hz41j7qio58ozfd6jxgtb
ruleName: tftest1
status: enable
tlsTargets:
- projectId: 17ba378d-de43-495e-8906-03ae6567b376
projectName: tf-test
regionNameCn: '*****'
regionNameEn: '*****'
topicId: 7ce12237-6670-44a7-9d79-2e36961586e6
Create EventRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EventRule(name: string, args: EventRuleArgs, opts?: CustomResourceOptions);
@overload
def EventRule(resource_name: str,
args: EventRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EventRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
filter_pattern: Optional[EventRuleFilterPatternArgs] = None,
contact_methods: Optional[Sequence[str]] = None,
rule_name: Optional[str] = None,
effective_time: Optional[EventRuleEffectiveTimeArgs] = None,
level: Optional[str] = None,
event_source: Optional[str] = None,
event_types: Optional[Sequence[str]] = None,
contact_group_ids: Optional[Sequence[str]] = None,
endpoint: Optional[str] = None,
message_queues: Optional[Sequence[EventRuleMessageQueueArgs]] = None,
description: Optional[str] = None,
status: Optional[str] = None,
tls_targets: Optional[Sequence[EventRuleTlsTargetArgs]] = None)
func NewEventRule(ctx *Context, name string, args EventRuleArgs, opts ...ResourceOption) (*EventRule, error)
public EventRule(string name, EventRuleArgs args, CustomResourceOptions? opts = null)
public EventRule(String name, EventRuleArgs args)
public EventRule(String name, EventRuleArgs args, CustomResourceOptions options)
type: volcengine:cloud_monitor:EventRule
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 EventRuleArgs
- 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 EventRuleArgs
- 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 EventRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EventRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EventRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var eventRuleResource = new Volcengine.Cloud_monitor.EventRule("eventRuleResource", new()
{
FilterPattern = new Volcengine.Cloud_monitor.Inputs.EventRuleFilterPatternArgs
{
Source = "string",
Types = new[]
{
"string",
},
},
ContactMethods = new[]
{
"string",
},
RuleName = "string",
EffectiveTime = new Volcengine.Cloud_monitor.Inputs.EventRuleEffectiveTimeArgs
{
EndTime = "string",
StartTime = "string",
},
Level = "string",
EventSource = "string",
EventTypes = new[]
{
"string",
},
ContactGroupIds = new[]
{
"string",
},
Endpoint = "string",
MessageQueues = new[]
{
new Volcengine.Cloud_monitor.Inputs.EventRuleMessageQueueArgs
{
InstanceId = "string",
Region = "string",
Topic = "string",
Type = "string",
VpcId = "string",
},
},
Description = "string",
Status = "string",
TlsTargets = new[]
{
new Volcengine.Cloud_monitor.Inputs.EventRuleTlsTargetArgs
{
ProjectId = "string",
ProjectName = "string",
RegionNameCn = "string",
RegionNameEn = "string",
TopicId = "string",
},
},
});
example, err := cloud_monitor.NewEventRule(ctx, "eventRuleResource", &cloud_monitor.EventRuleArgs{
FilterPattern: &cloud_monitor.EventRuleFilterPatternArgs{
Source: pulumi.String("string"),
Types: pulumi.StringArray{
pulumi.String("string"),
},
},
ContactMethods: pulumi.StringArray{
pulumi.String("string"),
},
RuleName: pulumi.String("string"),
EffectiveTime: &cloud_monitor.EventRuleEffectiveTimeArgs{
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
Level: pulumi.String("string"),
EventSource: pulumi.String("string"),
EventTypes: pulumi.StringArray{
pulumi.String("string"),
},
ContactGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
Endpoint: pulumi.String("string"),
MessageQueues: cloud_monitor.EventRuleMessageQueueArray{
&cloud_monitor.EventRuleMessageQueueArgs{
InstanceId: pulumi.String("string"),
Region: pulumi.String("string"),
Topic: pulumi.String("string"),
Type: pulumi.String("string"),
VpcId: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Status: pulumi.String("string"),
TlsTargets: cloud_monitor.EventRuleTlsTargetArray{
&cloud_monitor.EventRuleTlsTargetArgs{
ProjectId: pulumi.String("string"),
ProjectName: pulumi.String("string"),
RegionNameCn: pulumi.String("string"),
RegionNameEn: pulumi.String("string"),
TopicId: pulumi.String("string"),
},
},
})
var eventRuleResource = new EventRule("eventRuleResource", EventRuleArgs.builder()
.filterPattern(EventRuleFilterPatternArgs.builder()
.source("string")
.types("string")
.build())
.contactMethods("string")
.ruleName("string")
.effectiveTime(EventRuleEffectiveTimeArgs.builder()
.endTime("string")
.startTime("string")
.build())
.level("string")
.eventSource("string")
.eventTypes("string")
.contactGroupIds("string")
.endpoint("string")
.messageQueues(EventRuleMessageQueueArgs.builder()
.instanceId("string")
.region("string")
.topic("string")
.type("string")
.vpcId("string")
.build())
.description("string")
.status("string")
.tlsTargets(EventRuleTlsTargetArgs.builder()
.projectId("string")
.projectName("string")
.regionNameCn("string")
.regionNameEn("string")
.topicId("string")
.build())
.build());
event_rule_resource = volcengine.cloud_monitor.EventRule("eventRuleResource",
filter_pattern=volcengine.cloud_monitor.EventRuleFilterPatternArgs(
source="string",
types=["string"],
),
contact_methods=["string"],
rule_name="string",
effective_time=volcengine.cloud_monitor.EventRuleEffectiveTimeArgs(
end_time="string",
start_time="string",
),
level="string",
event_source="string",
event_types=["string"],
contact_group_ids=["string"],
endpoint="string",
message_queues=[volcengine.cloud_monitor.EventRuleMessageQueueArgs(
instance_id="string",
region="string",
topic="string",
type="string",
vpc_id="string",
)],
description="string",
status="string",
tls_targets=[volcengine.cloud_monitor.EventRuleTlsTargetArgs(
project_id="string",
project_name="string",
region_name_cn="string",
region_name_en="string",
topic_id="string",
)])
const eventRuleResource = new volcengine.cloud_monitor.EventRule("eventRuleResource", {
filterPattern: {
source: "string",
types: ["string"],
},
contactMethods: ["string"],
ruleName: "string",
effectiveTime: {
endTime: "string",
startTime: "string",
},
level: "string",
eventSource: "string",
eventTypes: ["string"],
contactGroupIds: ["string"],
endpoint: "string",
messageQueues: [{
instanceId: "string",
region: "string",
topic: "string",
type: "string",
vpcId: "string",
}],
description: "string",
status: "string",
tlsTargets: [{
projectId: "string",
projectName: "string",
regionNameCn: "string",
regionNameEn: "string",
topicId: "string",
}],
});
type: volcengine:cloud_monitor:EventRule
properties:
contactGroupIds:
- string
contactMethods:
- string
description: string
effectiveTime:
endTime: string
startTime: string
endpoint: string
eventSource: string
eventTypes:
- string
filterPattern:
source: string
types:
- string
level: string
messageQueues:
- instanceId: string
region: string
topic: string
type: string
vpcId: string
ruleName: string
status: string
tlsTargets:
- projectId: string
projectName: string
regionNameCn: string
regionNameEn: string
topicId: string
EventRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The EventRule resource accepts the following input properties:
- Contact
Methods List<string> - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - Effective
Time EventRule Effective Time - The rule takes effect at a certain time and will only be effective during this period.
- Event
Source string - Event source.
- Filter
Pattern EventRule Filter Pattern - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- Level string
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - Rule
Name string - The name of the rule.
- Contact
Group List<string>Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- Description string
- The description of the rule.
- Endpoint string
- When the alarm notification method is alarm callback, it triggers the callback address.
- Event
Types List<string> - Event type.
- Message
Queues List<EventRule Message Queue> - The triggered message queue when the alarm notification method is Kafka message queue.
- Status string
- Rule status.
enable
: enable rule(default),disable
: disable rule. - Tls
Targets List<EventRule Tls Target> - The alarm method for log service triggers the configuration of the log service.
- Contact
Methods []string - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - Effective
Time EventRule Effective Time Args - The rule takes effect at a certain time and will only be effective during this period.
- Event
Source string - Event source.
- Filter
Pattern EventRule Filter Pattern Args - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- Level string
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - Rule
Name string - The name of the rule.
- Contact
Group []stringIds - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- Description string
- The description of the rule.
- Endpoint string
- When the alarm notification method is alarm callback, it triggers the callback address.
- Event
Types []string - Event type.
- Message
Queues []EventRule Message Queue Args - The triggered message queue when the alarm notification method is Kafka message queue.
- Status string
- Rule status.
enable
: enable rule(default),disable
: disable rule. - Tls
Targets []EventRule Tls Target Args - The alarm method for log service triggers the configuration of the log service.
- contact
Methods List<String> - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - effective
Time EventRule Effective Time - The rule takes effect at a certain time and will only be effective during this period.
- event
Source String - Event source.
- filter
Pattern EventRule Filter Pattern - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level String
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - rule
Name String - The name of the rule.
- contact
Group List<String>Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- description String
- The description of the rule.
- endpoint String
- When the alarm notification method is alarm callback, it triggers the callback address.
- event
Types List<String> - Event type.
- message
Queues List<EventRule Message Queue> - The triggered message queue when the alarm notification method is Kafka message queue.
- status String
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls
Targets List<EventRule Tls Target> - The alarm method for log service triggers the configuration of the log service.
- contact
Methods string[] - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - effective
Time EventRule Effective Time - The rule takes effect at a certain time and will only be effective during this period.
- event
Source string - Event source.
- filter
Pattern EventRule Filter Pattern - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level string
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - rule
Name string - The name of the rule.
- contact
Group string[]Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- description string
- The description of the rule.
- endpoint string
- When the alarm notification method is alarm callback, it triggers the callback address.
- event
Types string[] - Event type.
- message
Queues EventRule Message Queue[] - The triggered message queue when the alarm notification method is Kafka message queue.
- status string
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls
Targets EventRule Tls Target[] - The alarm method for log service triggers the configuration of the log service.
- contact_
methods Sequence[str] - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - effective_
time EventRule Effective Time Args - The rule takes effect at a certain time and will only be effective during this period.
- event_
source str - Event source.
- filter_
pattern EventRule Filter Pattern Args - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level str
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - rule_
name str - The name of the rule.
- contact_
group_ Sequence[str]ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- description str
- The description of the rule.
- endpoint str
- When the alarm notification method is alarm callback, it triggers the callback address.
- event_
types Sequence[str] - Event type.
- message_
queues Sequence[EventRule Message Queue Args] - The triggered message queue when the alarm notification method is Kafka message queue.
- status str
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls_
targets Sequence[EventRule Tls Target Args] - The alarm method for log service triggers the configuration of the log service.
- contact
Methods List<String> - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - effective
Time Property Map - The rule takes effect at a certain time and will only be effective during this period.
- event
Source String - Event source.
- filter
Pattern Property Map - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level String
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - rule
Name String - The name of the rule.
- contact
Group List<String>Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- description String
- The description of the rule.
- endpoint String
- When the alarm notification method is alarm callback, it triggers the callback address.
- event
Types List<String> - Event type.
- message
Queues List<Property Map> - The triggered message queue when the alarm notification method is Kafka message queue.
- status String
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls
Targets List<Property Map> - The alarm method for log service triggers the configuration of the log service.
Outputs
All input properties are implicitly available as output properties. Additionally, the EventRule 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 EventRule Resource
Get an existing EventRule 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?: EventRuleState, opts?: CustomResourceOptions): EventRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
contact_group_ids: Optional[Sequence[str]] = None,
contact_methods: Optional[Sequence[str]] = None,
description: Optional[str] = None,
effective_time: Optional[EventRuleEffectiveTimeArgs] = None,
endpoint: Optional[str] = None,
event_source: Optional[str] = None,
event_types: Optional[Sequence[str]] = None,
filter_pattern: Optional[EventRuleFilterPatternArgs] = None,
level: Optional[str] = None,
message_queues: Optional[Sequence[EventRuleMessageQueueArgs]] = None,
rule_name: Optional[str] = None,
status: Optional[str] = None,
tls_targets: Optional[Sequence[EventRuleTlsTargetArgs]] = None) -> EventRule
func GetEventRule(ctx *Context, name string, id IDInput, state *EventRuleState, opts ...ResourceOption) (*EventRule, error)
public static EventRule Get(string name, Input<string> id, EventRuleState? state, CustomResourceOptions? opts = null)
public static EventRule get(String name, Output<String> id, EventRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Contact
Group List<string>Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- Contact
Methods List<string> - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - Description string
- The description of the rule.
- Effective
Time EventRule Effective Time - The rule takes effect at a certain time and will only be effective during this period.
- Endpoint string
- When the alarm notification method is alarm callback, it triggers the callback address.
- Event
Source string - Event source.
- Event
Types List<string> - Event type.
- Filter
Pattern EventRule Filter Pattern - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- Level string
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - Message
Queues List<EventRule Message Queue> - The triggered message queue when the alarm notification method is Kafka message queue.
- Rule
Name string - The name of the rule.
- Status string
- Rule status.
enable
: enable rule(default),disable
: disable rule. - Tls
Targets List<EventRule Tls Target> - The alarm method for log service triggers the configuration of the log service.
- Contact
Group []stringIds - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- Contact
Methods []string - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - Description string
- The description of the rule.
- Effective
Time EventRule Effective Time Args - The rule takes effect at a certain time and will only be effective during this period.
- Endpoint string
- When the alarm notification method is alarm callback, it triggers the callback address.
- Event
Source string - Event source.
- Event
Types []string - Event type.
- Filter
Pattern EventRule Filter Pattern Args - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- Level string
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - Message
Queues []EventRule Message Queue Args - The triggered message queue when the alarm notification method is Kafka message queue.
- Rule
Name string - The name of the rule.
- Status string
- Rule status.
enable
: enable rule(default),disable
: disable rule. - Tls
Targets []EventRule Tls Target Args - The alarm method for log service triggers the configuration of the log service.
- contact
Group List<String>Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- contact
Methods List<String> - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - description String
- The description of the rule.
- effective
Time EventRule Effective Time - The rule takes effect at a certain time and will only be effective during this period.
- endpoint String
- When the alarm notification method is alarm callback, it triggers the callback address.
- event
Source String - Event source.
- event
Types List<String> - Event type.
- filter
Pattern EventRule Filter Pattern - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level String
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - message
Queues List<EventRule Message Queue> - The triggered message queue when the alarm notification method is Kafka message queue.
- rule
Name String - The name of the rule.
- status String
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls
Targets List<EventRule Tls Target> - The alarm method for log service triggers the configuration of the log service.
- contact
Group string[]Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- contact
Methods string[] - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - description string
- The description of the rule.
- effective
Time EventRule Effective Time - The rule takes effect at a certain time and will only be effective during this period.
- endpoint string
- When the alarm notification method is alarm callback, it triggers the callback address.
- event
Source string - Event source.
- event
Types string[] - Event type.
- filter
Pattern EventRule Filter Pattern - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level string
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - message
Queues EventRule Message Queue[] - The triggered message queue when the alarm notification method is Kafka message queue.
- rule
Name string - The name of the rule.
- status string
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls
Targets EventRule Tls Target[] - The alarm method for log service triggers the configuration of the log service.
- contact_
group_ Sequence[str]ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- contact_
methods Sequence[str] - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - description str
- The description of the rule.
- effective_
time EventRule Effective Time Args - The rule takes effect at a certain time and will only be effective during this period.
- endpoint str
- When the alarm notification method is alarm callback, it triggers the callback address.
- event_
source str - Event source.
- event_
types Sequence[str] - Event type.
- filter_
pattern EventRule Filter Pattern Args - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level str
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - message_
queues Sequence[EventRule Message Queue Args] - The triggered message queue when the alarm notification method is Kafka message queue.
- rule_
name str - The name of the rule.
- status str
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls_
targets Sequence[EventRule Tls Target Args] - The alarm method for log service triggers the configuration of the log service.
- contact
Group List<String>Ids - When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
- contact
Methods List<String> - Alarm notification methods. Valid value:
Phone
,Email
,SMS
,Webhook
: Alarm callback,TLS
: Log Service,MQ
: Message Queue Kafka. - description String
- The description of the rule.
- effective
Time Property Map - The rule takes effect at a certain time and will only be effective during this period.
- endpoint String
- When the alarm notification method is alarm callback, it triggers the callback address.
- event
Source String - Event source.
- event
Types List<String> - Event type.
- filter
Pattern Property Map - Filter mode, also known as event matching rules. Custom matching rules are not currently supported.
- level String
- Severity of alarm rules. Value can be
notice
,warning
,critical
. - message
Queues List<Property Map> - The triggered message queue when the alarm notification method is Kafka message queue.
- rule
Name String - The name of the rule.
- status String
- Rule status.
enable
: enable rule(default),disable
: disable rule. - tls
Targets List<Property Map> - The alarm method for log service triggers the configuration of the log service.
Supporting Types
EventRuleEffectiveTime, EventRuleEffectiveTimeArgs
- end_
time str - End time for rule activation.
- start_
time str - Start time for rule activation.
EventRuleFilterPattern, EventRuleFilterPatternArgs
EventRuleMessageQueue, EventRuleMessageQueueArgs
- Instance
Id string - The kafka instance id.
- Region string
- The region.
- Topic string
- The topic name.
- Type string
- The message queue type, only support kafka now.
- Vpc
Id string - The vpc id.
- Instance
Id string - The kafka instance id.
- Region string
- The region.
- Topic string
- The topic name.
- Type string
- The message queue type, only support kafka now.
- Vpc
Id string - The vpc id.
- instance
Id String - The kafka instance id.
- region String
- The region.
- topic String
- The topic name.
- type String
- The message queue type, only support kafka now.
- vpc
Id String - The vpc id.
- instance
Id string - The kafka instance id.
- region string
- The region.
- topic string
- The topic name.
- type string
- The message queue type, only support kafka now.
- vpc
Id string - The vpc id.
- instance_
id str - The kafka instance id.
- region str
- The region.
- topic str
- The topic name.
- type str
- The message queue type, only support kafka now.
- vpc_
id str - The vpc id.
- instance
Id String - The kafka instance id.
- region String
- The region.
- topic String
- The topic name.
- type String
- The message queue type, only support kafka now.
- vpc
Id String - The vpc id.
EventRuleTlsTarget, EventRuleTlsTargetArgs
- Project
Id string - The project id.
- Project
Name string - The project name.
- Region
Name stringCn - The Chinese region name.
- Region
Name stringEn - The English region name.
- Topic
Id string - The topic id.
- Project
Id string - The project id.
- Project
Name string - The project name.
- Region
Name stringCn - The Chinese region name.
- Region
Name stringEn - The English region name.
- Topic
Id string - The topic id.
- project
Id String - The project id.
- project
Name String - The project name.
- region
Name StringCn - The Chinese region name.
- region
Name StringEn - The English region name.
- topic
Id String - The topic id.
- project
Id string - The project id.
- project
Name string - The project name.
- region
Name stringCn - The Chinese region name.
- region
Name stringEn - The English region name.
- topic
Id string - The topic id.
- project_
id str - The project id.
- project_
name str - The project name.
- region_
name_ strcn - The Chinese region name.
- region_
name_ stren - The English region name.
- topic_
id str - The topic id.
- project
Id String - The project id.
- project
Name String - The project name.
- region
Name StringCn - The Chinese region name.
- region
Name StringEn - The English region name.
- topic
Id String - The topic id.
Import
CloudMonitorEventRule can be imported using the id, e.g.
$ pulumi import volcengine:cloud_monitor/eventRule:EventRule default rule_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.