import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for creating and managing Harness AutoStopping alerts. Alerts notify users via email or Slack when events such as warmup failures, cooldown failures, or rule lifecycle changes occur. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const specific_rule_alert = new harness.autostopping.Alert("specific-rule-alert", { * name: "demo-alert", * recipients: { * emails: [ * "user1@example.com", * "user2@example.com", * ], * slacks: [ * "slack-web-hook-1", * "slack-web-hook-2", * ], * }, * events: [ * "autostopping_rule_created", * "autostopping_rule_updated", * "autostopping_rule_deleted", * "autostopping_warmup_failed", * "autostopping_cooldown_failed", * ], * ruleIdLists: [1234], * }); * const all_rule_alert = new harness.autostopping.Alert("all-rule-alert", { * name: "demo-alert", * recipients: { * emails: [ * "user1@example.com", * "user2@example.com", * ], * slacks: [ * "slack-web-hook-1", * "slack-web-hook-2", * ], * }, * events: [ * "autostopping_rule_created", * "autostopping_rule_updated", * "autostopping_rule_deleted", * "autostopping_warmup_failed", * "autostopping_cooldown_failed", * ], * applicableToAllRules: true, * }); * ``` */ export declare class Alert extends pulumi.CustomResource { /** * Get an existing Alert 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, state?: AlertState, opts?: pulumi.CustomResourceOptions): Alert; /** * Returns true if the given object is an instance of Alert. 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 Alert; /** * When true, the alert applies to all AutoStopping rules in the account (leave `ruleIdList` empty). Mutually exclusive with `ruleIdList`. */ readonly applicableToAllRules: pulumi.Output; /** * Whether the alert is enabled. */ readonly enabled: pulumi.Output; /** * List of event types that trigger the alert (e.g. autostopping*rule*created, autostopping*warmup*failed, autostopping*cooldown*failed). */ readonly events: pulumi.Output; /** * Name of the alert. */ readonly name: pulumi.Output; /** * Notification recipients. At least one of `email` or `slack` is required (with at least one value). */ readonly recipients: pulumi.Output; /** * List of AutoStopping rule IDs to apply the alert to. Required when `applicableToAllRules` is false. Mutually exclusive with `applicableToAllRules` = true. */ readonly ruleIdLists: pulumi.Output; /** * Create a Alert 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: AlertArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Alert resources. */ export interface AlertState { /** * When true, the alert applies to all AutoStopping rules in the account (leave `ruleIdList` empty). Mutually exclusive with `ruleIdList`. */ applicableToAllRules?: pulumi.Input; /** * Whether the alert is enabled. */ enabled?: pulumi.Input; /** * List of event types that trigger the alert (e.g. autostopping*rule*created, autostopping*warmup*failed, autostopping*cooldown*failed). */ events?: pulumi.Input[] | undefined>; /** * Name of the alert. */ name?: pulumi.Input; /** * Notification recipients. At least one of `email` or `slack` is required (with at least one value). */ recipients?: pulumi.Input; /** * List of AutoStopping rule IDs to apply the alert to. Required when `applicableToAllRules` is false. Mutually exclusive with `applicableToAllRules` = true. */ ruleIdLists?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a Alert resource. */ export interface AlertArgs { /** * When true, the alert applies to all AutoStopping rules in the account (leave `ruleIdList` empty). Mutually exclusive with `ruleIdList`. */ applicableToAllRules?: pulumi.Input; /** * Whether the alert is enabled. */ enabled?: pulumi.Input; /** * List of event types that trigger the alert (e.g. autostopping*rule*created, autostopping*warmup*failed, autostopping*cooldown*failed). */ events: pulumi.Input[]>; /** * Name of the alert. */ name?: pulumi.Input; /** * Notification recipients. At least one of `email` or `slack` is required (with at least one value). */ recipients: pulumi.Input; /** * List of AutoStopping rule IDs to apply the alert to. Required when `applicableToAllRules` is false. Mutually exclusive with `applicableToAllRules` = true. */ ruleIdLists?: pulumi.Input[] | undefined>; } //# sourceMappingURL=alert.d.ts.map