EventRuleArgs

data class EventRuleArgs(val contactParameters: Output<List<EventRuleContactParameterArgs>>? = null, val description: Output<String>? = null, val eventPattern: Output<EventRuleEventPatternArgs>? = null, val fcParameters: Output<List<EventRuleFcParameterArgs>>? = null, val groupId: Output<String>? = null, val mnsParameters: Output<List<EventRuleMnsParameterArgs>>? = null, val openApiParameters: Output<List<EventRuleOpenApiParameterArgs>>? = null, val ruleName: Output<String>? = null, val silenceTime: Output<Int>? = null, val slsParameters: Output<List<EventRuleSlsParameterArgs>>? = null, val status: Output<String>? = null, val webhookParameters: Output<List<EventRuleWebhookParameterArgs>>? = null) : ConvertibleToJava<EventRuleArgs>

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>

Constructors

Link copied to clipboard
fun EventRuleArgs(contactParameters: Output<List<EventRuleContactParameterArgs>>? = null, description: Output<String>? = null, eventPattern: Output<EventRuleEventPatternArgs>? = null, fcParameters: Output<List<EventRuleFcParameterArgs>>? = null, groupId: Output<String>? = null, mnsParameters: Output<List<EventRuleMnsParameterArgs>>? = null, openApiParameters: Output<List<EventRuleOpenApiParameterArgs>>? = null, ruleName: Output<String>? = null, silenceTime: Output<Int>? = null, slsParameters: Output<List<EventRuleSlsParameterArgs>>? = null, status: Output<String>? = null, webhookParameters: Output<List<EventRuleWebhookParameterArgs>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): EventRuleArgs

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>? = null

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>? = null

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

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 ruleName: Output<String>? = null

The name of the event-triggered alert rule.

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

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>? = null

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

Link copied to clipboard

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