databricks logo
Databricks v1.14.0, May 23 23

databricks.SqlAlert

Explore with Pulumi AI

This resource allows you to manage Databricks SQL Alerts.

Note: To manage SQLA resources you must have databricks_sql_access on your databricks.Group or databricks_user.

The following resources are often used in the same context:

  • End to end workspace management guide.
  • databricks.SqlQuery to manage Databricks SQL Queries.
  • databricks.SqlEndpoint to manage Databricks SQL Endpoints.
  • databricks.Directory to manage directories in Databricks Workpace.

Create SqlAlert Resource

new SqlAlert(name: string, args: SqlAlertArgs, opts?: CustomResourceOptions);
@overload
def SqlAlert(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             name: Optional[str] = None,
             options: Optional[SqlAlertOptionsArgs] = None,
             parent: Optional[str] = None,
             query_id: Optional[str] = None,
             rearm: Optional[int] = None)
@overload
def SqlAlert(resource_name: str,
             args: SqlAlertArgs,
             opts: Optional[ResourceOptions] = None)
func NewSqlAlert(ctx *Context, name string, args SqlAlertArgs, opts ...ResourceOption) (*SqlAlert, error)
public SqlAlert(string name, SqlAlertArgs args, CustomResourceOptions? opts = null)
public SqlAlert(String name, SqlAlertArgs args)
public SqlAlert(String name, SqlAlertArgs args, CustomResourceOptions options)
type: databricks:SqlAlert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SqlAlertArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args SqlAlertArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SqlAlertArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SqlAlertArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SqlAlertArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SqlAlert Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The SqlAlert resource accepts the following input properties:

Options SqlAlertOptionsArgs

Alert configuration options.

QueryId string

ID of the query evaluated by the alert.

Name string

Name of the alert.

Parent string

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

Rearm int

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

Options SqlAlertOptionsArgs

Alert configuration options.

QueryId string

ID of the query evaluated by the alert.

Name string

Name of the alert.

Parent string

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

Rearm int

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

options SqlAlertOptionsArgs

Alert configuration options.

queryId String

ID of the query evaluated by the alert.

name String

Name of the alert.

parent String

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

rearm Integer

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

options SqlAlertOptionsArgs

Alert configuration options.

queryId string

ID of the query evaluated by the alert.

name string

Name of the alert.

parent string

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

rearm number

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

options SqlAlertOptionsArgs

Alert configuration options.

query_id str

ID of the query evaluated by the alert.

name str

Name of the alert.

parent str

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

rearm int

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

options Property Map

Alert configuration options.

queryId String

ID of the query evaluated by the alert.

name String

Name of the alert.

parent String

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

rearm Number

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

Outputs

All input properties are implicitly available as output properties. Additionally, the SqlAlert resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing SqlAlert Resource

Get an existing SqlAlert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SqlAlertState, opts?: CustomResourceOptions): SqlAlert
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        options: Optional[SqlAlertOptionsArgs] = None,
        parent: Optional[str] = None,
        query_id: Optional[str] = None,
        rearm: Optional[int] = None) -> SqlAlert
func GetSqlAlert(ctx *Context, name string, id IDInput, state *SqlAlertState, opts ...ResourceOption) (*SqlAlert, error)
public static SqlAlert Get(string name, Input<string> id, SqlAlertState? state, CustomResourceOptions? opts = null)
public static SqlAlert get(String name, Output<String> id, SqlAlertState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Name string

Name of the alert.

Options SqlAlertOptionsArgs

Alert configuration options.

Parent string

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

QueryId string

ID of the query evaluated by the alert.

Rearm int

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

Name string

Name of the alert.

Options SqlAlertOptionsArgs

Alert configuration options.

Parent string

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

QueryId string

ID of the query evaluated by the alert.

Rearm int

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

name String

Name of the alert.

options SqlAlertOptionsArgs

Alert configuration options.

parent String

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

queryId String

ID of the query evaluated by the alert.

rearm Integer

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

name string

Name of the alert.

options SqlAlertOptionsArgs

Alert configuration options.

parent string

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

queryId string

ID of the query evaluated by the alert.

rearm number

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

name str

Name of the alert.

options SqlAlertOptionsArgs

Alert configuration options.

parent str

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

query_id str

ID of the query evaluated by the alert.

rearm int

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

name String

Name of the alert.

options Property Map

Alert configuration options.

parent String

The identifier of the workspace folder containing the alert. The default is ther user's home folder. The folder identifier is formatted as folder/<folder_id>.

queryId String

ID of the query evaluated by the alert.

rearm Number

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If not defined, alert will never be triggered again.

Supporting Types

SqlAlertOptions

Column string

Name of column in the query result to compare in alert evaluation.

Op string

Operator used to compare in alert evaluation. (Enum: >, >=, <, <=, ==, !=)

Value string

Value used to compare in alert evaluation.

CustomBody string

Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.

CustomSubject string

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.

Muted bool

Whether or not the alert is muted. If an alert is muted, it will not notify users and alert destinations when triggered.

Column string

Name of column in the query result to compare in alert evaluation.

Op string

Operator used to compare in alert evaluation. (Enum: >, >=, <, <=, ==, !=)

Value string

Value used to compare in alert evaluation.

CustomBody string

Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.

CustomSubject string

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.

Muted bool

Whether or not the alert is muted. If an alert is muted, it will not notify users and alert destinations when triggered.

column String

Name of column in the query result to compare in alert evaluation.

op String

Operator used to compare in alert evaluation. (Enum: >, >=, <, <=, ==, !=)

value String

Value used to compare in alert evaluation.

customBody String

Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.

customSubject String

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.

muted Boolean

Whether or not the alert is muted. If an alert is muted, it will not notify users and alert destinations when triggered.

column string

Name of column in the query result to compare in alert evaluation.

op string

Operator used to compare in alert evaluation. (Enum: >, >=, <, <=, ==, !=)

value string

Value used to compare in alert evaluation.

customBody string

Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.

customSubject string

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.

muted boolean

Whether or not the alert is muted. If an alert is muted, it will not notify users and alert destinations when triggered.

column str

Name of column in the query result to compare in alert evaluation.

op str

Operator used to compare in alert evaluation. (Enum: >, >=, <, <=, ==, !=)

value str

Value used to compare in alert evaluation.

custom_body str

Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.

custom_subject str

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.

muted bool

Whether or not the alert is muted. If an alert is muted, it will not notify users and alert destinations when triggered.

column String

Name of column in the query result to compare in alert evaluation.

op String

Operator used to compare in alert evaluation. (Enum: >, >=, <, <=, ==, !=)

value String

Value used to compare in alert evaluation.

customBody String

Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.

customSubject String

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.

muted Boolean

Whether or not the alert is muted. If an alert is muted, it will not notify users and alert destinations when triggered.

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes

This Pulumi package is based on the databricks Terraform Provider.