Share via


notification-destinations command group

Note

This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

The notification-destinations command group within the Databricks CLI contains commands to manage a workspace's notification destinations. 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. See Manage notification destinations.

databricks notification-destinations create

Create a notification destination. Requires workspace admin permissions.

databricks notification-destinations create [flags]

Arguments

None

Options

--display-name string

    The display name for the notification destination.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example creates a notification destination with a display name:

databricks notification-destinations create --display-name "Slack Alerts" --json '{"destination_type": "slack", "config": {"url": "https://hooks.slack.com/services/..."}}'

databricks notification-destinations delete

Delete a notification destination. Requires workspace admin permissions.

databricks notification-destinations delete ID [flags]

Arguments

ID

    UUID identifying notification destination.

Options

Global flags

Examples

The following example deletes a notification destination:

databricks notification-destinations delete 12345678-1234-1234-1234-123456789abc

databricks notification-destinations get

Get a notification destination.

databricks notification-destinations get ID [flags]

Arguments

ID

    UUID identifying notification destination.

Options

Global flags

Examples

The following example gets details for a notification destination:

databricks notification-destinations get 12345678-1234-1234-1234-123456789abc

databricks notification-destinations list

List notification destinations.

databricks notification-destinations list [flags]

Arguments

None

Options

--page-size int

    The maximum number of results to return per page.

--page-token string

    A page token received from a previous call. Use this to retrieve the next page of results.

Global flags

Examples

The following example lists all notification destinations:

databricks notification-destinations list

The following example lists notification destinations with pagination:

databricks notification-destinations list --page-size 50

databricks notification-destinations update

Update a notification destination. Requires workspace admin permissions. At least one field is required in the request body.

databricks notification-destinations update ID [flags]

Arguments

ID

    UUID identifying notification destination.

Options

--display-name string

    The display name for the notification destination.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example updates the display name of a notification destination:

databricks notification-destinations update 12345678-1234-1234-1234-123456789abc --display-name "Updated Slack Alerts"

The following example updates a notification destination with JSON configuration:

databricks notification-destinations update 12345678-1234-1234-1234-123456789abc --json '{"display_name": "Production Alerts", "config": {"url": "https://hooks.slack.com/services/..."}}'

Global flags

--debug

  Whether to enable debug logging.

-h or --help

    Display help for the Databricks CLI or the related command group or the related command.

--log-file string

    A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.

--log-format format

    The log format type, text or json. The default value is text.

--log-level string

    A string representing the log format level. If not specified then the log format level is disabled.

-o, --output type

    The command output type, text or json. The default value is text.

-p, --profile string

    The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.

--progress-format format

    The format to display progress logs: default, append, inplace, or json

-t, --target string

    If applicable, the bundle target to use