Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Snowflake

v0.2.1 published on Monday, Sep 27, 2021 by Pulumi

Sequence

Example Usage

using Pulumi;
using Snowflake = Pulumi.Snowflake;

class MyStack : Stack
{
    public MyStack()
    {
        var database = new Snowflake.Database("database", new Snowflake.DatabaseArgs
        {
        });
        var testSchema = new Snowflake.Schema("testSchema", new Snowflake.SchemaArgs
        {
            Database = snowflake_database.Test_database.Name,
        });
        var testSequence = new Snowflake.Sequence("testSequence", new Snowflake.SequenceArgs
        {
            Database = snowflake_database.Test_database.Name,
            Schema = testSchema.Name,
        });
    }

}
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, "database", nil)
		if err != nil {
			return err
		}
		testSchema, err := snowflake.NewSchema(ctx, "testSchema", &snowflake.SchemaArgs{
			Database: pulumi.Any(snowflake_database.Test_database.Name),
		})
		if err != nil {
			return err
		}
		_, err = snowflake.NewSequence(ctx, "testSequence", &snowflake.SequenceArgs{
			Database: pulumi.Any(snowflake_database.Test_database.Name),
			Schema:   testSchema.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_snowflake as snowflake

database = snowflake.Database("database")
test_schema = snowflake.Schema("testSchema", database=snowflake_database["test_database"]["name"])
test_sequence = snowflake.Sequence("testSequence",
    database=snowflake_database["test_database"]["name"],
    schema=test_schema.name)
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";

const database = new snowflake.Database("database", {});
const testSchema = new snowflake.Schema("testSchema", {database: snowflake_database.test_database.name});
const testSequence = new snowflake.Sequence("testSequence", {
    database: snowflake_database.test_database.name,
    schema: testSchema.name,
});

Create a Sequence Resource

new Sequence(name: string, args: SequenceArgs, opts?: CustomResourceOptions);
@overload
def Sequence(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             comment: Optional[str] = None,
             database: Optional[str] = None,
             increment: Optional[int] = None,
             name: Optional[str] = None,
             schema: Optional[str] = None)
@overload
def Sequence(resource_name: str,
             args: SequenceArgs,
             opts: Optional[ResourceOptions] = None)
func NewSequence(ctx *Context, name string, args SequenceArgs, opts ...ResourceOption) (*Sequence, error)
public Sequence(string name, SequenceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SequenceArgs
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 SequenceArgs
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 SequenceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SequenceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

Database string
The database in which to create the sequence. Don’t use the | character.
Schema string
The schema in which to create the sequence. Don’t use the | character.
Comment string
Specifies a comment for the sequence.
Increment int
The amount the sequence will increase by each time it is used
Name string
Specifies the name for the sequence.
Database string
The database in which to create the sequence. Don’t use the | character.
Schema string
The schema in which to create the sequence. Don’t use the | character.
Comment string
Specifies a comment for the sequence.
Increment int
The amount the sequence will increase by each time it is used
Name string
Specifies the name for the sequence.
database string
The database in which to create the sequence. Don’t use the | character.
schema string
The schema in which to create the sequence. Don’t use the | character.
comment string
Specifies a comment for the sequence.
increment number
The amount the sequence will increase by each time it is used
name string
Specifies the name for the sequence.
database str
The database in which to create the sequence. Don’t use the | character.
schema str
The schema in which to create the sequence. Don’t use the | character.
comment str
Specifies a comment for the sequence.
increment int
The amount the sequence will increase by each time it is used
name str
Specifies the name for the sequence.

Outputs

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

FullyQualifiedName string
The fully qualified name of the sequence.
Id string
The provider-assigned unique ID for this managed resource.
NextValue int
The next value the sequence will provide.
FullyQualifiedName string
The fully qualified name of the sequence.
Id string
The provider-assigned unique ID for this managed resource.
NextValue int
The next value the sequence will provide.
fullyQualifiedName string
The fully qualified name of the sequence.
id string
The provider-assigned unique ID for this managed resource.
nextValue number
The next value the sequence will provide.
fully_qualified_name str
The fully qualified name of the sequence.
id str
The provider-assigned unique ID for this managed resource.
next_value int
The next value the sequence will provide.

Look up an Existing Sequence Resource

Get an existing Sequence 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?: SequenceState, opts?: CustomResourceOptions): Sequence
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        comment: Optional[str] = None,
        database: Optional[str] = None,
        fully_qualified_name: Optional[str] = None,
        increment: Optional[int] = None,
        name: Optional[str] = None,
        next_value: Optional[int] = None,
        schema: Optional[str] = None) -> Sequence
func GetSequence(ctx *Context, name string, id IDInput, state *SequenceState, opts ...ResourceOption) (*Sequence, error)
public static Sequence Get(string name, Input<string> id, SequenceState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Comment string
Specifies a comment for the sequence.
Database string
The database in which to create the sequence. Don’t use the | character.
FullyQualifiedName string
The fully qualified name of the sequence.
Increment int
The amount the sequence will increase by each time it is used
Name string
Specifies the name for the sequence.
NextValue int
The next value the sequence will provide.
Schema string
The schema in which to create the sequence. Don’t use the | character.
Comment string
Specifies a comment for the sequence.
Database string
The database in which to create the sequence. Don’t use the | character.
FullyQualifiedName string
The fully qualified name of the sequence.
Increment int
The amount the sequence will increase by each time it is used
Name string
Specifies the name for the sequence.
NextValue int
The next value the sequence will provide.
Schema string
The schema in which to create the sequence. Don’t use the | character.
comment string
Specifies a comment for the sequence.
database string
The database in which to create the sequence. Don’t use the | character.
fullyQualifiedName string
The fully qualified name of the sequence.
increment number
The amount the sequence will increase by each time it is used
name string
Specifies the name for the sequence.
nextValue number
The next value the sequence will provide.
schema string
The schema in which to create the sequence. Don’t use the | character.
comment str
Specifies a comment for the sequence.
database str
The database in which to create the sequence. Don’t use the | character.
fully_qualified_name str
The fully qualified name of the sequence.
increment int
The amount the sequence will increase by each time it is used
name str
Specifies the name for the sequence.
next_value int
The next value the sequence will provide.
schema str
The schema in which to create the sequence. Don’t use the | character.

Package Details

Repository
https://github.com/pulumi/pulumi-snowflake
License
Apache-2.0
Notes
This Pulumi package is based on the snowflake Terraform Provider.