-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3950: Added documentation for the data source.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
subcategory: "Workspace" | ||
--- | ||
# databricks_notification_destination Data Source | ||
|
||
-> **NOTE** Ensure that the notification destinations you are attempting to retrieve have been created and are accessible within your workspace. | ||
|
||
This data source allows you to retrieve information about [Notification Destinations](https://docs.databricks.com/api/workspace/notificationdestinations). Notification Destinations are used to send notifications for query alerts and jobs to external systems such as email, Slack, Microsoft Teams, PagerDuty, or generic webhooks. | ||
|
||
## Example Usage | ||
|
||
|
||
```hcl | ||
resource "databricks_notification_destination" "email" { | ||
display_name = "Email Destination" | ||
config { | ||
email { | ||
addresses = ["[email protected]"] | ||
} | ||
} | ||
} | ||
resource "databricks_notification_destination" "slack" { | ||
display_name = "Slack Destination" | ||
config { | ||
slack { | ||
url = "https://hooks.slack.com/services/..." | ||
} | ||
} | ||
} | ||
data "databricks_notification_destinations" "this" {} # Lists all notification desitnations | ||
data "databricks_notification_destinations" "filtered_notification" { | ||
display_name_contains = "Destination" | ||
type = "EMAIL" | ||
} | ||
``` | ||
|
||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `display_name_contains` - (Optional) A substring to filter Notification Destinations by their display name. | ||
* `type` - (Optional) The type of the Notification Destination to filter by. Valid values are: | ||
* `EMAIL` - Filters Notification Destinations of type Email. | ||
* `MICROSOFT_TEAMS` - Filters Notification Destinations of type Microsoft Teams. | ||
* `PAGERDUTY` - Filters Notification Destinations of type PagerDuty. | ||
* `SLACK` - Filters Notification Destinations of type Slack. | ||
* `WEBHOOK` - Filters Notification Destinations of type Webhook. | ||
|
||
## Attribute Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
* `notification_destinations` - A list of Notification Destinations matching the specified criteria. Each element contains the following attributes: | ||
* `id` - The unique ID of the Notification Destination. | ||
* `display_name` - The display name of the Notification Destination. | ||
* `destination_type` - The type of the notification destination. Possible values are `EMAIL`, `MICROSOFT_TEAMS`, `PAGERDUTY`, `SLACK`, or `WEBHOOK`. |