UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

168 lines (167 loc) 5.84 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * This resource allows you to manage [Notification Destinations](https://docs.databricks.com/api/workspace/notificationdestinations). Notification destinations are used to send notifications for query alerts and jobs to destinations outside of Databricks. Only workspace admins can create, update, and delete notification destinations. * * ## Example Usage * * `Email` notification destination: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ndresource = new databricks.NotificationDestination("ndresource", { * displayName: "Notification Destination", * config: { * email: { * addresses: ["abc@gmail.com"], * }, * }, * }); * ``` * `Slack` notification destination: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ndresource = new databricks.NotificationDestination("ndresource", { * displayName: "Notification Destination", * config: { * slack: { * url: "https://hooks.slack.com/services/...", * }, * }, * }); * ``` * `PagerDuty` notification destination: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ndresource = new databricks.NotificationDestination("ndresource", { * displayName: "Notification Destination", * config: { * pagerduty: { * integrationKey: "xxxxxx", * }, * }, * }); * ``` * `Microsoft Teams` notification destination: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ndresource = new databricks.NotificationDestination("ndresource", { * displayName: "Notification Destination", * config: { * microsoftTeams: { * url: "https://outlook.office.com/webhook/...", * }, * }, * }); * ``` * `Generic Webhook` notification destination: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ndresource = new databricks.NotificationDestination("ndresource", { * displayName: "Notification Destination", * config: { * genericWebhook: { * url: "https://example.com/webhook", * username: "username", * password: "password", * }, * }, * }); * ``` * * ## Import * * This resource can be imported by notification ID: * * bash * * ```sh * $ pulumi import databricks:index/notificationDestination:NotificationDestination this <notification-id> * ``` */ export declare class NotificationDestination extends pulumi.CustomResource { /** * Get an existing NotificationDestination 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?: NotificationDestinationState, opts?: pulumi.CustomResourceOptions): NotificationDestination; /** * Returns true if the given object is an instance of NotificationDestination. 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 NotificationDestination; /** * The configuration of the Notification Destination. It must contain exactly one of the following blocks: */ readonly config: pulumi.Output<outputs.NotificationDestinationConfig | undefined>; /** * the type of Notification Destination. */ readonly destinationType: pulumi.Output<string>; /** * The display name of the Notification Destination. */ readonly displayName: pulumi.Output<string>; /** * Create a NotificationDestination 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: NotificationDestinationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NotificationDestination resources. */ export interface NotificationDestinationState { /** * The configuration of the Notification Destination. It must contain exactly one of the following blocks: */ config?: pulumi.Input<inputs.NotificationDestinationConfig>; /** * the type of Notification Destination. */ destinationType?: pulumi.Input<string>; /** * The display name of the Notification Destination. */ displayName?: pulumi.Input<string>; } /** * The set of arguments for constructing a NotificationDestination resource. */ export interface NotificationDestinationArgs { /** * The configuration of the Notification Destination. It must contain exactly one of the following blocks: */ config?: pulumi.Input<inputs.NotificationDestinationConfig>; /** * the type of Notification Destination. */ destinationType?: pulumi.Input<string>; /** * The display name of the Notification Destination. */ displayName: pulumi.Input<string>; }