Snowflake

Pulumi Official
Package maintained by Pulumi
v0.12.0 published on Wednesday, Jul 20, 2022 by Pulumi

getDatabase

Example Usage

using Pulumi;
using Snowflake = Pulumi.Snowflake;

class MyStack : Stack
{
    public MyStack()
    {
        var @this = Output.Create(Snowflake.GetDatabase.InvokeAsync(new Snowflake.GetDatabaseArgs
        {
            Name = "DEMO_DB",
        }));
    }

}
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.LookupDatabase(ctx, &GetDatabaseArgs{
			Name: "DEMO_DB",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var this = Output.of(SnowflakeFunctions.getDatabase(GetDatabaseArgs.builder()
            .name("DEMO_DB")
            .build()));

    }
}
import pulumi
import pulumi_snowflake as snowflake

this = snowflake.get_database(name="DEMO_DB")
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";

const thisDatabase = pulumi.output(snowflake.getDatabase({
    name: "DEMO_DB",
}));
variables:
  this:
    Fn::Invoke:
      Function: snowflake:getDatabase
      Arguments:
        name: DEMO_DB

Using getDatabase

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 getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
def get_database(name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
def get_database_output(name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
func LookupDatabase(ctx *Context, args *LookupDatabaseArgs, opts ...InvokeOption) (*LookupDatabaseResult, error)
func LookupDatabaseOutput(ctx *Context, args *LookupDatabaseOutputArgs, opts ...InvokeOption) LookupDatabaseResultOutput

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

public static class GetDatabase 
{
    public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: snowflake:index/getDatabase:getDatabase
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string
Name string
name String
name string
name str
name String

getDatabase Result

The following output properties are available:

Comment string
CreatedOn string
Id string

The provider-assigned unique ID for this managed resource.

IsCurrent bool
IsDefault bool
Name string
Options string
Origin string
Owner string
RetentionTime int
Comment string
CreatedOn string
Id string

The provider-assigned unique ID for this managed resource.

IsCurrent bool
IsDefault bool
Name string
Options string
Origin string
Owner string
RetentionTime int
comment String
createdOn String
id String

The provider-assigned unique ID for this managed resource.

isCurrent Boolean
isDefault Boolean
name String
options String
origin String
owner String
retentionTime Integer
comment string
createdOn string
id string

The provider-assigned unique ID for this managed resource.

isCurrent boolean
isDefault boolean
name string
options string
origin string
owner string
retentionTime number
comment str
created_on str
id str

The provider-assigned unique ID for this managed resource.

is_current bool
is_default bool
name str
options str
origin str
owner str
retention_time int
comment String
createdOn String
id String

The provider-assigned unique ID for this managed resource.

isCurrent Boolean
isDefault Boolean
name String
options String
origin String
owner String
retentionTime Number

Package Details

Repository
https://github.com/pulumi/pulumi-snowflake
License
Apache-2.0
Notes

This Pulumi package is based on the snowflake Terraform Provider.