snowflake.Alert
Explore with Pulumi AI
Import
format is database name | schema name | alert name
$ pulumi import snowflake:index/alert:Alert example 'dbName|schemaName|alertName'
Create Alert Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Alert(name: string, args: AlertArgs, opts?: CustomResourceOptions);
@overload
def Alert(resource_name: str,
args: AlertArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Alert(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
condition: Optional[str] = None,
database: Optional[str] = None,
schema: Optional[str] = None,
warehouse: Optional[str] = None,
alert_schedule: Optional[AlertAlertScheduleArgs] = None,
comment: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None)
func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)
public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)
type: snowflake:Alert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AlertArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. AlertArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AlertArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AlertArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. AlertArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alertResource = new Snowflake.Alert("alertResource", new()
{
Action = "string",
Condition = "string",
Database = "string",
Schema = "string",
Warehouse = "string",
AlertSchedule = new Snowflake.Inputs.AlertAlertScheduleArgs
{
Cron = new Snowflake.Inputs.AlertAlertScheduleCronArgs
{
Expression = "string",
TimeZone = "string",
},
Interval = 0,
},
Comment = "string",
Enabled = false,
Name = "string",
});
example, err := snowflake.NewAlert(ctx, "alertResource", &snowflake.AlertArgs{
Action: pulumi.String("string"),
Condition: pulumi.String("string"),
Database: pulumi.String("string"),
Schema: pulumi.String("string"),
Warehouse: pulumi.String("string"),
AlertSchedule: &snowflake.AlertAlertScheduleArgs{
Cron: &snowflake.AlertAlertScheduleCronArgs{
Expression: pulumi.String("string"),
TimeZone: pulumi.String("string"),
},
Interval: pulumi.Int(0),
},
Comment: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var alertResource = new Alert("alertResource", AlertArgs.builder()
.action("string")
.condition("string")
.database("string")
.schema("string")
.warehouse("string")
.alertSchedule(AlertAlertScheduleArgs.builder()
.cron(AlertAlertScheduleCronArgs.builder()
.expression("string")
.timeZone("string")
.build())
.interval(0)
.build())
.comment("string")
.enabled(false)
.name("string")
.build());
alert_resource = snowflake.Alert("alertResource",
action="string",
condition="string",
database="string",
schema="string",
warehouse="string",
alert_schedule={
"cron": {
"expression": "string",
"time_zone": "string",
},
"interval": 0,
},
comment="string",
enabled=False,
name="string")
const alertResource = new snowflake.Alert("alertResource", {
action: "string",
condition: "string",
database: "string",
schema: "string",
warehouse: "string",
alertSchedule: {
cron: {
expression: "string",
timeZone: "string",
},
interval: 0,
},
comment: "string",
enabled: false,
name: "string",
});
type: snowflake:Alert
properties:
action: string
alertSchedule:
cron:
expression: string
timeZone: string
interval: 0
comment: string
condition: string
database: string
enabled: false
name: string
schema: string
warehouse: string
Alert Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Alert resource accepts the following input properties:
- Action
This property is required. string - The SQL statement that should be executed if the condition returns one or more rows.
- Condition
This property is required. string - The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- Database
This property is required. Changes to this property will trigger replacement.
- The database in which to create the alert.
- Schema
This property is required. Changes to this property will trigger replacement.
- The schema in which to create the alert.
- Warehouse
This property is required. Changes to this property will trigger replacement.
- The warehouse the alert will use.
- Alert
Schedule AlertAlert Schedule - The schedule for periodically running an alert.
- Comment string
- Specifies a comment for the alert.
- Enabled bool
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- Name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- Action
This property is required. string - The SQL statement that should be executed if the condition returns one or more rows.
- Condition
This property is required. string - The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- Database
This property is required. Changes to this property will trigger replacement.
- The database in which to create the alert.
- Schema
This property is required. Changes to this property will trigger replacement.
- The schema in which to create the alert.
- Warehouse
This property is required. Changes to this property will trigger replacement.
- The warehouse the alert will use.
- Alert
Schedule AlertAlert Schedule Args - The schedule for periodically running an alert.
- Comment string
- Specifies a comment for the alert.
- Enabled bool
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- Name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- action
This property is required. String - The SQL statement that should be executed if the condition returns one or more rows.
- condition
This property is required. String - The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
This property is required. Changes to this property will trigger replacement.
- The database in which to create the alert.
- schema
This property is required. Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
This property is required. Changes to this property will trigger replacement.
- The warehouse the alert will use.
- alert
Schedule AlertAlert Schedule - The schedule for periodically running an alert.
- comment String
- Specifies a comment for the alert.
- enabled Boolean
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- action
This property is required. string - The SQL statement that should be executed if the condition returns one or more rows.
- condition
This property is required. string - The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
This property is required. Changes to this property will trigger replacement.
- The database in which to create the alert.
- schema
This property is required. Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
This property is required. Changes to this property will trigger replacement.
- The warehouse the alert will use.
- alert
Schedule AlertAlert Schedule - The schedule for periodically running an alert.
- comment string
- Specifies a comment for the alert.
- enabled boolean
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- action
This property is required. str - The SQL statement that should be executed if the condition returns one or more rows.
- condition
This property is required. str - The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
This property is required. Changes to this property will trigger replacement.
- The database in which to create the alert.
- schema
This property is required. Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
This property is required. Changes to this property will trigger replacement.
- The warehouse the alert will use.
- alert_
schedule AlertAlert Schedule Args - The schedule for periodically running an alert.
- comment str
- Specifies a comment for the alert.
- enabled bool
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- action
This property is required. String - The SQL statement that should be executed if the condition returns one or more rows.
- condition
This property is required. String - The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
This property is required. Changes to this property will trigger replacement.
- The database in which to create the alert.
- schema
This property is required. Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
This property is required. Changes to this property will trigger replacement.
- The warehouse the alert will use.
- alert
Schedule Property Map - The schedule for periodically running an alert.
- comment String
- Specifies a comment for the alert.
- enabled Boolean
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Alert resource produces the following output properties:
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Id string
- The provider-assigned unique ID for this managed resource.
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- id String
- The provider-assigned unique ID for this managed resource.
- fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- id string
- The provider-assigned unique ID for this managed resource.
- fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- id str
- The provider-assigned unique ID for this managed resource.
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Alert Resource
Get an existing Alert 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?: AlertState, opts?: CustomResourceOptions): Alert
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
alert_schedule: Optional[AlertAlertScheduleArgs] = None,
comment: Optional[str] = None,
condition: Optional[str] = None,
database: Optional[str] = None,
enabled: Optional[bool] = None,
fully_qualified_name: Optional[str] = None,
name: Optional[str] = None,
schema: Optional[str] = None,
warehouse: Optional[str] = None) -> Alert
func GetAlert(ctx *Context, name string, id IDInput, state *AlertState, opts ...ResourceOption) (*Alert, error)
public static Alert Get(string name, Input<string> id, AlertState? state, CustomResourceOptions? opts = null)
public static Alert get(String name, Output<String> id, AlertState state, CustomResourceOptions options)
resources: _: type: snowflake:Alert get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Action string
- The SQL statement that should be executed if the condition returns one or more rows.
- Alert
Schedule AlertAlert Schedule - The schedule for periodically running an alert.
- Comment string
- Specifies a comment for the alert.
- Condition string
- The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- Database
Changes to this property will trigger replacement.
- The database in which to create the alert.
- Enabled bool
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- Schema
Changes to this property will trigger replacement.
- The schema in which to create the alert.
- Warehouse
Changes to this property will trigger replacement.
- The warehouse the alert will use.
- Action string
- The SQL statement that should be executed if the condition returns one or more rows.
- Alert
Schedule AlertAlert Schedule Args - The schedule for periodically running an alert.
- Comment string
- Specifies a comment for the alert.
- Condition string
- The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- Database
Changes to this property will trigger replacement.
- The database in which to create the alert.
- Enabled bool
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- Schema
Changes to this property will trigger replacement.
- The schema in which to create the alert.
- Warehouse
Changes to this property will trigger replacement.
- The warehouse the alert will use.
- action String
- The SQL statement that should be executed if the condition returns one or more rows.
- alert
Schedule AlertAlert Schedule - The schedule for periodically running an alert.
- comment String
- Specifies a comment for the alert.
- condition String
- The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
Changes to this property will trigger replacement.
- The database in which to create the alert.
- enabled Boolean
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- schema
Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
Changes to this property will trigger replacement.
- The warehouse the alert will use.
- action string
- The SQL statement that should be executed if the condition returns one or more rows.
- alert
Schedule AlertAlert Schedule - The schedule for periodically running an alert.
- comment string
- Specifies a comment for the alert.
- condition string
- The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
Changes to this property will trigger replacement.
- The database in which to create the alert.
- enabled boolean
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- schema
Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
Changes to this property will trigger replacement.
- The warehouse the alert will use.
- action str
- The SQL statement that should be executed if the condition returns one or more rows.
- alert_
schedule AlertAlert Schedule Args - The schedule for periodically running an alert.
- comment str
- Specifies a comment for the alert.
- condition str
- The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
Changes to this property will trigger replacement.
- The database in which to create the alert.
- enabled bool
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- schema
Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
Changes to this property will trigger replacement.
- The warehouse the alert will use.
- action String
- The SQL statement that should be executed if the condition returns one or more rows.
- alert
Schedule Property Map - The schedule for periodically running an alert.
- comment String
- Specifies a comment for the alert.
- condition String
- The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
- database
Changes to this property will trigger replacement.
- The database in which to create the alert.
- enabled Boolean
- Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- name
Changes to this property will trigger replacement.
- Specifies the identifier for the alert; must be unique for the database and schema in which the alert is created.
- schema
Changes to this property will trigger replacement.
- The schema in which to create the alert.
- warehouse
Changes to this property will trigger replacement.
- The warehouse the alert will use.
Supporting Types
AlertAlertSchedule, AlertAlertScheduleArgs
- Cron
Alert
Alert Schedule Cron - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- Interval int
- Specifies the interval in minutes for the alert schedule. The interval must be greater than 0 and less than 1440 (24 hours).
- Cron
Alert
Alert Schedule Cron - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- Interval int
- Specifies the interval in minutes for the alert schedule. The interval must be greater than 0 and less than 1440 (24 hours).
- cron
Alert
Alert Schedule Cron - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- interval Integer
- Specifies the interval in minutes for the alert schedule. The interval must be greater than 0 and less than 1440 (24 hours).
- cron
Alert
Alert Schedule Cron - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- interval number
- Specifies the interval in minutes for the alert schedule. The interval must be greater than 0 and less than 1440 (24 hours).
- cron
Alert
Alert Schedule Cron - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- interval int
- Specifies the interval in minutes for the alert schedule. The interval must be greater than 0 and less than 1440 (24 hours).
- cron Property Map
- Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- interval Number
- Specifies the interval in minutes for the alert schedule. The interval must be greater than 0 and less than 1440 (24 hours).
AlertAlertScheduleCron, AlertAlertScheduleCronArgs
- Expression
This property is required. string - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- Time
Zone This property is required. string - Specifies the time zone for alert refresh.
- Expression
This property is required. string - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- Time
Zone This property is required. string - Specifies the time zone for alert refresh.
- expression
This property is required. String - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- time
Zone This property is required. String - Specifies the time zone for alert refresh.
- expression
This property is required. string - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- time
Zone This property is required. string - Specifies the time zone for alert refresh.
- expression
This property is required. str - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- time_
zone This property is required. str - Specifies the time zone for alert refresh.
- expression
This property is required. String - Specifies the cron expression for the alert. The cron expression must be in the following format: "minute hour day-of-month month day-of-week". The following values are supported: minute: 0-59 hour: 0-23 day-of-month: 1-31 month: 1-12 day-of-week: 0-6 (0 is Sunday)
- time
Zone This property is required. String - Specifies the time zone for alert refresh.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.