1. Packages
  2. Snowflake
  3. API Docs
  4. getAlerts
Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi

snowflake.getAlerts

Explore with Pulumi AI

snowflake logo
Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const current = snowflake.getAlerts({
        database: "MYDB",
        schema: "MYSCHEMA",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    current = snowflake.get_alerts(database="MYDB",
        schema="MYSCHEMA")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      current:
        fn::invoke:
          Function: snowflake:getAlerts
          Arguments:
            database: MYDB
            schema: MYSCHEMA
    

    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>
    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]
    func GetAlerts(ctx *Context, args *GetAlertsArgs, opts ...InvokeOption) (*GetAlertsResult, error)
    func GetAlertsOutput(ctx *Context, args *GetAlertsOutputArgs, opts ...InvokeOption) GetAlertsResultOutput

    > 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)
    }
    public static CompletableFuture<GetAlertsResult> getAlerts(GetAlertsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: snowflake:index/getAlerts:getAlerts
      arguments:
        # arguments dictionary

    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 string
    The text of the SQL statement that should be executed when the alert is triggered.
    Comment string
    Comment for the alert.
    Condition string
    The text of the SQL statement that serves as the condition when the alert should be triggered.
    DatabaseName string
    Database in which the alert is stored.
    Name string
    Name of the alert.
    Owner string
    Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
    SchemaName string
    Schema in which the alert is stored.
    Action string
    The text of the SQL statement that should be executed when the alert is triggered.
    Comment string
    Comment for the alert.
    Condition string
    The text of the SQL statement that serves as the condition when the alert should be triggered.
    DatabaseName string
    Database in which the alert is stored.
    Name string
    Name of the alert.
    Owner string
    Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
    SchemaName string
    Schema in which the alert is stored.
    action String
    The text of the SQL statement that should be executed when the alert is triggered.
    comment String
    Comment for the alert.
    condition String
    The text of the SQL statement that serves as the condition when the alert should be triggered.
    databaseName String
    Database in which the alert is stored.
    name String
    Name of the alert.
    owner String
    Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
    schemaName String
    Schema in which the alert is stored.
    action string
    The text of the SQL statement that should be executed when the alert is triggered.
    comment string
    Comment for the alert.
    condition string
    The text of the SQL statement that serves as the condition when the alert should be triggered.
    databaseName string
    Database in which the alert is stored.
    name string
    Name of the alert.
    owner string
    Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
    schemaName string
    Schema in which the alert is stored.
    action str
    The text of the SQL statement that should be executed when the alert is triggered.
    comment str
    Comment for the alert.
    condition str
    The text of the SQL statement that serves as the condition when the alert should be triggered.
    database_name str
    Database in which the alert is stored.
    name str
    Name of the alert.
    owner str
    Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
    schema_name str
    Schema in which the alert is stored.
    action String
    The text of the SQL statement that should be executed when the alert is triggered.
    comment String
    Comment for the alert.
    condition String
    The text of the SQL statement that serves as the condition when the alert should be triggered.
    databaseName String
    Database in which the alert is stored.
    name String
    Name of the alert.
    owner String
    Role that owns the alert (i.e. has the OWNERSHIP privilege on the alert)
    schemaName 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 logo
    Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi