notification_destinations
Operations on a notification_destinations
resource.
Overview
Name | notification_destinations |
Type | Resource |
Id | databricks_workspace.workspace.notification_destinations |
Fields
Name | Datatype |
---|---|
id | string |
destination_type | string |
display_name | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | id, deployment_name | Gets a notification destination. |
list | SELECT | deployment_name | Lists notification destinations. |
create | INSERT | deployment_name | Creates a notification destination. Requires workspace admin permissions. |
delete | DELETE | id, deployment_name | Deletes 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 required in the request body. |
SELECT
examples
- notification_destinations (list)
- notification_destinations (get)
SELECT
id,
destination_type,
display_name
FROM databricks_workspace.workspace.notification_destinations
WHERE deployment_name = '{{ deployment_name }}';
SELECT
id,
destination_type,
display_name
FROM databricks_workspace.workspace.notification_destinations
WHERE id = '{{ id }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new notification_destinations
resource.
- notification_destinations
- Manifest
/*+ create */
INSERT INTO databricks_workspace.workspace.notification_destinations (
deployment_name,
data__config,
data__display_name
)
SELECT
'{{ deployment_name }}',
'{{ config }}',
'{{ display_name }}'
;
- name: your_resource_model_name
props:
- name: config
value:
generic_webhook:
password: my-password
url: https://my-webhook.com
username: my-username
- name: display_name
value: My webhook destination
UPDATE
example
Updates a notification_destinations
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.workspace.notification_destinations
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE id = '{{ id }}' AND
deployment_name = '{{ deployment_name }}';
DELETE
example
Deletes a notification_destinations
resource.
/*+ delete */
DELETE FROM databricks_workspace.workspace.notification_destinations
WHERE id = '{{ id }}' AND
deployment_name = '{{ deployment_name }}';