1. Packages
  2. Volcengine
  3. API Docs
  4. cloud_monitor
  5. EventRule
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.cloud_monitor.EventRule

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    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:

    ContactMethods List<string>
    Alarm notification methods. Valid value: Phone, Email, SMS, Webhook: Alarm callback, TLS: Log Service, MQ: Message Queue Kafka.
    EffectiveTime EventRuleEffectiveTime
    The rule takes effect at a certain time and will only be effective during this period.
    EventSource string
    Event source.
    FilterPattern EventRuleFilterPattern
    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.
    RuleName string
    The name of the rule.
    ContactGroupIds List<string>
    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.
    EventTypes List<string>
    Event type.
    MessageQueues List<EventRuleMessageQueue>
    The triggered message queue when the alarm notification method is Kafka message queue.
    Status string
    Rule status. enable: enable rule(default), disable: disable rule.
    TlsTargets List<EventRuleTlsTarget>
    The alarm method for log service triggers the configuration of the log service.
    ContactMethods []string
    Alarm notification methods. Valid value: Phone, Email, SMS, Webhook: Alarm callback, TLS: Log Service, MQ: Message Queue Kafka.
    EffectiveTime EventRuleEffectiveTimeArgs
    The rule takes effect at a certain time and will only be effective during this period.
    EventSource string
    Event source.
    FilterPattern EventRuleFilterPatternArgs
    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.
    RuleName string
    The name of the rule.
    ContactGroupIds []string
    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.
    EventTypes []string
    Event type.
    MessageQueues []EventRuleMessageQueueArgs
    The triggered message queue when the alarm notification method is Kafka message queue.
    Status string
    Rule status. enable: enable rule(default), disable: disable rule.
    TlsTargets []EventRuleTlsTargetArgs
    The alarm method for log service triggers the configuration of the log service.
    contactMethods List<String>
    Alarm notification methods. Valid value: Phone, Email, SMS, Webhook: Alarm callback, TLS: Log Service, MQ: Message Queue Kafka.
    effectiveTime EventRuleEffectiveTime
    The rule takes effect at a certain time and will only be effective during this period.
    eventSource String
    Event source.
    filterPattern EventRuleFilterPattern
    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.
    ruleName String
    The name of the rule.
    contactGroupIds List<String>
    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.
    eventTypes List<String>
    Event type.
    messageQueues List<EventRuleMessageQueue>
    The triggered message queue when the alarm notification method is Kafka message queue.
    status String
    Rule status. enable: enable rule(default), disable: disable rule.
    tlsTargets List<EventRuleTlsTarget>
    The alarm method for log service triggers the configuration of the log service.
    contactMethods string[]
    Alarm notification methods. Valid value: Phone, Email, SMS, Webhook: Alarm callback, TLS: Log Service, MQ: Message Queue Kafka.
    effectiveTime EventRuleEffectiveTime
    The rule takes effect at a certain time and will only be effective during this period.
    eventSource string
    Event source.
    filterPattern EventRuleFilterPattern
    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.
    ruleName string
    The name of the rule.
    contactGroupIds string[]
    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.
    eventTypes string[]
    Event type.
    messageQueues EventRuleMessageQueue[]
    The triggered message queue when the alarm notification method is Kafka message queue.
    status string
    Rule status. enable: enable rule(default), disable: disable rule.
    tlsTargets EventRuleTlsTarget[]
    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 EventRuleEffectiveTimeArgs
    The rule takes effect at a certain time and will only be effective during this period.
    event_source str
    Event source.
    filter_pattern EventRuleFilterPatternArgs
    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_ids Sequence[str]
    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[EventRuleMessageQueueArgs]
    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[EventRuleTlsTargetArgs]
    The alarm method for log service triggers the configuration of the log service.
    contactMethods List<String>
    Alarm notification methods. Valid value: Phone, Email, SMS, Webhook: Alarm callback, TLS: Log Service, MQ: Message Queue Kafka.
    effectiveTime Property Map
    The rule takes effect at a certain time and will only be effective during this period.
    eventSource String
    Event source.
    filterPattern 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.
    ruleName String
    The name of the rule.
    contactGroupIds List<String>
    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.
    eventTypes List<String>
    Event type.
    messageQueues 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.
    tlsTargets 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.
    The following state arguments are supported:
    ContactGroupIds List<string>
    When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
    ContactMethods 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.
    EffectiveTime EventRuleEffectiveTime
    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.
    EventSource string
    Event source.
    EventTypes List<string>
    Event type.
    FilterPattern EventRuleFilterPattern
    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.
    MessageQueues List<EventRuleMessageQueue>
    The triggered message queue when the alarm notification method is Kafka message queue.
    RuleName string
    The name of the rule.
    Status string
    Rule status. enable: enable rule(default), disable: disable rule.
    TlsTargets List<EventRuleTlsTarget>
    The alarm method for log service triggers the configuration of the log service.
    ContactGroupIds []string
    When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
    ContactMethods []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.
    EffectiveTime EventRuleEffectiveTimeArgs
    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.
    EventSource string
    Event source.
    EventTypes []string
    Event type.
    FilterPattern EventRuleFilterPatternArgs
    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.
    MessageQueues []EventRuleMessageQueueArgs
    The triggered message queue when the alarm notification method is Kafka message queue.
    RuleName string
    The name of the rule.
    Status string
    Rule status. enable: enable rule(default), disable: disable rule.
    TlsTargets []EventRuleTlsTargetArgs
    The alarm method for log service triggers the configuration of the log service.
    contactGroupIds List<String>
    When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
    contactMethods 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.
    effectiveTime EventRuleEffectiveTime
    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.
    eventSource String
    Event source.
    eventTypes List<String>
    Event type.
    filterPattern EventRuleFilterPattern
    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.
    messageQueues List<EventRuleMessageQueue>
    The triggered message queue when the alarm notification method is Kafka message queue.
    ruleName String
    The name of the rule.
    status String
    Rule status. enable: enable rule(default), disable: disable rule.
    tlsTargets List<EventRuleTlsTarget>
    The alarm method for log service triggers the configuration of the log service.
    contactGroupIds string[]
    When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
    contactMethods 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.
    effectiveTime EventRuleEffectiveTime
    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.
    eventSource string
    Event source.
    eventTypes string[]
    Event type.
    filterPattern EventRuleFilterPattern
    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.
    messageQueues EventRuleMessageQueue[]
    The triggered message queue when the alarm notification method is Kafka message queue.
    ruleName string
    The name of the rule.
    status string
    Rule status. enable: enable rule(default), disable: disable rule.
    tlsTargets EventRuleTlsTarget[]
    The alarm method for log service triggers the configuration of the log service.
    contact_group_ids Sequence[str]
    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 EventRuleEffectiveTimeArgs
    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 EventRuleFilterPatternArgs
    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[EventRuleMessageQueueArgs]
    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[EventRuleTlsTargetArgs]
    The alarm method for log service triggers the configuration of the log service.
    contactGroupIds List<String>
    When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID.
    contactMethods 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.
    effectiveTime 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.
    eventSource String
    Event source.
    eventTypes List<String>
    Event type.
    filterPattern 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.
    messageQueues List<Property Map>
    The triggered message queue when the alarm notification method is Kafka message queue.
    ruleName String
    The name of the rule.
    status String
    Rule status. enable: enable rule(default), disable: disable rule.
    tlsTargets List<Property Map>
    The alarm method for log service triggers the configuration of the log service.

    Supporting Types

    EventRuleEffectiveTime, EventRuleEffectiveTimeArgs

    EndTime string
    End time for rule activation.
    StartTime string
    Start time for rule activation.
    EndTime string
    End time for rule activation.
    StartTime string
    Start time for rule activation.
    endTime String
    End time for rule activation.
    startTime String
    Start time for rule activation.
    endTime string
    End time for rule activation.
    startTime string
    Start time for rule activation.
    end_time str
    End time for rule activation.
    start_time str
    Start time for rule activation.
    endTime String
    End time for rule activation.
    startTime String
    Start time for rule activation.

    EventRuleFilterPattern, EventRuleFilterPatternArgs

    Source string
    Event source corresponding to pattern matching.
    Types List<string>
    The list of corresponding event types in pattern matching, currently set to match any.
    Source string
    Event source corresponding to pattern matching.
    Types []string
    The list of corresponding event types in pattern matching, currently set to match any.
    source String
    Event source corresponding to pattern matching.
    types List<String>
    The list of corresponding event types in pattern matching, currently set to match any.
    source string
    Event source corresponding to pattern matching.
    types string[]
    The list of corresponding event types in pattern matching, currently set to match any.
    source str
    Event source corresponding to pattern matching.
    types Sequence[str]
    The list of corresponding event types in pattern matching, currently set to match any.
    source String
    Event source corresponding to pattern matching.
    types List<String>
    The list of corresponding event types in pattern matching, currently set to match any.

    EventRuleMessageQueue, EventRuleMessageQueueArgs

    InstanceId string
    The kafka instance id.
    Region string
    The region.
    Topic string
    The topic name.
    Type string
    The message queue type, only support kafka now.
    VpcId string
    The vpc id.
    InstanceId string
    The kafka instance id.
    Region string
    The region.
    Topic string
    The topic name.
    Type string
    The message queue type, only support kafka now.
    VpcId string
    The vpc id.
    instanceId String
    The kafka instance id.
    region String
    The region.
    topic String
    The topic name.
    type String
    The message queue type, only support kafka now.
    vpcId String
    The vpc id.
    instanceId string
    The kafka instance id.
    region string
    The region.
    topic string
    The topic name.
    type string
    The message queue type, only support kafka now.
    vpcId 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.
    instanceId String
    The kafka instance id.
    region String
    The region.
    topic String
    The topic name.
    type String
    The message queue type, only support kafka now.
    vpcId String
    The vpc id.

    EventRuleTlsTarget, EventRuleTlsTargetArgs

    ProjectId string
    The project id.
    ProjectName string
    The project name.
    RegionNameCn string
    The Chinese region name.
    RegionNameEn string
    The English region name.
    TopicId string
    The topic id.
    ProjectId string
    The project id.
    ProjectName string
    The project name.
    RegionNameCn string
    The Chinese region name.
    RegionNameEn string
    The English region name.
    TopicId string
    The topic id.
    projectId String
    The project id.
    projectName String
    The project name.
    regionNameCn String
    The Chinese region name.
    regionNameEn String
    The English region name.
    topicId String
    The topic id.
    projectId string
    The project id.
    projectName string
    The project name.
    regionNameCn string
    The Chinese region name.
    regionNameEn string
    The English region name.
    topicId string
    The topic id.
    project_id str
    The project id.
    project_name str
    The project name.
    region_name_cn str
    The Chinese region name.
    region_name_en str
    The English region name.
    topic_id str
    The topic id.
    projectId String
    The project id.
    projectName String
    The project name.
    regionNameCn String
    The Chinese region name.
    regionNameEn String
    The English region name.
    topicId 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.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine