1. Packages
  2. Snowflake
  3. API Docs
  4. Schema
Snowflake v0.50.2 published on Friday, Mar 8, 2024 by Pulumi

snowflake.Schema

Explore with Pulumi AI

snowflake logo
Snowflake v0.50.2 published on Friday, Mar 8, 2024 by Pulumi

    Import

    format is dbName | schemaName

    $ pulumi import snowflake:index/schema:Schema example 'dbName|schemaName'
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Snowflake = Pulumi.Snowflake;
    
    return await Deployment.RunAsync(() => 
    {
        var schema = new Snowflake.Schema("schema", new()
        {
            Comment = "A schema.",
            DataRetentionDays = 1,
            Database = "database",
            IsManaged = false,
            IsTransient = false,
        });
    
    });
    
    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.NewSchema(ctx, "schema", &snowflake.SchemaArgs{
    			Comment:           pulumi.String("A schema."),
    			DataRetentionDays: pulumi.Int(1),
    			Database:          pulumi.String("database"),
    			IsManaged:         pulumi.Bool(false),
    			IsTransient:       pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.Schema;
    import com.pulumi.snowflake.SchemaArgs;
    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 schema = new Schema("schema", SchemaArgs.builder()        
                .comment("A schema.")
                .dataRetentionDays(1)
                .database("database")
                .isManaged(false)
                .isTransient(false)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    schema = snowflake.Schema("schema",
        comment="A schema.",
        data_retention_days=1,
        database="database",
        is_managed=False,
        is_transient=False)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const schema = new snowflake.Schema("schema", {
        comment: "A schema.",
        dataRetentionDays: 1,
        database: "database",
        isManaged: false,
        isTransient: false,
    });
    
    resources:
      schema:
        type: snowflake:Schema
        properties:
          comment: A schema.
          dataRetentionDays: 1
          database: database
          isManaged: false
          isTransient: false
    

    Create Schema Resource

    new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);
    @overload
    def Schema(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               comment: Optional[str] = None,
               data_retention_days: Optional[int] = None,
               database: Optional[str] = None,
               is_managed: Optional[bool] = None,
               is_transient: Optional[bool] = None,
               name: Optional[str] = None,
               tags: Optional[Sequence[SchemaTagArgs]] = None)
    @overload
    def Schema(resource_name: str,
               args: SchemaArgs,
               opts: Optional[ResourceOptions] = None)
    func NewSchema(ctx *Context, name string, args SchemaArgs, opts ...ResourceOption) (*Schema, error)
    public Schema(string name, SchemaArgs args, CustomResourceOptions? opts = null)
    public Schema(String name, SchemaArgs args)
    public Schema(String name, SchemaArgs args, CustomResourceOptions options)
    
    type: snowflake:Schema
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SchemaArgs
    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 SchemaArgs
    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 SchemaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Schema 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 Schema resource accepts the following input properties:

    Database string
    Name of the database that the tag was created in.
    Comment string
    Specifies a comment for the schema.
    DataRetentionDays int
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    IsManaged bool
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    IsTransient bool
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    Tags List<SchemaTag>
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    Database string
    Name of the database that the tag was created in.
    Comment string
    Specifies a comment for the schema.
    DataRetentionDays int
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    IsManaged bool
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    IsTransient bool
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    Tags []SchemaTagArgs
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    database String
    Name of the database that the tag was created in.
    comment String
    Specifies a comment for the schema.
    dataRetentionDays Integer
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    isManaged Boolean
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    isTransient Boolean
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags List<SchemaTag>
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    database string
    Name of the database that the tag was created in.
    comment string
    Specifies a comment for the schema.
    dataRetentionDays number
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    isManaged boolean
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    isTransient boolean
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags SchemaTag[]
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    database str
    Name of the database that the tag was created in.
    comment str
    Specifies a comment for the schema.
    data_retention_days int
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    is_managed bool
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    is_transient bool
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags Sequence[SchemaTagArgs]
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    database String
    Name of the database that the tag was created in.
    comment String
    Specifies a comment for the schema.
    dataRetentionDays Number
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    isManaged Boolean
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    isTransient Boolean
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags List<Property Map>
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Schema 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 Schema Resource

    Get an existing Schema 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?: SchemaState, opts?: CustomResourceOptions): Schema
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            data_retention_days: Optional[int] = None,
            database: Optional[str] = None,
            is_managed: Optional[bool] = None,
            is_transient: Optional[bool] = None,
            name: Optional[str] = None,
            tags: Optional[Sequence[SchemaTagArgs]] = None) -> Schema
    func GetSchema(ctx *Context, name string, id IDInput, state *SchemaState, opts ...ResourceOption) (*Schema, error)
    public static Schema Get(string name, Input<string> id, SchemaState? state, CustomResourceOptions? opts = null)
    public static Schema get(String name, Output<String> id, SchemaState 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 schema.
    DataRetentionDays int
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    Database string
    Name of the database that the tag was created in.
    IsManaged bool
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    IsTransient bool
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    Tags List<SchemaTag>
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    Comment string
    Specifies a comment for the schema.
    DataRetentionDays int
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    Database string
    Name of the database that the tag was created in.
    IsManaged bool
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    IsTransient bool
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    Tags []SchemaTagArgs
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    comment String
    Specifies a comment for the schema.
    dataRetentionDays Integer
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    database String
    Name of the database that the tag was created in.
    isManaged Boolean
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    isTransient Boolean
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags List<SchemaTag>
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    comment string
    Specifies a comment for the schema.
    dataRetentionDays number
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    database string
    Name of the database that the tag was created in.
    isManaged boolean
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    isTransient boolean
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags SchemaTag[]
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    comment str
    Specifies a comment for the schema.
    data_retention_days int
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    database str
    Name of the database that the tag was created in.
    is_managed bool
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    is_transient bool
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags Sequence[SchemaTagArgs]
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    comment String
    Specifies a comment for the schema.
    dataRetentionDays Number
    Specifies the number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema. Default value for this field is set to -1, which is a fallback to use Snowflake default.
    database String
    Name of the database that the tag was created in.
    isManaged Boolean
    Specifies a managed schema. Managed access schemas centralize privilege management with the schema owner.
    isTransient Boolean
    Specifies a schema as transient. Transient schemas 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
    Tag name, e.g. department.
    tags List<Property Map>
    Definitions of a tag to associate with the resource.

    Deprecated:Use the 'snowflake_tag_association' resource instead.

    Supporting Types

    SchemaTag, SchemaTagArgs

    Name string
    Tag name, e.g. department.
    Value string
    Tag value, e.g. marketing_info.
    Database string
    Name of the database that the tag was created in.
    Schema string
    Name of the schema that the tag was created in.
    Name string
    Tag name, e.g. department.
    Value string
    Tag value, e.g. marketing_info.
    Database string
    Name of the database that the tag was created in.
    Schema string
    Name of the schema that the tag was created in.
    name String
    Tag name, e.g. department.
    value String
    Tag value, e.g. marketing_info.
    database String
    Name of the database that the tag was created in.
    schema String
    Name of the schema that the tag was created in.
    name string
    Tag name, e.g. department.
    value string
    Tag value, e.g. marketing_info.
    database string
    Name of the database that the tag was created in.
    schema string
    Name of the schema that the tag was created in.
    name str
    Tag name, e.g. department.
    value str
    Tag value, e.g. marketing_info.
    database str
    Name of the database that the tag was created in.
    schema str
    Name of the schema that the tag was created in.
    name String
    Tag name, e.g. department.
    value String
    Tag value, e.g. marketing_info.
    database String
    Name of the database that the tag was created in.
    schema String
    Name of the schema that the tag was created in.

    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.50.2 published on Friday, Mar 8, 2024 by Pulumi