notification_destinations
Creates, updates, deletes, gets or lists a notification_destinations resource.
Overview
| Name | notification_destinations |
| Type | Resource |
| Id | databricks_workspace.settings.notification_destinations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | UUID identifying notification destination. |
display_name | string | The display name for the notification destination. |
config | object | |
destination_type | string | [Output-only] The type of the notification destination. The type can not be changed once set. (EMAIL, MICROSOFT_TEAMS, PAGERDUTY, SLACK, WEBHOOK) |
| Name | Datatype | Description |
|---|---|---|
id | string | UUID identifying notification destination. |
display_name | string | The display name for the notification destination. |
destination_type | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access::<br /><br />>>> Color.RED<br /><Color.RED: 1><br /><br />- value lookup:<br /><br />>>> Color(1)<br /><Color.RED: 1><br /><br />- name lookup:<br /><br />>>> Color['RED']<br /><Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (EMAIL, MICROSOFT_TEAMS, PAGERDUTY, SLACK, WEBHOOK) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, deployment_name | Gets a notification destination. | |
list | select | deployment_name | page_size, page_token | Lists notification destinations. |
create | insert | deployment_name | Creates a notification destination. Requires workspace admin permissions. | |
update | update | id, deployment_name | Updates a notification destination. Requires workspace admin permissions. At least one field is | |
delete | delete | id, deployment_name | Deletes a notification destination. Requires workspace admin permissions. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
id | string | str |
page_size | integer | :param page_token: str (optional) |
page_token | string |
SELECT examples
- get
- list
Gets a notification destination.
SELECT
id,
display_name,
config,
destination_type
FROM databricks_workspace.settings.notification_destinations
WHERE id = '{{ id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Lists notification destinations.
SELECT
id,
display_name,
destination_type
FROM databricks_workspace.settings.notification_destinations
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Creates a notification destination. Requires workspace admin permissions.
INSERT INTO databricks_workspace.settings.notification_destinations (
config,
display_name,
deployment_name
)
SELECT
'{{ config }}',
'{{ display_name }}',
'{{ deployment_name }}'
RETURNING
id,
display_name,
config,
destination_type
;
# Description fields are for documentation purposes
- name: notification_destinations
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the notification_destinations resource.
- name: config
description: |
The configuration for the notification destination. Must wrap EXACTLY one of the nested configs.
value:
email:
addresses:
- "{{ addresses }}"
generic_webhook:
password: "{{ password }}"
password_set: {{ password_set }}
url: "{{ url }}"
url_set: {{ url_set }}
username: "{{ username }}"
username_set: {{ username_set }}
microsoft_teams:
app_id: "{{ app_id }}"
app_id_set: {{ app_id_set }}
auth_secret: "{{ auth_secret }}"
auth_secret_set: {{ auth_secret_set }}
channel_url: "{{ channel_url }}"
channel_url_set: {{ channel_url_set }}
tenant_id: "{{ tenant_id }}"
tenant_id_set: {{ tenant_id_set }}
url: "{{ url }}"
url_set: {{ url_set }}
pagerduty:
integration_key: "{{ integration_key }}"
integration_key_set: {{ integration_key_set }}
slack:
channel_id: "{{ channel_id }}"
channel_id_set: {{ channel_id_set }}
oauth_token: "{{ oauth_token }}"
oauth_token_set: {{ oauth_token_set }}
url: "{{ url }}"
url_set: {{ url_set }}
- name: display_name
value: "{{ display_name }}"
description: |
The display name for the notification destination.
UPDATE examples
- update
Updates a notification destination. Requires workspace admin permissions. At least one field is
UPDATE databricks_workspace.settings.notification_destinations
SET
config = '{{ config }}',
display_name = '{{ display_name }}'
WHERE
id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
RETURNING
id,
display_name,
config,
destination_type;
DELETE examples
- delete
Deletes a notification destination. Requires workspace admin permissions.
DELETE FROM databricks_workspace.settings.notification_destinations
WHERE id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;