1. Packages
  2. Snowflake
  3. API Docs
  4. Database
Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi

snowflake.Database

Explore with Pulumi AI

snowflake logo
Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const simple = new snowflake.Database("simple", {
        comment: "test comment",
        dataRetentionTimeInDays: 3,
    });
    const withReplication = new snowflake.Database("withReplication", {
        comment: "test comment 2",
        replicationConfiguration: {
            accounts: [
                "test_account1",
                "test_account_2",
            ],
            ignoreEditionCheck: true,
        },
    });
    const fromReplica = new snowflake.Database("fromReplica", {
        comment: "test comment",
        dataRetentionTimeInDays: 3,
        fromReplica: "\"org1\".\"account1\".\"primary_db_name\"",
    });
    const fromShare = new snowflake.Database("fromShare", {
        comment: "test comment",
        fromShare: {
            provider: "account1_locator",
            share: "share1",
        },
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    simple = snowflake.Database("simple",
        comment="test comment",
        data_retention_time_in_days=3)
    with_replication = snowflake.Database("withReplication",
        comment="test comment 2",
        replication_configuration=snowflake.DatabaseReplicationConfigurationArgs(
            accounts=[
                "test_account1",
                "test_account_2",
            ],
            ignore_edition_check=True,
        ))
    from_replica = snowflake.Database("fromReplica",
        comment="test comment",
        data_retention_time_in_days=3,
        from_replica="\"org1\".\"account1\".\"primary_db_name\"")
    from_share = snowflake.Database("fromShare",
        comment="test comment",
        from_share={
            "provider": "account1_locator",
            "share": "share1",
        })
    
    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.NewDatabase(ctx, "simple", &snowflake.DatabaseArgs{
    			Comment:                 pulumi.String("test comment"),
    			DataRetentionTimeInDays: pulumi.Int(3),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewDatabase(ctx, "withReplication", &snowflake.DatabaseArgs{
    			Comment: pulumi.String("test comment 2"),
    			ReplicationConfiguration: &snowflake.DatabaseReplicationConfigurationArgs{
    				Accounts: pulumi.StringArray{
    					pulumi.String("test_account1"),
    					pulumi.String("test_account_2"),
    				},
    				IgnoreEditionCheck: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewDatabase(ctx, "fromReplica", &snowflake.DatabaseArgs{
    			Comment:                 pulumi.String("test comment"),
    			DataRetentionTimeInDays: pulumi.Int(3),
    			FromReplica:             pulumi.String("\"org1\".\"account1\".\"primary_db_name\""),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewDatabase(ctx, "fromShare", &snowflake.DatabaseArgs{
    			Comment: pulumi.String("test comment"),
    			FromShare: pulumi.StringMap{
    				"provider": pulumi.String("account1_locator"),
    				"share":    pulumi.String("share1"),
    			},
    		})
    		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 simple = new Snowflake.Database("simple", new()
        {
            Comment = "test comment",
            DataRetentionTimeInDays = 3,
        });
    
        var withReplication = new Snowflake.Database("withReplication", new()
        {
            Comment = "test comment 2",
            ReplicationConfiguration = new Snowflake.Inputs.DatabaseReplicationConfigurationArgs
            {
                Accounts = new[]
                {
                    "test_account1",
                    "test_account_2",
                },
                IgnoreEditionCheck = true,
            },
        });
    
        var fromReplica = new Snowflake.Database("fromReplica", new()
        {
            Comment = "test comment",
            DataRetentionTimeInDays = 3,
            FromReplica = "\"org1\".\"account1\".\"primary_db_name\"",
        });
    
        var fromShare = new Snowflake.Database("fromShare", new()
        {
            Comment = "test comment",
            FromShare = 
            {
                { "provider", "account1_locator" },
                { "share", "share1" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.Database;
    import com.pulumi.snowflake.DatabaseArgs;
    import com.pulumi.snowflake.inputs.DatabaseReplicationConfigurationArgs;
    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) {
            var simple = new Database("simple", DatabaseArgs.builder()        
                .comment("test comment")
                .dataRetentionTimeInDays(3)
                .build());
    
            var withReplication = new Database("withReplication", DatabaseArgs.builder()        
                .comment("test comment 2")
                .replicationConfiguration(DatabaseReplicationConfigurationArgs.builder()
                    .accounts(                
                        "test_account1",
                        "test_account_2")
                    .ignoreEditionCheck(true)
                    .build())
                .build());
    
            var fromReplica = new Database("fromReplica", DatabaseArgs.builder()        
                .comment("test comment")
                .dataRetentionTimeInDays(3)
                .fromReplica("\"org1\".\"account1\".\"primary_db_name\"")
                .build());
    
            var fromShare = new Database("fromShare", DatabaseArgs.builder()        
                .comment("test comment")
                .fromShare(Map.ofEntries(
                    Map.entry("provider", "account1_locator"),
                    Map.entry("share", "share1")
                ))
                .build());
    
        }
    }
    
    resources:
      simple:
        type: snowflake:Database
        properties:
          comment: test comment
          dataRetentionTimeInDays: 3
      withReplication:
        type: snowflake:Database
        properties:
          comment: test comment 2
          replicationConfiguration:
            accounts:
              - test_account1
              - test_account_2
            ignoreEditionCheck: true
      fromReplica:
        type: snowflake:Database
        properties:
          comment: test comment
          dataRetentionTimeInDays: 3
          fromReplica: '"org1"."account1"."primary_db_name"'
      fromShare:
        type: snowflake:Database
        properties:
          comment: test comment
          fromShare:
            provider: account1_locator
            share: share1
    

    Create Database Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Database(name: string, args?: DatabaseArgs, opts?: CustomResourceOptions);
    @overload
    def Database(resource_name: str,
                 args: Optional[DatabaseArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Database(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 comment: Optional[str] = None,
                 data_retention_time_in_days: Optional[int] = None,
                 from_database: Optional[str] = None,
                 from_replica: Optional[str] = None,
                 from_share: Optional[Mapping[str, str]] = None,
                 is_transient: Optional[bool] = None,
                 name: Optional[str] = None,
                 replication_configuration: Optional[DatabaseReplicationConfigurationArgs] = None)
    func NewDatabase(ctx *Context, name string, args *DatabaseArgs, opts ...ResourceOption) (*Database, error)
    public Database(string name, DatabaseArgs? args = null, CustomResourceOptions? opts = null)
    public Database(String name, DatabaseArgs args)
    public Database(String name, DatabaseArgs args, CustomResourceOptions options)
    
    type: snowflake:Database
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DatabaseArgs
    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 DatabaseArgs
    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 DatabaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var databaseResource = new Snowflake.Database("databaseResource", new()
    {
        Comment = "string",
        DataRetentionTimeInDays = 0,
        FromDatabase = "string",
        FromReplica = "string",
        FromShare = 
        {
            { "string", "string" },
        },
        IsTransient = false,
        Name = "string",
        ReplicationConfiguration = new Snowflake.Inputs.DatabaseReplicationConfigurationArgs
        {
            Accounts = new[]
            {
                "string",
            },
            IgnoreEditionCheck = false,
        },
    });
    
    example, err := snowflake.NewDatabase(ctx, "databaseResource", &snowflake.DatabaseArgs{
    	Comment:                 pulumi.String("string"),
    	DataRetentionTimeInDays: pulumi.Int(0),
    	FromDatabase:            pulumi.String("string"),
    	FromReplica:             pulumi.String("string"),
    	FromShare: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	IsTransient: pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    	ReplicationConfiguration: &snowflake.DatabaseReplicationConfigurationArgs{
    		Accounts: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IgnoreEditionCheck: pulumi.Bool(false),
    	},
    })
    
    var databaseResource = new Database("databaseResource", DatabaseArgs.builder()        
        .comment("string")
        .dataRetentionTimeInDays(0)
        .fromDatabase("string")
        .fromReplica("string")
        .fromShare(Map.of("string", "string"))
        .isTransient(false)
        .name("string")
        .replicationConfiguration(DatabaseReplicationConfigurationArgs.builder()
            .accounts("string")
            .ignoreEditionCheck(false)
            .build())
        .build());
    
    database_resource = snowflake.Database("databaseResource",
        comment="string",
        data_retention_time_in_days=0,
        from_database="string",
        from_replica="string",
        from_share={
            "string": "string",
        },
        is_transient=False,
        name="string",
        replication_configuration=snowflake.DatabaseReplicationConfigurationArgs(
            accounts=["string"],
            ignore_edition_check=False,
        ))
    
    const databaseResource = new snowflake.Database("databaseResource", {
        comment: "string",
        dataRetentionTimeInDays: 0,
        fromDatabase: "string",
        fromReplica: "string",
        fromShare: {
            string: "string",
        },
        isTransient: false,
        name: "string",
        replicationConfiguration: {
            accounts: ["string"],
            ignoreEditionCheck: false,
        },
    });
    
    type: snowflake:Database
    properties:
        comment: string
        dataRetentionTimeInDays: 0
        fromDatabase: string
        fromReplica: string
        fromShare:
            string: string
        isTransient: false
        name: string
        replicationConfiguration:
            accounts:
                - string
            ignoreEditionCheck: false
    

    Database Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Database resource accepts the following input properties:

    Comment string
    Specifies a comment for the database.
    DataRetentionTimeInDays int
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    FromDatabase string
    Specify a database to create a clone from.
    FromReplica string
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    FromShare Dictionary<string, string>
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    IsTransient bool
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    Name string
    Specifies the identifier for the database; must be unique for your account.
    ReplicationConfiguration DatabaseReplicationConfiguration
    When set, specifies the configurations for database replication.
    Comment string
    Specifies a comment for the database.
    DataRetentionTimeInDays int
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    FromDatabase string
    Specify a database to create a clone from.
    FromReplica string
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    FromShare map[string]string
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    IsTransient bool
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    Name string
    Specifies the identifier for the database; must be unique for your account.
    ReplicationConfiguration DatabaseReplicationConfigurationArgs
    When set, specifies the configurations for database replication.
    comment String
    Specifies a comment for the database.
    dataRetentionTimeInDays Integer
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    fromDatabase String
    Specify a database to create a clone from.
    fromReplica String
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    fromShare Map<String,String>
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    isTransient Boolean
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name String
    Specifies the identifier for the database; must be unique for your account.
    replicationConfiguration DatabaseReplicationConfiguration
    When set, specifies the configurations for database replication.
    comment string
    Specifies a comment for the database.
    dataRetentionTimeInDays number
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    fromDatabase string
    Specify a database to create a clone from.
    fromReplica string
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    fromShare {[key: string]: string}
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    isTransient boolean
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name string
    Specifies the identifier for the database; must be unique for your account.
    replicationConfiguration DatabaseReplicationConfiguration
    When set, specifies the configurations for database replication.
    comment str
    Specifies a comment for the database.
    data_retention_time_in_days int
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    from_database str
    Specify a database to create a clone from.
    from_replica str
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    from_share Mapping[str, str]
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    is_transient bool
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name str
    Specifies the identifier for the database; must be unique for your account.
    replication_configuration DatabaseReplicationConfigurationArgs
    When set, specifies the configurations for database replication.
    comment String
    Specifies a comment for the database.
    dataRetentionTimeInDays Number
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    fromDatabase String
    Specify a database to create a clone from.
    fromReplica String
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    fromShare Map<String>
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    isTransient Boolean
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name String
    Specifies the identifier for the database; must be unique for your account.
    replicationConfiguration Property Map
    When set, specifies the configurations for database replication.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Database Resource

    Get an existing Database 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?: DatabaseState, opts?: CustomResourceOptions): Database
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            data_retention_time_in_days: Optional[int] = None,
            from_database: Optional[str] = None,
            from_replica: Optional[str] = None,
            from_share: Optional[Mapping[str, str]] = None,
            is_transient: Optional[bool] = None,
            name: Optional[str] = None,
            replication_configuration: Optional[DatabaseReplicationConfigurationArgs] = None) -> Database
    func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
    public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
    public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Comment string
    Specifies a comment for the database.
    DataRetentionTimeInDays int
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    FromDatabase string
    Specify a database to create a clone from.
    FromReplica string
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    FromShare Dictionary<string, string>
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    IsTransient bool
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    Name string
    Specifies the identifier for the database; must be unique for your account.
    ReplicationConfiguration DatabaseReplicationConfiguration
    When set, specifies the configurations for database replication.
    Comment string
    Specifies a comment for the database.
    DataRetentionTimeInDays int
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    FromDatabase string
    Specify a database to create a clone from.
    FromReplica string
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    FromShare map[string]string
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    IsTransient bool
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    Name string
    Specifies the identifier for the database; must be unique for your account.
    ReplicationConfiguration DatabaseReplicationConfigurationArgs
    When set, specifies the configurations for database replication.
    comment String
    Specifies a comment for the database.
    dataRetentionTimeInDays Integer
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    fromDatabase String
    Specify a database to create a clone from.
    fromReplica String
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    fromShare Map<String,String>
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    isTransient Boolean
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name String
    Specifies the identifier for the database; must be unique for your account.
    replicationConfiguration DatabaseReplicationConfiguration
    When set, specifies the configurations for database replication.
    comment string
    Specifies a comment for the database.
    dataRetentionTimeInDays number
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    fromDatabase string
    Specify a database to create a clone from.
    fromReplica string
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    fromShare {[key: string]: string}
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    isTransient boolean
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name string
    Specifies the identifier for the database; must be unique for your account.
    replicationConfiguration DatabaseReplicationConfiguration
    When set, specifies the configurations for database replication.
    comment str
    Specifies a comment for the database.
    data_retention_time_in_days int
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    from_database str
    Specify a database to create a clone from.
    from_replica str
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    from_share Mapping[str, str]
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    is_transient bool
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name str
    Specifies the identifier for the database; must be unique for your account.
    replication_configuration DatabaseReplicationConfigurationArgs
    When set, specifies the configurations for database replication.
    comment String
    Specifies a comment for the database.
    dataRetentionTimeInDays Number
    Number of days for which Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object. A value of 0 effectively disables Time Travel for the specified database. Default value for this field is set to -1, which is a fallback to use Snowflake default. For more information, see Understanding & Using Time Travel.
    fromDatabase String
    Specify a database to create a clone from.
    fromReplica String
    Specify a fully-qualified path to a database to create a replica from. A fully qualified path follows the format of "<organization_name>"."<account_name>"."<db_name>". An example would be: "myorg1"."account1"."db1"
    fromShare Map<String>
    Specify a provider and a share in this map to create a database from a share. As of version 0.87.0, the provider field is the account locator.
    isTransient Boolean
    Specifies a database as transient. Transient databases do not have a Fail-safe period so they do not incur additional storage costs once they leave Time Travel; however, this means they are also not protected by Fail-safe in the event of a data loss.
    name String
    Specifies the identifier for the database; must be unique for your account.
    replicationConfiguration Property Map
    When set, specifies the configurations for database replication.

    Supporting Types

    DatabaseReplicationConfiguration, DatabaseReplicationConfigurationArgs

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

    Import

    $ pulumi import snowflake:index/database:Database example 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
    Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi