w.alerts_v2: Alerts V2

class databricks.sdk.service.sql.AlertsV2API

New version of SQL Alerts

create_alert(alert: AlertV2) AlertV2

Create Alert

Parameters:

alertAlertV2

Returns:

AlertV2

get_alert(id: str) AlertV2

Gets an alert.

Parameters:

id – str

Returns:

AlertV2

list_alerts([, page_size: Optional[int], page_token: Optional[str]]) Iterator[AlertV2]

Gets a list of alerts accessible to the user, ordered by creation time.

Parameters:
  • page_size – int (optional)

  • page_token – str (optional)

Returns:

Iterator over AlertV2

trash_alert(id: str [, purge: Optional[bool]])

Moves an alert to the trash. Trashed alerts immediately disappear from list views, and can no longer trigger. You can restore a trashed alert through the UI. A trashed alert is permanently deleted after 30 days.

Parameters:
  • id – str

  • purge – bool (optional) Whether to permanently delete the alert. If not set, the alert will only be soft deleted.

update_alert(id: str, alert: AlertV2, update_mask: str) AlertV2

Update alert

Parameters:
  • id – str UUID identifying the alert.

  • alertAlertV2

  • update_mask

    str The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.

    A field mask of * indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using * wildcards, as it can lead to unintended results if the API changes in the future.

Returns:

AlertV2