import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
 * A [service event rule](https://support.pagerduty.com/docs/rulesets#service-event-rules) allows you to set actions that should be taken on events for a service that meet the designated rule criteria.
 *
 * <div role="alert" class="alert alert-warning">
 *   <div class="alert-title"><i class="fa fa-warning"></i>End-of-Life</div>
 *   <p>
 *     Rulesets and Event Rules will end-of-life soon. We highly recommend that you
 *     <a
 *       href="https://support.pagerduty.com/docs/migrate-to-event-orchestration"
 *       rel="noopener noreferrer"
 *       target="_blank"
 *       >migrate to Event Orchestration</a>
 *     as soon as possible so you can take advantage of the new functionality, such
 *     as improved UI, rule creation, REST APIs and Terraform support, advanced
 *     conditions, and rule nesting.
 *   </p>
 * </div>
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pagerduty from "@pulumi/pagerduty";
 *
 * const example = new pagerduty.Service("example", {
 *     name: "Checkout API Service",
 *     autoResolveTimeout: "14400",
 *     acknowledgementTimeout: "600",
 *     escalationPolicy: examplePagerdutyEscalationPolicy.id,
 *     alertCreation: "create_alerts_and_incidents",
 * });
 * const foo = new pagerduty.ServiceEventRule("foo", {
 *     service: example.id,
 *     position: 0,
 *     disabled: true,
 *     conditions: {
 *         operator: "and",
 *         subconditions: [{
 *             operator: "contains",
 *             parameters: [{
 *                 value: "disk space",
 *                 path: "summary",
 *             }],
 *         }],
 *     },
 *     variables: [{
 *         type: "regex",
 *         name: "Src",
 *         parameters: [{
 *             value: "(.*)",
 *             path: "source",
 *         }],
 *     }],
 *     actions: {
 *         annotates: [{
 *             value: "From Terraform",
 *         }],
 *         extractions: [
 *             {
 *                 target: "dedup_key",
 *                 source: "source",
 *                 regex: "(.*)",
 *             },
 *             {
 *                 target: "summary",
 *                 template: "Warning: Disk Space Low on {{Src}}",
 *             },
 *         ],
 *     },
 * });
 * const bar = new pagerduty.ServiceEventRule("bar", {
 *     service: fooPagerdutyService.id,
 *     position: 1,
 *     disabled: true,
 *     conditions: {
 *         operator: "and",
 *         subconditions: [{
 *             operator: "contains",
 *             parameters: [{
 *                 value: "cpu spike",
 *                 path: "summary",
 *             }],
 *         }],
 *     },
 *     actions: {
 *         annotates: [{
 *             value: "From Terraform",
 *         }],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Service event rules can be imported using using the related `service` id and the `serviceEventRule` id separated by a dot, e.g.
 *
 * ```sh
 * $ pulumi import pagerduty:index/serviceEventRule:ServiceEventRule main a19cdca1-3d5e-4b52-bfea-8c8de04da243.19acac92-027a-4ea0-b06c-bbf516519601
 * ```
 */
export declare class ServiceEventRule extends pulumi.CustomResource {
    /**
     * Get an existing ServiceEventRule 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?: ServiceEventRuleState, opts?: pulumi.CustomResourceOptions): ServiceEventRule;
    /**
     * Returns true if the given object is an instance of ServiceEventRule.  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 ServiceEventRule;
    /**
     * Actions to apply to an event if the conditions match.
     */
    readonly actions: pulumi.Output<outputs.ServiceEventRuleActions | undefined>;
    /**
     * Conditions evaluated to check if an event matches this event rule.
     */
    readonly conditions: pulumi.Output<outputs.ServiceEventRuleConditions | undefined>;
    /**
     * Indicates whether the rule is disabled and would therefore not be evaluated.
     */
    readonly disabled: pulumi.Output<boolean | undefined>;
    /**
     * Position/index of the rule within the service.
     */
    readonly position: pulumi.Output<number | undefined>;
    /**
     * The ID of the service that the rule belongs to.
     */
    readonly service: pulumi.Output<string>;
    /**
     * Settings for [scheduling the rule](https://support.pagerduty.com/docs/rulesets#section-scheduled-event-rules).
     */
    readonly timeFrame: pulumi.Output<outputs.ServiceEventRuleTimeFrame | undefined>;
    /**
     * Populate variables from event payloads and use those variables in other event actions. *NOTE: A rule can have multiple `variable` objects.*
     */
    readonly variables: pulumi.Output<outputs.ServiceEventRuleVariable[] | undefined>;
    /**
     * Create a ServiceEventRule 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: ServiceEventRuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering ServiceEventRule resources.
 */
export interface ServiceEventRuleState {
    /**
     * Actions to apply to an event if the conditions match.
     */
    actions?: pulumi.Input<inputs.ServiceEventRuleActions | undefined>;
    /**
     * Conditions evaluated to check if an event matches this event rule.
     */
    conditions?: pulumi.Input<inputs.ServiceEventRuleConditions | undefined>;
    /**
     * Indicates whether the rule is disabled and would therefore not be evaluated.
     */
    disabled?: pulumi.Input<boolean | undefined>;
    /**
     * Position/index of the rule within the service.
     */
    position?: pulumi.Input<number | undefined>;
    /**
     * The ID of the service that the rule belongs to.
     */
    service?: pulumi.Input<string | undefined>;
    /**
     * Settings for [scheduling the rule](https://support.pagerduty.com/docs/rulesets#section-scheduled-event-rules).
     */
    timeFrame?: pulumi.Input<inputs.ServiceEventRuleTimeFrame | undefined>;
    /**
     * Populate variables from event payloads and use those variables in other event actions. *NOTE: A rule can have multiple `variable` objects.*
     */
    variables?: pulumi.Input<pulumi.Input<inputs.ServiceEventRuleVariable>[] | undefined>;
}
/**
 * The set of arguments for constructing a ServiceEventRule resource.
 */
export interface ServiceEventRuleArgs {
    /**
     * Actions to apply to an event if the conditions match.
     */
    actions?: pulumi.Input<inputs.ServiceEventRuleActions | undefined>;
    /**
     * Conditions evaluated to check if an event matches this event rule.
     */
    conditions?: pulumi.Input<inputs.ServiceEventRuleConditions | undefined>;
    /**
     * Indicates whether the rule is disabled and would therefore not be evaluated.
     */
    disabled?: pulumi.Input<boolean | undefined>;
    /**
     * Position/index of the rule within the service.
     */
    position?: pulumi.Input<number | undefined>;
    /**
     * The ID of the service that the rule belongs to.
     */
    service: pulumi.Input<string>;
    /**
     * Settings for [scheduling the rule](https://support.pagerduty.com/docs/rulesets#section-scheduled-event-rules).
     */
    timeFrame?: pulumi.Input<inputs.ServiceEventRuleTimeFrame | undefined>;
    /**
     * Populate variables from event payloads and use those variables in other event actions. *NOTE: A rule can have multiple `variable` objects.*
     */
    variables?: pulumi.Input<pulumi.Input<inputs.ServiceEventRuleVariable>[] | undefined>;
}
//# sourceMappingURL=serviceEventRule.d.ts.map