EventRule

class EventRule : KotlinCustomResource

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.

NOTE: Available since v1.182.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.MonitorGroup;
import com.pulumi.alicloud.cms.MonitorGroupArgs;
import com.pulumi.alicloud.cms.EventRule;
import com.pulumi.alicloud.cms.EventRuleArgs;
import com.pulumi.alicloud.cms.inputs.EventRuleEventPatternArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var default_ = new MonitorGroup("default", MonitorGroupArgs.builder()
.monitorGroupName(name)
.build());
var example = new EventRule("example", EventRuleArgs.builder()
.ruleName(name)
.groupId(default_.id())
.silenceTime(100)
.description(name)
.status("ENABLED")
.eventPattern(EventRuleEventPatternArgs.builder()
.product("ecs")
.sqlFilter("example_value")
.nameLists("example_value")
.levelLists("CRITICAL")
.eventTypeLists("StatusNotification")
.build())
.build());
}
}

Import

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

$ pulumi import alicloud:cms/eventRule:EventRule example <rule_name>

Properties

Link copied to clipboard

The information about the alert contact groups that receive alert notifications. See contact_parameters below.

Link copied to clipboard
val description: Output<String>?

The description of the event-triggered alert rule.

Link copied to clipboard

Event mode, used to describe the trigger conditions for this event. See event_pattern below.

Link copied to clipboard

The information about the recipients in Function Compute. See fc_parameters below.

Link copied to clipboard
val groupId: Output<String>?

The ID of the application group to which the event-triggered alert rule belongs.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The information about the recipients in Message Service (MNS). See mns_parameters below.

Link copied to clipboard

The parameters of API callback notification. See open_api_parameters below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ruleName: Output<String>

The name of the event-triggered alert rule.

Link copied to clipboard
val silenceTime: Output<Int>?

The silence time.

Link copied to clipboard

The information about the recipients in Simple Log Service. See sls_parameters below.

Link copied to clipboard
val status: Output<String>

The status of the resource. Valid values: ENABLED, DISABLED.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The information about the callback URLs that are used to receive alert notifications. See webhook_parameters below.