UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

251 lines (250 loc) 9.1 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage cloud monitor event rule * ## Example Usage * * ```typescript * 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", * }], * }); * ``` * * ## Import * * CloudMonitorEventRule can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:cloud_monitor/eventRule:EventRule default rule_id * ``` */ export declare class EventRule extends pulumi.CustomResource { /** * Get an existing EventRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EventRuleState, opts?: pulumi.CustomResourceOptions): EventRule; /** * Returns true if the given object is an instance of EventRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is EventRule; /** * When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID. */ readonly contactGroupIds: pulumi.Output<string[] | undefined>; /** * Alarm notification methods. Valid value: `Phone`, `Email`, `SMS`, `Webhook`: Alarm callback, `TLS`: Log Service, `MQ`: Message Queue Kafka. */ readonly contactMethods: pulumi.Output<string[]>; /** * The description of the rule. */ readonly description: pulumi.Output<string | undefined>; /** * The rule takes effect at a certain time and will only be effective during this period. */ readonly effectiveTime: pulumi.Output<outputs.cloud_monitor.EventRuleEffectiveTime>; /** * When the alarm notification method is alarm callback, it triggers the callback address. */ readonly endpoint: pulumi.Output<string | undefined>; /** * Event source. */ readonly eventSource: pulumi.Output<string>; /** * Event type. */ readonly eventTypes: pulumi.Output<string[] | undefined>; /** * Filter mode, also known as event matching rules. Custom matching rules are not currently supported. */ readonly filterPattern: pulumi.Output<outputs.cloud_monitor.EventRuleFilterPattern>; /** * Severity of alarm rules. Value can be `notice`, `warning`, `critical`. */ readonly level: pulumi.Output<string>; /** * The triggered message queue when the alarm notification method is Kafka message queue. */ readonly messageQueues: pulumi.Output<outputs.cloud_monitor.EventRuleMessageQueue[] | undefined>; /** * The name of the rule. */ readonly ruleName: pulumi.Output<string>; /** * Rule status. `enable`: enable rule(default), `disable`: disable rule. */ readonly status: pulumi.Output<string | undefined>; /** * The alarm method for log service triggers the configuration of the log service. */ readonly tlsTargets: pulumi.Output<outputs.cloud_monitor.EventRuleTlsTarget[] | undefined>; /** * Create a EventRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: EventRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EventRule resources. */ export interface EventRuleState { /** * When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID. */ contactGroupIds?: pulumi.Input<pulumi.Input<string>[]>; /** * Alarm notification methods. Valid value: `Phone`, `Email`, `SMS`, `Webhook`: Alarm callback, `TLS`: Log Service, `MQ`: Message Queue Kafka. */ contactMethods?: pulumi.Input<pulumi.Input<string>[]>; /** * The description of the rule. */ description?: pulumi.Input<string>; /** * The rule takes effect at a certain time and will only be effective during this period. */ effectiveTime?: pulumi.Input<inputs.cloud_monitor.EventRuleEffectiveTime>; /** * When the alarm notification method is alarm callback, it triggers the callback address. */ endpoint?: pulumi.Input<string>; /** * Event source. */ eventSource?: pulumi.Input<string>; /** * Event type. */ eventTypes?: pulumi.Input<pulumi.Input<string>[]>; /** * Filter mode, also known as event matching rules. Custom matching rules are not currently supported. */ filterPattern?: pulumi.Input<inputs.cloud_monitor.EventRuleFilterPattern>; /** * Severity of alarm rules. Value can be `notice`, `warning`, `critical`. */ level?: pulumi.Input<string>; /** * The triggered message queue when the alarm notification method is Kafka message queue. */ messageQueues?: pulumi.Input<pulumi.Input<inputs.cloud_monitor.EventRuleMessageQueue>[]>; /** * The name of the rule. */ ruleName?: pulumi.Input<string>; /** * Rule status. `enable`: enable rule(default), `disable`: disable rule. */ status?: pulumi.Input<string>; /** * The alarm method for log service triggers the configuration of the log service. */ tlsTargets?: pulumi.Input<pulumi.Input<inputs.cloud_monitor.EventRuleTlsTarget>[]>; } /** * The set of arguments for constructing a EventRule resource. */ export interface EventRuleArgs { /** * When the alarm notification method is phone, SMS, or email, the triggered alarm contact group ID. */ contactGroupIds?: pulumi.Input<pulumi.Input<string>[]>; /** * Alarm notification methods. Valid value: `Phone`, `Email`, `SMS`, `Webhook`: Alarm callback, `TLS`: Log Service, `MQ`: Message Queue Kafka. */ contactMethods: pulumi.Input<pulumi.Input<string>[]>; /** * The description of the rule. */ description?: pulumi.Input<string>; /** * The rule takes effect at a certain time and will only be effective during this period. */ effectiveTime: pulumi.Input<inputs.cloud_monitor.EventRuleEffectiveTime>; /** * When the alarm notification method is alarm callback, it triggers the callback address. */ endpoint?: pulumi.Input<string>; /** * Event source. */ eventSource: pulumi.Input<string>; /** * Event type. */ eventTypes?: pulumi.Input<pulumi.Input<string>[]>; /** * Filter mode, also known as event matching rules. Custom matching rules are not currently supported. */ filterPattern: pulumi.Input<inputs.cloud_monitor.EventRuleFilterPattern>; /** * Severity of alarm rules. Value can be `notice`, `warning`, `critical`. */ level: pulumi.Input<string>; /** * The triggered message queue when the alarm notification method is Kafka message queue. */ messageQueues?: pulumi.Input<pulumi.Input<inputs.cloud_monitor.EventRuleMessageQueue>[]>; /** * The name of the rule. */ ruleName: pulumi.Input<string>; /** * Rule status. `enable`: enable rule(default), `disable`: disable rule. */ status?: pulumi.Input<string>; /** * The alarm method for log service triggers the configuration of the log service. */ tlsTargets?: pulumi.Input<pulumi.Input<inputs.cloud_monitor.EventRuleTlsTarget>[]>; }