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

snowflake.getDatabases

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 this = snowflake.getDatabases({});
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    this = snowflake.get_databases()
    
    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.GetDatabases(ctx, nil, 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 @this = Snowflake.GetDatabases.Invoke();
    
    });
    
    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.GetDatabasesArgs;
    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 this = SnowflakeFunctions.getDatabases();
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: snowflake:getDatabases
          Arguments: {}
    

    Using getDatabases

    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 getDatabases(args: GetDatabasesArgs, opts?: InvokeOptions): Promise<GetDatabasesResult>
    function getDatabasesOutput(args: GetDatabasesOutputArgs, opts?: InvokeOptions): Output<GetDatabasesResult>
    def get_databases(history: Optional[bool] = None,
                      pattern: Optional[str] = None,
                      starts_with: Optional[str] = None,
                      terse: Optional[bool] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDatabasesResult
    def get_databases_output(history: Optional[pulumi.Input[bool]] = None,
                      pattern: Optional[pulumi.Input[str]] = None,
                      starts_with: Optional[pulumi.Input[str]] = None,
                      terse: Optional[pulumi.Input[bool]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDatabasesResult]
    func GetDatabases(ctx *Context, args *GetDatabasesArgs, opts ...InvokeOption) (*GetDatabasesResult, error)
    func GetDatabasesOutput(ctx *Context, args *GetDatabasesOutputArgs, opts ...InvokeOption) GetDatabasesResultOutput

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

    public static class GetDatabases 
    {
        public static Task<GetDatabasesResult> InvokeAsync(GetDatabasesArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabasesResult> Invoke(GetDatabasesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: snowflake:index/getDatabases:getDatabases
      arguments:
        # arguments dictionary

    The following arguments are supported:

    History bool
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    Pattern string
    Optionally filters the databases by a pattern
    StartsWith string
    Optionally filters the databases by a pattern
    Terse bool
    Optionally returns only the columns created_on and name in the results
    History bool
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    Pattern string
    Optionally filters the databases by a pattern
    StartsWith string
    Optionally filters the databases by a pattern
    Terse bool
    Optionally returns only the columns created_on and name in the results
    history Boolean
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern String
    Optionally filters the databases by a pattern
    startsWith String
    Optionally filters the databases by a pattern
    terse Boolean
    Optionally returns only the columns created_on and name in the results
    history boolean
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern string
    Optionally filters the databases by a pattern
    startsWith string
    Optionally filters the databases by a pattern
    terse boolean
    Optionally returns only the columns created_on and name in the results
    history bool
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern str
    Optionally filters the databases by a pattern
    starts_with str
    Optionally filters the databases by a pattern
    terse bool
    Optionally returns only the columns created_on and name in the results
    history Boolean
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern String
    Optionally filters the databases by a pattern
    startsWith String
    Optionally filters the databases by a pattern
    terse Boolean
    Optionally returns only the columns created_on and name in the results

    getDatabases Result

    The following output properties are available:

    Databases List<GetDatabasesDatabase>
    Snowflake databases
    Id string
    The provider-assigned unique ID for this managed resource.
    History bool
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    Pattern string
    Optionally filters the databases by a pattern
    StartsWith string
    Optionally filters the databases by a pattern
    Terse bool
    Optionally returns only the columns created_on and name in the results
    Databases []GetDatabasesDatabase
    Snowflake databases
    Id string
    The provider-assigned unique ID for this managed resource.
    History bool
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    Pattern string
    Optionally filters the databases by a pattern
    StartsWith string
    Optionally filters the databases by a pattern
    Terse bool
    Optionally returns only the columns created_on and name in the results
    databases List<GetDatabasesDatabase>
    Snowflake databases
    id String
    The provider-assigned unique ID for this managed resource.
    history Boolean
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern String
    Optionally filters the databases by a pattern
    startsWith String
    Optionally filters the databases by a pattern
    terse Boolean
    Optionally returns only the columns created_on and name in the results
    databases GetDatabasesDatabase[]
    Snowflake databases
    id string
    The provider-assigned unique ID for this managed resource.
    history boolean
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern string
    Optionally filters the databases by a pattern
    startsWith string
    Optionally filters the databases by a pattern
    terse boolean
    Optionally returns only the columns created_on and name in the results
    databases Sequence[GetDatabasesDatabase]
    Snowflake databases
    id str
    The provider-assigned unique ID for this managed resource.
    history bool
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern str
    Optionally filters the databases by a pattern
    starts_with str
    Optionally filters the databases by a pattern
    terse bool
    Optionally returns only the columns created_on and name in the results
    databases List<Property Map>
    Snowflake databases
    id String
    The provider-assigned unique ID for this managed resource.
    history Boolean
    Optionally includes dropped databases that have not yet been purged The output also includes an additional dropped_on column
    pattern String
    Optionally filters the databases by a pattern
    startsWith String
    Optionally filters the databases by a pattern
    terse Boolean
    Optionally returns only the columns created_on and name in the results

    Supporting Types

    GetDatabasesDatabase

    GetDatabasesDatabaseReplicationConfiguration

    Accounts List<string>
    IgnoreEditionCheck bool
    accounts List<String>
    ignoreEditionCheck Boolean
    accounts Sequence[str]
    ignore_edition_check bool
    accounts List<String>
    ignoreEditionCheck Boolean

    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