import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Provides a resource, that manages a notification policy for Cloudflare's products. The delivery * mechanisms supported are email, webhooks, and PagerDuty. * * ## Example Usage * ### Basic Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const example = new cloudflare.NotificationPolicy("example", { * accountId: "c4a7362d577a6c3019a474fd6f485821", * alertType: "universal_ssl_event_type", * description: "Notification policy to alert when my SSL certificates are modified", * emailIntegrations: [{ * id: "myemail@example.com", * }], * enabled: true, * name: "Policy for SSL notification events", * pagerdutyIntegrations: [{ * id: "850129d136459401860572c5d964d27k", * }], * webhooksIntegrations: [{ * id: "1860572c5d964d27aa0f379d13645940", * }], * }); * ``` * ### With Filters * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const example = new cloudflare.NotificationPolicy("example", { * accountId: "c4a7362d577a6c3019a474fd6f485821", * alertType: "health_check_status_notification", * description: "Notification policy to alert on unhealthy Healthcheck status", * emailIntegrations: [{ * id: "myemail@example.com", * }], * enabled: true, * filters: { * healthCheckIds: ["699d98642c564d2e855e9661899b7252"], * statuses: ["Unhealthy"], * }, * name: "Policy for Healthcheck notification", * pagerdutyIntegrations: [{ * id: "850129d136459401860572c5d964d27k", * }], * webhooksIntegrations: [{ * id: "1860572c5d964d27aa0f379d13645940", * }], * }); * ``` * * ## Import * * An existing notification policy can be imported using the account ID and the policy ID * * ```sh * $ pulumi import cloudflare:index/notificationPolicy:NotificationPolicy example 72c379d136459405d964d27aa0f18605/c4a7362d577a6c3019a474fd6f485821 * ``` */ export declare class NotificationPolicy extends pulumi.CustomResource { /** * Get an existing NotificationPolicy 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?: NotificationPolicyState, opts?: pulumi.CustomResourceOptions): NotificationPolicy; /** * Returns true if the given object is an instance of NotificationPolicy. 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 NotificationPolicy; /** * The ID of the account for which the notification policy has to be created. */ readonly accountId: pulumi.Output; /** * The event type that will trigger the dispatch of a notification (refer to the nested schema). */ readonly alertType: pulumi.Output; readonly created: pulumi.Output; /** * Description of the notification policy. */ readonly description: pulumi.Output; /** * The email id to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ readonly emailIntegrations: pulumi.Output; /** * State of the pool to alert on. Example: `"true"`, `"false"`. */ readonly enabled: pulumi.Output; /** * An optional nested block of filters that applies to the selected `alertType`. A key-value map that specifies the type of filter and the values to match against (refer to the alert type block for available fields). */ readonly filters: pulumi.Output; readonly modified: pulumi.Output; /** * The name of the notification policy. */ readonly name: pulumi.Output; /** * The unique id of a configured pagerduty endpoint to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ readonly pagerdutyIntegrations: pulumi.Output; /** * The unique id of a configured webhooks endpoint to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ readonly webhooksIntegrations: pulumi.Output; /** * Create a NotificationPolicy 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: NotificationPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NotificationPolicy resources. */ export interface NotificationPolicyState { /** * The ID of the account for which the notification policy has to be created. */ accountId?: pulumi.Input; /** * The event type that will trigger the dispatch of a notification (refer to the nested schema). */ alertType?: pulumi.Input; created?: pulumi.Input; /** * Description of the notification policy. */ description?: pulumi.Input; /** * The email id to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ emailIntegrations?: pulumi.Input[]>; /** * State of the pool to alert on. Example: `"true"`, `"false"`. */ enabled?: pulumi.Input; /** * An optional nested block of filters that applies to the selected `alertType`. A key-value map that specifies the type of filter and the values to match against (refer to the alert type block for available fields). */ filters?: pulumi.Input; modified?: pulumi.Input; /** * The name of the notification policy. */ name?: pulumi.Input; /** * The unique id of a configured pagerduty endpoint to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ pagerdutyIntegrations?: pulumi.Input[]>; /** * The unique id of a configured webhooks endpoint to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ webhooksIntegrations?: pulumi.Input[]>; } /** * The set of arguments for constructing a NotificationPolicy resource. */ export interface NotificationPolicyArgs { /** * The ID of the account for which the notification policy has to be created. */ accountId: pulumi.Input; /** * The event type that will trigger the dispatch of a notification (refer to the nested schema). */ alertType: pulumi.Input; /** * Description of the notification policy. */ description?: pulumi.Input; /** * The email id to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ emailIntegrations?: pulumi.Input[]>; /** * State of the pool to alert on. Example: `"true"`, `"false"`. */ enabled: pulumi.Input; /** * An optional nested block of filters that applies to the selected `alertType`. A key-value map that specifies the type of filter and the values to match against (refer to the alert type block for available fields). */ filters?: pulumi.Input; /** * The name of the notification policy. */ name: pulumi.Input; /** * The unique id of a configured pagerduty endpoint to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ pagerdutyIntegrations?: pulumi.Input[]>; /** * The unique id of a configured webhooks endpoint to which the notification should be dispatched. One of email, webhooks, or PagerDuty mechanisms is required. */ webhooksIntegrations?: pulumi.Input[]>; }