alicloud_cms_event_rule

Provides a Cloud Monitor Service Event Rule resource.

For information about Cloud Monitor Service Event Rule and how to use it, see What is Event Rule.

Example Usage

Basic Usage

variable "name" {
  default = "tf-example"
}

resource "alicloud_cms_monitor_group" "default" {
  monitor_group_name = var.name
}

resource "alicloud_cms_event_rule" "example" {
  rule_name    = var.name
  group_id     = alicloud_cms_monitor_group.default.id
  silence_time = 100
  description  = var.name
  status       = "ENABLED"
  event_pattern {
    product         = "ecs"
    sql_filter      = "example_value"
    name_list       = ["example_value"]
    level_list      = ["CRITICAL"]
    event_type_list = ["StatusNotification"]
  }
}

Argument Reference

The following arguments are supported:

event_pattern

The event_pattern supports the following:

contact_parameters

The contact_parameters supports the following:

webhook_parameters

The webhook_parameters supports the following:

fc_parameters

The fc_parameters supports the following:

sls_parameters

The sls_parameters supports the following:

mns_parameters

The mns_parameters supports the following:

open_api_parameters

The open_api_parameters supports the following:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Cloud Monitor Service Event Rule can be imported using the id, e.g.

$ terraform import alicloud_cms_event_rule.example <rule_name>