import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * An [alert grouping setting](https://developer.pagerduty.com/api-reference/587edbc8ff416-create-an-alert-grouping-setting) * stores and centralize the configuration used during grouping of the alerts. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const _default = pagerduty.getEscalationPolicy({ * name: "Default", * }); * const basic = new pagerduty.Service("basic", { * name: "Example", * escalationPolicy: _default.then(_default => _default.id), * }); * const basicSettings = new pagerduty.AlertGroupingSetting("basic_settings", { * name: "Configuration for type-1 devices", * type: "content_based", * services: [basic.id], * config: { * timeWindow: 300, * aggregate: "all", * fields: ["fields"], * }, * }); * ``` * * ## Migration from `alertGroupingParameters` * * To migrate from using the field `alertGroupingParameters` of a * service * to a `pagerduty.AlertGroupingSetting` resource, you can cut-and-paste the * contents of an `alertGroupingParameters` field from a `pagerduty.Service` * resource into the new resource, but you also need to add at least one value in * the field `services` to create the alert grouping setting with a service * associated to it. * * If you are using `timeout = 0` or `timeWindow = 0` in order to use the values * recommended by PagerDuty you also need to set its value to null or delete it, * since a value of `0` is no longer accepted. * * **Example**: * * Before: * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const _default = pagerduty.getEscalationPolicy({ * name: "Default", * }); * const foo = new pagerduty.Service("foo", { * name: "Foo", * escalationPolicy: _default.then(_default => _default.id), * alertGroupingParameters: { * type: "time", * config: { * timeout: 0, * }, * }, * }); * ``` * * After: * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const _default = pagerduty.getEscalationPolicy({ * name: "Default", * }); * const foo = new pagerduty.Service("foo", { * name: "Foo", * escalationPolicy: _default.then(_default => _default.id), * }); * const fooAlert = new pagerduty.AlertGroupingSetting("foo_alert", { * name: "Alert Grouping for Foo-like services", * type: "time", * config: { * time: null, * }, * services: [foo.id], * }); * ``` * * ## Import * * Alert grouping settings can be imported using its `id`, e.g. * * ```sh * $ pulumi import pagerduty:index/alertGroupingSetting:AlertGroupingSetting example P3DH5M6 * ``` */ export declare class AlertGroupingSetting extends pulumi.CustomResource { /** * Get an existing AlertGroupingSetting 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?: AlertGroupingSettingState, opts?: pulumi.CustomResourceOptions): AlertGroupingSetting; /** * Returns true if the given object is an instance of AlertGroupingSetting. 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 AlertGroupingSetting; /** * The set of values used for configuration. */ readonly config: pulumi.Output; /** * A human-friendly text to describe and identify this alert grouping setting. */ readonly description: pulumi.Output; /** * The name for the alert grouping settings. */ readonly name: pulumi.Output; /** * [Updating can cause a resource replacement] The list IDs of services associated to this setting. */ readonly services: pulumi.Output; /** * The type of alert grouping; one of `intelligent`, `time`, `contentBased` or `contentBasedIntelligent`. */ readonly type: pulumi.Output; /** * Create a AlertGroupingSetting 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: AlertGroupingSettingArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AlertGroupingSetting resources. */ export interface AlertGroupingSettingState { /** * The set of values used for configuration. */ config?: pulumi.Input; /** * A human-friendly text to describe and identify this alert grouping setting. */ description?: pulumi.Input; /** * The name for the alert grouping settings. */ name?: pulumi.Input; /** * [Updating can cause a resource replacement] The list IDs of services associated to this setting. */ services?: pulumi.Input[]>; /** * The type of alert grouping; one of `intelligent`, `time`, `contentBased` or `contentBasedIntelligent`. */ type?: pulumi.Input; } /** * The set of arguments for constructing a AlertGroupingSetting resource. */ export interface AlertGroupingSettingArgs { /** * The set of values used for configuration. */ config?: pulumi.Input; /** * A human-friendly text to describe and identify this alert grouping setting. */ description?: pulumi.Input; /** * The name for the alert grouping settings. */ name?: pulumi.Input; /** * [Updating can cause a resource replacement] The list IDs of services associated to this setting. */ services: pulumi.Input[]>; /** * The type of alert grouping; one of `intelligent`, `time`, `contentBased` or `contentBasedIntelligent`. */ type: pulumi.Input; }