1. Registry
  2. Packages
  3. Snowflake Provider
  4. API Docs
  5. Alert
Viewing docs for Snowflake v2.23.0
published on Friday, Nov 6, 2026 by Pulumi
snowflake logo
Viewing docs for Snowflake v2.23.0
published on Friday, Nov 6, 2026 by Pulumi

    Caution: Preview Feature This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to previewFeaturesEnabled field in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.

    Resource used to manage alert objects. For more information, check alert documentation.

    Example Usage

    Note Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult identifiers guide.

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    //# Basic resource (serverless, on a schedule)
    const basic = new snowflake.Alert("basic", {
        database: "database",
        schema: "schema",
        name: "alert",
        alertSchedule: {
            interval: 10,
        },
        condition: "select 1 as c",
        action: "select 1 as c",
    });
    //# Complete resource
    const complete = new snowflake.Alert("complete", {
        database: "database",
        schema: "schema",
        name: "alert",
        warehouse: "warehouse",
        alertSchedule: {
            cron: {
                expression: "0 * * * *",
                timeZone: "UTC",
            },
        },
        condition: "select 1 as c",
        action: "select 1 as c",
        enabled: true,
        comment: "my alert",
    });
    //# Alert on new data (no schedule); the condition table needs change tracking
    const onNewData = new snowflake.Alert("on_new_data", {
        database: "database",
        schema: "schema",
        name: "alert_on_new_data",
        warehouse: "warehouse",
        condition: "select * from database.schema.table",
        action: "select 1 as c",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    ## Basic resource (serverless, on a schedule)
    basic = snowflake.Alert("basic",
        database="database",
        schema="schema",
        name="alert",
        alert_schedule={
            "interval": 10,
        },
        condition="select 1 as c",
        action="select 1 as c")
    ## Complete resource
    complete = snowflake.Alert("complete",
        database="database",
        schema="schema",
        name="alert",
        warehouse="warehouse",
        alert_schedule={
            "cron": {
                "expression": "0 * * * *",
                "time_zone": "UTC",
            },
        },
        condition="select 1 as c",
        action="select 1 as c",
        enabled=True,
        comment="my alert")
    ## Alert on new data (no schedule); the condition table needs change tracking
    on_new_data = snowflake.Alert("on_new_data",
        database="database",
        schema="schema",
        name="alert_on_new_data",
        warehouse="warehouse",
        condition="select * from database.schema.table",
        action="select 1 as c")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-snowflake/sdk/v2/go/snowflake"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		//# Basic resource (serverless, on a schedule)
    		_, err := snowflake.NewAlert(ctx, "basic", &snowflake.AlertArgs{
    			Database: pulumi.String("database"),
    			Schema:   pulumi.String("schema"),
    			Name:     pulumi.String("alert"),
    			AlertSchedule: &snowflake.AlertAlertScheduleArgs{
    				Interval: pulumi.Int(10),
    			},
    			Condition: pulumi.String("select 1 as c"),
    			Action:    pulumi.String("select 1 as c"),
    		})
    		if err != nil {
    			return err
    		}
    		//# Complete resource
    		_, err = snowflake.NewAlert(ctx, "complete", &snowflake.AlertArgs{
    			Database:  pulumi.String("database"),
    			Schema:    pulumi.String("schema"),
    			Name:      pulumi.String("alert"),
    			Warehouse: pulumi.String("warehouse"),
    			AlertSchedule: &snowflake.AlertAlertScheduleArgs{
    				Cron: &snowflake.AlertAlertScheduleCronArgs{
    					Expression: pulumi.String("0 * * * *"),
    					TimeZone:   pulumi.String("UTC"),
    				},
    			},
    			Condition: pulumi.String("select 1 as c"),
    			Action:    pulumi.String("select 1 as c"),
    			Enabled:   pulumi.Bool(true),
    			Comment:   pulumi.String("my alert"),
    		})
    		if err != nil {
    			return err
    		}
    		//# Alert on new data (no schedule); the condition table needs change tracking
    		_, err = snowflake.NewAlert(ctx, "on_new_data", &snowflake.AlertArgs{
    			Database:  pulumi.String("database"),
    			Schema:    pulumi.String("schema"),
    			Name:      pulumi.String("alert_on_new_data"),
    			Warehouse: pulumi.String("warehouse"),
    			Condition: pulumi.String("select * from database.schema.table"),
    			Action:    pulumi.String("select 1 as c"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Snowflake = Pulumi.Snowflake;
    
    return await Deployment.RunAsync(() => 
    {
        //# Basic resource (serverless, on a schedule)
        var basic = new Snowflake.Alert("basic", new()
        {
            Database = "database",
            Schema = "schema",
            Name = "alert",
            AlertSchedule = new Snowflake.Inputs.AlertAlertScheduleArgs
            {
                Interval = 10,
            },
            Condition = "select 1 as c",
            Action = "select 1 as c",
        });
    
        //# Complete resource
        var complete = new Snowflake.Alert("complete", new()
        {
            Database = "database",
            Schema = "schema",
            Name = "alert",
            Warehouse = "warehouse",
            AlertSchedule = new Snowflake.Inputs.AlertAlertScheduleArgs
            {
                Cron = new Snowflake.Inputs.AlertAlertScheduleCronArgs
                {
                    Expression = "0 * * * *",
                    TimeZone = "UTC",
                },
            },
            Condition = "select 1 as c",
            Action = "select 1 as c",
            Enabled = true,
            Comment = "my alert",
        });
    
        //# Alert on new data (no schedule); the condition table needs change tracking
        var onNewData = new Snowflake.Alert("on_new_data", new()
        {
            Database = "database",
            Schema = "schema",
            Name = "alert_on_new_data",
            Warehouse = "warehouse",
            Condition = "select * from database.schema.table",
            Action = "select 1 as c",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.Alert;
    import com.pulumi.snowflake.AlertArgs;
    import com.pulumi.snowflake.inputs.AlertAlertScheduleArgs;
    import com.pulumi.snowflake.inputs.AlertAlertScheduleCronArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            //# Basic resource (serverless, on a schedule)
            var basic = new Alert("basic", AlertArgs.builder()
                .database("database")
                .schema("schema")
                .name("alert")
                .alertSchedule(AlertAlertScheduleArgs.builder()
                    .interval(10)
                    .build())
                .condition("select 1 as c")
                .action("select 1 as c")
                .build());
    
            //# Complete resource
            var complete = new Alert("complete", AlertArgs.builder()
                .database("database")
                .schema("schema")
                .name("alert")
                .warehouse("warehouse")
                .alertSchedule(AlertAlertScheduleArgs.builder()
                    .cron(AlertAlertScheduleCronArgs.builder()
                        .expression("0 * * * *")
                        .timeZone("UTC")
                        .build())
                    .build())
                .condition("select 1 as c")
                .action("select 1 as c")
                .enabled(true)
                .comment("my alert")
                .build());
    
            //# Alert on new data (no schedule); the condition table needs change tracking
            var onNewData = new Alert("onNewData", AlertArgs.builder()
                .database("database")
                .schema("schema")
                .name("alert_on_new_data")
                .warehouse("warehouse")
                .condition("select * from database.schema.table")
                .action("select 1 as c")
                .build());
    
        }
    }
    
    resources:
      ## Basic resource (serverless, on a schedule)
      basic:
        type: snowflake:Alert
        properties:
          database: database
          schema: schema
          name: alert
          alertSchedule:
            interval: 10
          condition: select 1 as c
          action: select 1 as c
      ## Complete resource
      complete:
        type: snowflake:Alert
        properties:
          database: database
          schema: schema
          name: alert
          warehouse: warehouse
          alertSchedule:
            cron:
              expression: 0 * * * *
              timeZone: UTC
          condition: select 1 as c
          action: select 1 as c
          enabled: true
          comment: my alert
      ## Alert on new data (no schedule); the condition table needs change tracking
      onNewData:
        type: snowflake:Alert
        name: on_new_data
        properties:
          database: database
          schema: schema
          name: alert_on_new_data
          warehouse: warehouse
          condition: select * from database.schema.table
          action: select 1 as c
    
    terraform {
      required_providers {
        snowflake = {
          source = "pulumi/snowflake"
        }
      }
    }
    
    ## Basic resource (serverless, on a schedule)
    resource "snowflake_alert" "basic" {
      lifecycle {
        create_before_destroy = true
      }
      database = "database"
      schema   = "schema"
      name     = "alert"
      alert_schedule {
        interval = 10
      }
      condition = "select 1 as c"
      action    = "select 1 as c"
    }
    ## Complete resource
    resource "snowflake_alert" "complete" {
      lifecycle {
        create_before_destroy = true
      }
      database  = "database"
      schema    = "schema"
      name      = "alert"
      warehouse = "warehouse"
      alert_schedule {
        cron {
          expression = "0 * * * *"
          time_zone  = "UTC"
        }
      }
      condition = "select 1 as c"
      action    = "select 1 as c"
      enabled   = true
      comment   = "my alert"
    }
    ## Alert on new data (no schedule); the condition table needs change tracking
    resource "snowflake_alert" "on_new_data" {
      lifecycle {
        create_before_destroy = true
      }
      database  = "database"
      schema    = "schema"
      name      = "alert_on_new_data"
      warehouse = "warehouse"
      condition = "select * from database.schema.table"
      action    = "select 1 as c"
    }
    

    Note If a field has a default value, it is shown next to the type in the schema.

    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,
              alert_schedule: Optional[AlertAlertScheduleArgs] = None,
              comment: Optional[str] = None,
              enabled: Optional[bool] = None,
              name: Optional[str] = None,
              warehouse: Optional[str] = None)
    func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)
    public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)
    public Alert(String name, AlertArgs args)
    public Alert(String name, AlertArgs args, CustomResourceOptions options)
    
    type: snowflake:Alert
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "snowflake_alert" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AlertArgs
    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 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 string
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
        AlertSchedule = new Snowflake.Inputs.AlertAlertScheduleArgs
        {
            Cron = new Snowflake.Inputs.AlertAlertScheduleCronArgs
            {
                Expression = "string",
                TimeZone = "string",
            },
            Interval = 0,
        },
        Comment = "string",
        Enabled = false,
        Name = "string",
        Warehouse = "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"),
    	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"),
    	Warehouse: pulumi.String("string"),
    })
    
    resource "snowflake_alert" "alertResource" {
      lifecycle {
        create_before_destroy = true
      }
      action    = "string"
      condition = "string"
      database  = "string"
      schema    = "string"
      alert_schedule = {
        cron = {
          expression = "string"
          time_zone  = "string"
        }
        interval = 0
      }
      comment   = "string"
      enabled   = false
      name      = "string"
      warehouse = "string"
    }
    
    var alertResource = new Alert("alertResource", AlertArgs.builder()
        .action("string")
        .condition("string")
        .database("string")
        .schema("string")
        .alertSchedule(AlertAlertScheduleArgs.builder()
            .cron(AlertAlertScheduleCronArgs.builder()
                .expression("string")
                .timeZone("string")
                .build())
            .interval(0)
            .build())
        .comment("string")
        .enabled(false)
        .name("string")
        .warehouse("string")
        .build());
    
    alert_resource = snowflake.Alert("alertResource",
        action="string",
        condition="string",
        database="string",
        schema="string",
        alert_schedule={
            "cron": {
                "expression": "string",
                "time_zone": "string",
            },
            "interval": 0,
        },
        comment="string",
        enabled=False,
        name="string",
        warehouse="string")
    
    const alertResource = new snowflake.Alert("alertResource", {
        action: "string",
        condition: "string",
        database: "string",
        schema: "string",
        alertSchedule: {
            cron: {
                expression: "string",
                timeZone: "string",
            },
            interval: 0,
        },
        comment: "string",
        enabled: false,
        name: "string",
        warehouse: "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 string
    The SQL statement that should be executed if the condition returns one or more rows.
    Condition string
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    Database string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    Schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    AlertSchedule AlertAlertSchedule
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    Warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    Action string
    The SQL statement that should be executed if the condition returns one or more rows.
    Condition string
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    Database string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    Schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    AlertSchedule AlertAlertScheduleArgs
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    Warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action string
    The SQL statement that should be executed if the condition returns one or more rows.
    condition string
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    database string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    alert_schedule object
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action String
    The SQL statement that should be executed if the condition returns one or more rows.
    condition String
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    database String
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema String
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    alertSchedule AlertAlertSchedule
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 String
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    warehouse String
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action string
    The SQL statement that should be executed if the condition returns one or more rows.
    condition string
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    database string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    alertSchedule AlertAlertSchedule
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action str
    The SQL statement that should be executed if the condition returns one or more rows.
    condition str
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    database str
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema str
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    alert_schedule AlertAlertScheduleArgs
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 str
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    warehouse str
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action String
    The SQL statement that should be executed if the condition returns one or more rows.
    condition String
    The SQL statement that represents the condition for the alert. (SELECT, SHOW, CALL)
    database String
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema String
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    alertSchedule Property Map
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 String
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    warehouse String
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.

    Outputs

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

    DescribeOutputs List<AlertDescribeOutput>
    Outputs the result of DESCRIBE ALERT for the given alert.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Id string
    The provider-assigned unique ID for this managed resource.
    ShowOutputs List<AlertShowOutput>
    Outputs the result of SHOW ALERTS for the given alert.
    DescribeOutputs []AlertDescribeOutput
    Outputs the result of DESCRIBE ALERT for the given alert.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Id string
    The provider-assigned unique ID for this managed resource.
    ShowOutputs []AlertShowOutput
    Outputs the result of SHOW ALERTS for the given alert.
    describe_outputs list(object)
    Outputs the result of DESCRIBE ALERT for the given alert.
    fully_qualified_name string
    Fully qualified name of the resource. For more information, see object name resolution.
    id string
    The provider-assigned unique ID for this managed resource.
    show_outputs list(object)
    Outputs the result of SHOW ALERTS for the given alert.
    describeOutputs List<AlertDescribeOutput>
    Outputs the result of DESCRIBE ALERT for the given alert.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    id String
    The provider-assigned unique ID for this managed resource.
    showOutputs List<AlertShowOutput>
    Outputs the result of SHOW ALERTS for the given alert.
    describeOutputs AlertDescribeOutput[]
    Outputs the result of DESCRIBE ALERT for the given alert.
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    id string
    The provider-assigned unique ID for this managed resource.
    showOutputs AlertShowOutput[]
    Outputs the result of SHOW ALERTS for the given alert.
    describe_outputs Sequence[AlertDescribeOutput]
    Outputs the result of DESCRIBE ALERT for the given alert.
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    id str
    The provider-assigned unique ID for this managed resource.
    show_outputs Sequence[AlertShowOutput]
    Outputs the result of SHOW ALERTS for the given alert.
    describeOutputs List<Property Map>
    Outputs the result of DESCRIBE ALERT for the given alert.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    id String
    The provider-assigned unique ID for this managed resource.
    showOutputs List<Property Map>
    Outputs the result of SHOW ALERTS for the given alert.

    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,
            describe_outputs: Optional[Sequence[AlertDescribeOutputArgs]] = None,
            enabled: Optional[bool] = None,
            fully_qualified_name: Optional[str] = None,
            name: Optional[str] = None,
            schema: Optional[str] = None,
            show_outputs: Optional[Sequence[AlertShowOutputArgs]] = 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:  existingAlert:    type: snowflake:Alert    get:      id: ${id}
    import {
      to = snowflake_alert.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state AlertState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state AlertState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state AlertState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state AlertState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    Action string
    The SQL statement that should be executed if the condition returns one or more rows.
    AlertSchedule AlertAlertSchedule
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    DescribeOutputs List<AlertDescribeOutput>
    Outputs the result of DESCRIBE ALERT for the given alert.
    Enabled bool
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Name string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    Schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    ShowOutputs List<AlertShowOutput>
    Outputs the result of SHOW ALERTS for the given alert.
    Warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    Action string
    The SQL statement that should be executed if the condition returns one or more rows.
    AlertSchedule AlertAlertScheduleArgs
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    DescribeOutputs []AlertDescribeOutputArgs
    Outputs the result of DESCRIBE ALERT for the given alert.
    Enabled bool
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Name string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    Schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    ShowOutputs []AlertShowOutputArgs
    Outputs the result of SHOW ALERTS for the given alert.
    Warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action string
    The SQL statement that should be executed if the condition returns one or more rows.
    alert_schedule object
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    describe_outputs list(object)
    Outputs the result of DESCRIBE ALERT for the given alert.
    enabled bool
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    fully_qualified_name string
    Fully qualified name of the resource. For more information, see object name resolution.
    name string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    show_outputs list(object)
    Outputs the result of SHOW ALERTS for the given alert.
    warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action String
    The SQL statement that should be executed if the condition returns one or more rows.
    alertSchedule AlertAlertSchedule
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 String
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    describeOutputs List<AlertDescribeOutput>
    Outputs the result of DESCRIBE ALERT for the given alert.
    enabled Boolean
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    name String
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema String
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    showOutputs List<AlertShowOutput>
    Outputs the result of SHOW ALERTS for the given alert.
    warehouse String
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action string
    The SQL statement that should be executed if the condition returns one or more rows.
    alertSchedule AlertAlertSchedule
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 string
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    describeOutputs AlertDescribeOutput[]
    Outputs the result of DESCRIBE ALERT for the given alert.
    enabled boolean
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    name string
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema string
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    showOutputs AlertShowOutput[]
    Outputs the result of SHOW ALERTS for the given alert.
    warehouse string
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action str
    The SQL statement that should be executed if the condition returns one or more rows.
    alert_schedule AlertAlertScheduleArgs
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 str
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    describe_outputs Sequence[AlertDescribeOutputArgs]
    Outputs the result of DESCRIBE ALERT for the given alert.
    enabled bool
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    name str
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema str
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    show_outputs Sequence[AlertShowOutputArgs]
    Outputs the result of SHOW ALERTS for the given alert.
    warehouse str
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.
    action String
    The SQL statement that should be executed if the condition returns one or more rows.
    alertSchedule Property Map
    The schedule for periodically running an alert. Without it, the alert runs when new rows arrive in the tables of the condition. Adding or removing the schedule recreates the 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 String
    The database in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    describeOutputs List<Property Map>
    Outputs the result of DESCRIBE ALERT for the given alert.
    enabled Boolean
    Specifies if an alert should be 'started' (enabled) after creation or should remain 'suspended' (default).
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    name String
    Specifies the identifier for the alert; must be unique for the schema in which the alert is created. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    schema String
    The schema in which to create the alert. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
    showOutputs List<Property Map>
    Outputs the result of SHOW ALERTS for the given alert.
    warehouse String
    The warehouse the alert will use. When not set, the alert uses serverless compute resources. Creating, resuming, or switching to a serverless alert requires the EXECUTE MANAGED ALERT privilege; using a named warehouse requires its USAGE privilege.

    Supporting Types

    AlertAlertSchedule, AlertAlertScheduleArgs

    Cron AlertAlertScheduleCron
    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 AlertAlertScheduleCron
    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 object
    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 AlertAlertScheduleCron
    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 AlertAlertScheduleCron
    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 AlertAlertScheduleCron
    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 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)
    TimeZone string
    Specifies the time zone for alert refresh.
    Expression 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)
    TimeZone string
    Specifies the time zone for alert refresh.
    expression 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 string
    Specifies the time zone for alert refresh.
    expression 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)
    timeZone String
    Specifies the time zone for alert refresh.
    expression 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)
    timeZone string
    Specifies the time zone for alert refresh.
    expression 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 str
    Specifies the time zone for alert refresh.
    expression 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)
    timeZone String
    Specifies the time zone for alert refresh.

    AlertDescribeOutput, AlertDescribeOutputArgs

    Action string
    Comment string
    Condition string
    CreatedOn string
    DatabaseName string
    Name string
    Owner string
    Schedule string
    SchemaName string
    State string
    Warehouse string
    Action string
    Comment string
    Condition string
    CreatedOn string
    DatabaseName string
    Name string
    Owner string
    Schedule string
    SchemaName string
    State string
    Warehouse string
    action string
    comment string
    condition string
    created_on string
    database_name string
    name string
    owner string
    schedule string
    schema_name string
    state string
    warehouse string
    action String
    comment String
    condition String
    createdOn String
    databaseName String
    name String
    owner String
    schedule String
    schemaName String
    state String
    warehouse String
    action string
    comment string
    condition string
    createdOn string
    databaseName string
    name string
    owner string
    schedule string
    schemaName string
    state string
    warehouse string
    action String
    comment String
    condition String
    createdOn String
    databaseName String
    name String
    owner String
    schedule String
    schemaName String
    state String
    warehouse String

    AlertShowOutput, AlertShowOutputArgs

    Action string
    Comment string
    Condition string
    CreatedOn string
    DatabaseName string
    Name string
    Owner string
    OwnerRoleType string
    Schedule string
    SchemaName string
    State string
    Warehouse string
    Action string
    Comment string
    Condition string
    CreatedOn string
    DatabaseName string
    Name string
    Owner string
    OwnerRoleType string
    Schedule string
    SchemaName string
    State string
    Warehouse string
    action string
    comment string
    condition string
    created_on string
    database_name string
    name string
    owner string
    owner_role_type string
    schedule string
    schema_name string
    state string
    warehouse string
    action String
    comment String
    condition String
    createdOn String
    databaseName String
    name String
    owner String
    ownerRoleType String
    schedule String
    schemaName String
    state String
    warehouse String
    action string
    comment string
    condition string
    createdOn string
    databaseName string
    name string
    owner string
    ownerRoleType string
    schedule string
    schemaName string
    state string
    warehouse string
    action String
    comment String
    condition String
    createdOn String
    databaseName String
    name String
    owner String
    ownerRoleType String
    schedule String
    schemaName String
    state String
    warehouse String

    Import

    $ pulumi import snowflake:index/alert:Alert example '"<database_name>"."<schema_name>"."<alert_name>"'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Viewing docs for Snowflake v2.23.0
    published on Friday, Nov 6, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial