1. Packages
  2. Snowflake Provider
  3. API Docs
  4. getAlerts
Snowflake v1.1.4 published on Wednesday, Mar 26, 2025 by Pulumi

snowflake.getAlerts

Explore with Pulumi AI

Snowflake v1.1.4 published on Wednesday, Mar 26, 2025 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 preview_features_enabled 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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";

const current = snowflake.getAlerts({
    database: "MYDB",
    schema: "MYSCHEMA",
});
Copy
import pulumi
import pulumi_snowflake as snowflake

current = snowflake.get_alerts(database="MYDB",
    schema="MYSCHEMA")
Copy
package main

import (
	"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := snowflake.GetAlerts(ctx, &snowflake.GetAlertsArgs{
			Database: pulumi.StringRef("MYDB"),
			Schema:   pulumi.StringRef("MYSCHEMA"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;

return await Deployment.RunAsync(() => 
{
    var current = Snowflake.GetAlerts.Invoke(new()
    {
        Database = "MYDB",
        Schema = "MYSCHEMA",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.SnowflakeFunctions;
import com.pulumi.snowflake.inputs.GetAlertsArgs;
import java.util.List;
import java.util.ArrayList;
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) {
        final var current = SnowflakeFunctions.getAlerts(GetAlertsArgs.builder()
            .database("MYDB")
            .schema("MYSCHEMA")
            .build());

    }
}
Copy
variables:
  current:
    fn::invoke:
      function: snowflake:getAlerts
      arguments:
        database: MYDB
        schema: MYSCHEMA
Copy

Using getAlerts

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAlerts(args: GetAlertsArgs, opts?: InvokeOptions): Promise<GetAlertsResult>
function getAlertsOutput(args: GetAlertsOutputArgs, opts?: InvokeOptions): Output<GetAlertsResult>
Copy
def get_alerts(database: Optional[str] = None,
               pattern: Optional[str] = None,
               schema: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetAlertsResult
def get_alerts_output(database: Optional[pulumi.Input[str]] = None,
               pattern: Optional[pulumi.Input[str]] = None,
               schema: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetAlertsResult]
Copy
func GetAlerts(ctx *Context, args *GetAlertsArgs, opts ...InvokeOption) (*GetAlertsResult, error)
func GetAlertsOutput(ctx *Context, args *GetAlertsOutputArgs, opts ...InvokeOption) GetAlertsResultOutput
Copy

> Note: This function is named GetAlerts in the Go SDK.

public static class GetAlerts 
{
    public static Task<GetAlertsResult> InvokeAsync(GetAlertsArgs args, InvokeOptions? opts = null)
    public static Output<GetAlertsResult> Invoke(GetAlertsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAlertsResult> getAlerts(GetAlertsArgs args, InvokeOptions options)
public static Output<GetAlertsResult> getAlerts(GetAlertsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: snowflake:index/getAlerts:getAlerts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Database string
The database from which to return the alerts from.
Pattern string
Filters the command output by object name.
Schema string
The schema from which to return the alerts from.
Database string
The database from which to return the alerts from.
Pattern string
Filters the command output by object name.
Schema string
The schema from which to return the alerts from.
database String
The database from which to return the alerts from.
pattern String
Filters the command output by object name.
schema String
The schema from which to return the alerts from.
database string
The database from which to return the alerts from.
pattern string
Filters the command output by object name.
schema string
The schema from which to return the alerts from.
database str
The database from which to return the alerts from.
pattern str
Filters the command output by object name.
schema str
The schema from which to return the alerts from.
database String
The database from which to return the alerts from.
pattern String
Filters the command output by object name.
schema String
The schema from which to return the alerts from.

getAlerts Result

The following output properties are available:

Alerts List<GetAlertsAlert>
Lists alerts for the current/specified database or schema, or across the entire account.
Id string
The provider-assigned unique ID for this managed resource.
Database string
The database from which to return the alerts from.
Pattern string
Filters the command output by object name.
Schema string
The schema from which to return the alerts from.
Alerts []GetAlertsAlert
Lists alerts for the current/specified database or schema, or across the entire account.
Id string
The provider-assigned unique ID for this managed resource.
Database string
The database from which to return the alerts from.
Pattern string
Filters the command output by object name.
Schema string
The schema from which to return the alerts from.
alerts List<GetAlertsAlert>
Lists alerts for the current/specified database or schema, or across the entire account.
id String
The provider-assigned unique ID for this managed resource.
database String
The database from which to return the alerts from.
pattern String
Filters the command output by object name.
schema String
The schema from which to return the alerts from.
alerts GetAlertsAlert[]
Lists alerts for the current/specified database or schema, or across the entire account.
id string
The provider-assigned unique ID for this managed resource.
database string
The database from which to return the alerts from.
pattern string
Filters the command output by object name.
schema string
The schema from which to return the alerts from.
alerts Sequence[GetAlertsAlert]
Lists alerts for the current/specified database or schema, or across the entire account.
id str
The provider-assigned unique ID for this managed resource.
database str
The database from which to return the alerts from.
pattern str
Filters the command output by object name.
schema str
The schema from which to return the alerts from.
alerts List<Property Map>
Lists alerts for the current/specified database or schema, or across the entire account.
id String
The provider-assigned unique ID for this managed resource.
database String
The database from which to return the alerts from.
pattern String
Filters the command output by object name.
schema String
The schema from which to return the alerts from.

Supporting Types

GetAlertsAlert

Action This property is required. string
The text of the SQL statement that should be executed when the alert is triggered.
Comment This property is required. string
Comment for the alert.
Condition This property is required. string
The text of the SQL statement that serves as the condition when the alert should be triggered.
DatabaseName This property is required. string
Database in which the alert is stored.
Name This property is required. string
Name of the alert.
Owner This property is required. string
Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
SchemaName This property is required. string
Schema in which the alert is stored.
Action This property is required. string
The text of the SQL statement that should be executed when the alert is triggered.
Comment This property is required. string
Comment for the alert.
Condition This property is required. string
The text of the SQL statement that serves as the condition when the alert should be triggered.
DatabaseName This property is required. string
Database in which the alert is stored.
Name This property is required. string
Name of the alert.
Owner This property is required. string
Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
SchemaName This property is required. string
Schema in which the alert is stored.
action This property is required. String
The text of the SQL statement that should be executed when the alert is triggered.
comment This property is required. String
Comment for the alert.
condition This property is required. String
The text of the SQL statement that serves as the condition when the alert should be triggered.
databaseName This property is required. String
Database in which the alert is stored.
name This property is required. String
Name of the alert.
owner This property is required. String
Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
schemaName This property is required. String
Schema in which the alert is stored.
action This property is required. string
The text of the SQL statement that should be executed when the alert is triggered.
comment This property is required. string
Comment for the alert.
condition This property is required. string
The text of the SQL statement that serves as the condition when the alert should be triggered.
databaseName This property is required. string
Database in which the alert is stored.
name This property is required. string
Name of the alert.
owner This property is required. string
Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
schemaName This property is required. string
Schema in which the alert is stored.
action This property is required. str
The text of the SQL statement that should be executed when the alert is triggered.
comment This property is required. str
Comment for the alert.
condition This property is required. str
The text of the SQL statement that serves as the condition when the alert should be triggered.
database_name This property is required. str
Database in which the alert is stored.
name This property is required. str
Name of the alert.
owner This property is required. str
Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
schema_name This property is required. str
Schema in which the alert is stored.
action This property is required. String
The text of the SQL statement that should be executed when the alert is triggered.
comment This property is required. String
Comment for the alert.
condition This property is required. String
The text of the SQL statement that serves as the condition when the alert should be triggered.
databaseName This property is required. String
Database in which the alert is stored.
name This property is required. String
Name of the alert.
owner This property is required. String
Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
schemaName This property is required. String
Schema in which the alert is stored.

Package Details

Repository
Snowflake pulumi/pulumi-snowflake
License
Apache-2.0
Notes
This Pulumi package is based on the snowflake Terraform Provider.
Snowflake v1.1.4 published on Wednesday, Mar 26, 2025 by Pulumi