import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Datadog incident notification rule resource. This can be used to create and manage Datadog incident notification rules. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * const example = new datadog.IncidentType("example", { * name: "My Incident Type", * description: "Incident type for critical production issues", * }); * const exampleIncidentNotificationTemplate = new datadog.IncidentNotificationTemplate("example", { * name: "My Notification Template", * subject: "SEV-1 Incident: {{incident.title}}", * content: `An incident has been declared. * * Title: {{incident.title}} * Severity: {{incident.severity}} * Status: {{incident.status}} * * Please join the incident channel for updates. * `, * category: "alert", * incidentType: example.id, * }); * const exampleIncidentNotificationRule = new datadog.IncidentNotificationRule("example", { * enabled: true, * trigger: "incident_created_trigger", * visibility: "organization", * handles: [ * "@team-email@company.com", * "@slack-channel-alerts", * "@pagerduty-service", * ], * conditions: [ * { * field: "severity", * values: [ * "SEV-1", * "SEV-2", * ], * }, * { * field: "services", * values: [ * "web-service", * "api-service", * "database-service", * ], * }, * ], * renotifyOns: [ * "status", * "severity", * ], * incidentType: example.id, * notificationTemplate: exampleIncidentNotificationTemplate.id, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import datadog:index/incidentNotificationRule:IncidentNotificationRule example "00000000-0000-0000-0000-000000000000" * ``` */ export declare class IncidentNotificationRule extends pulumi.CustomResource { /** * Get an existing IncidentNotificationRule 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?: IncidentNotificationRuleState, opts?: pulumi.CustomResourceOptions): IncidentNotificationRule; /** * Returns true if the given object is an instance of IncidentNotificationRule. 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 IncidentNotificationRule; /** * The conditions that trigger this notification rule. At least one condition is required. */ readonly conditions: pulumi.Output; /** * Timestamp when the notification rule was created. */ readonly created: pulumi.Output; /** * Whether the notification rule is enabled. Defaults to `false`. */ readonly enabled: pulumi.Output; /** * The notification handles (targets) for this rule. Examples: @team-email@company.com, @slack-channel. */ readonly handles: pulumi.Output; /** * The ID of the incident type this notification rule is associated with. */ readonly incidentType: pulumi.Output; /** * Timestamp when the notification rule was last modified. */ readonly modified: pulumi.Output; /** * The ID of the notification template to use for this rule. */ readonly notificationTemplate: pulumi.Output; /** * List of incident fields that trigger re-notification when changed. Valid values are: status, severity, customer*impact, title, description, detected, root*cause, services, state. */ readonly renotifyOns: pulumi.Output; /** * The trigger event for this notification rule. Valid values are: incident*created*trigger, incident*saved*trigger. */ readonly trigger: pulumi.Output; /** * The visibility of the notification rule. Valid values are: all, organization, private. Defaults to organization. */ readonly visibility: pulumi.Output; /** * Create a IncidentNotificationRule 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: IncidentNotificationRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering IncidentNotificationRule resources. */ export interface IncidentNotificationRuleState { /** * The conditions that trigger this notification rule. At least one condition is required. */ conditions?: pulumi.Input[]>; /** * Timestamp when the notification rule was created. */ created?: pulumi.Input; /** * Whether the notification rule is enabled. Defaults to `false`. */ enabled?: pulumi.Input; /** * The notification handles (targets) for this rule. Examples: @team-email@company.com, @slack-channel. */ handles?: pulumi.Input[]>; /** * The ID of the incident type this notification rule is associated with. */ incidentType?: pulumi.Input; /** * Timestamp when the notification rule was last modified. */ modified?: pulumi.Input; /** * The ID of the notification template to use for this rule. */ notificationTemplate?: pulumi.Input; /** * List of incident fields that trigger re-notification when changed. Valid values are: status, severity, customer*impact, title, description, detected, root*cause, services, state. */ renotifyOns?: pulumi.Input[]>; /** * The trigger event for this notification rule. Valid values are: incident*created*trigger, incident*saved*trigger. */ trigger?: pulumi.Input; /** * The visibility of the notification rule. Valid values are: all, organization, private. Defaults to organization. */ visibility?: pulumi.Input; } /** * The set of arguments for constructing a IncidentNotificationRule resource. */ export interface IncidentNotificationRuleArgs { /** * The conditions that trigger this notification rule. At least one condition is required. */ conditions?: pulumi.Input[]>; /** * Whether the notification rule is enabled. Defaults to `false`. */ enabled?: pulumi.Input; /** * The notification handles (targets) for this rule. Examples: @team-email@company.com, @slack-channel. */ handles: pulumi.Input[]>; /** * The ID of the incident type this notification rule is associated with. */ incidentType: pulumi.Input; /** * The ID of the notification template to use for this rule. */ notificationTemplate?: pulumi.Input; /** * List of incident fields that trigger re-notification when changed. Valid values are: status, severity, customer*impact, title, description, detected, root*cause, services, state. */ renotifyOns?: pulumi.Input[]>; /** * The trigger event for this notification rule. Valid values are: incident*created*trigger, incident*saved*trigger. */ trigger: pulumi.Input; /** * The visibility of the notification rule. Valid values are: all, organization, private. Defaults to organization. */ visibility?: pulumi.Input; }