snowflake.Stage
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
const exampleStage = new snowflake.Stage("example_stage", {
name: "EXAMPLE_STAGE",
url: "s3://com.example.bucket/prefix",
database: "EXAMPLE_DB",
schema: "EXAMPLE_SCHEMA",
credentials: `AWS_KEY_ID='${exampleAwsKeyId}' AWS_SECRET_KEY='${exampleAwsSecretKey}'`,
});
import pulumi
import pulumi_snowflake as snowflake
example_stage = snowflake.Stage("example_stage",
name="EXAMPLE_STAGE",
url="s3://com.example.bucket/prefix",
database="EXAMPLE_DB",
schema="EXAMPLE_SCHEMA",
credentials=f"AWS_KEY_ID='{example_aws_key_id}' AWS_SECRET_KEY='{example_aws_secret_key}'")
package main
import (
"fmt"
"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.NewStage(ctx, "example_stage", &snowflake.StageArgs{
Name: pulumi.String("EXAMPLE_STAGE"),
Url: pulumi.String("s3://com.example.bucket/prefix"),
Database: pulumi.String("EXAMPLE_DB"),
Schema: pulumi.String("EXAMPLE_SCHEMA"),
Credentials: pulumi.String(fmt.Sprintf("AWS_KEY_ID='%v' AWS_SECRET_KEY='%v'", exampleAwsKeyId, exampleAwsSecretKey)),
})
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 exampleStage = new Snowflake.Stage("example_stage", new()
{
Name = "EXAMPLE_STAGE",
Url = "s3://com.example.bucket/prefix",
Database = "EXAMPLE_DB",
Schema = "EXAMPLE_SCHEMA",
Credentials = $"AWS_KEY_ID='{exampleAwsKeyId}' AWS_SECRET_KEY='{exampleAwsSecretKey}'",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.Stage;
import com.pulumi.snowflake.StageArgs;
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 exampleStage = new Stage("exampleStage", StageArgs.builder()
.name("EXAMPLE_STAGE")
.url("s3://com.example.bucket/prefix")
.database("EXAMPLE_DB")
.schema("EXAMPLE_SCHEMA")
.credentials(String.format("AWS_KEY_ID='%s' AWS_SECRET_KEY='%s'", exampleAwsKeyId,exampleAwsSecretKey))
.build());
}
}
resources:
exampleStage:
type: snowflake:Stage
name: example_stage
properties:
name: EXAMPLE_STAGE
url: s3://com.example.bucket/prefix
database: EXAMPLE_DB
schema: EXAMPLE_SCHEMA
credentials: AWS_KEY_ID='${exampleAwsKeyId}' AWS_SECRET_KEY='${exampleAwsSecretKey}'
Create Stage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Stage(name: string, args: StageArgs, opts?: CustomResourceOptions);
@overload
def Stage(resource_name: str,
args: StageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Stage(resource_name: str,
opts: Optional[ResourceOptions] = None,
database: Optional[str] = None,
schema: Optional[str] = None,
credentials: Optional[str] = None,
aws_external_id: Optional[str] = None,
copy_options: Optional[str] = None,
directory: Optional[str] = None,
encryption: Optional[str] = None,
file_format: Optional[str] = None,
name: Optional[str] = None,
comment: Optional[str] = None,
snowflake_iam_user: Optional[str] = None,
storage_integration: Optional[str] = None,
tags: Optional[Sequence[StageTagArgs]] = None,
url: Optional[str] = None)
func NewStage(ctx *Context, name string, args StageArgs, opts ...ResourceOption) (*Stage, error)
public Stage(string name, StageArgs args, CustomResourceOptions? opts = null)
type: snowflake:Stage
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 StageArgs
- 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 StageArgs
- 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 StageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var stageResource = new Snowflake.Stage("stageResource", new()
{
Database = "string",
Schema = "string",
Credentials = "string",
AwsExternalId = "string",
CopyOptions = "string",
Directory = "string",
Encryption = "string",
FileFormat = "string",
Name = "string",
Comment = "string",
SnowflakeIamUser = "string",
StorageIntegration = "string",
Url = "string",
});
example, err := snowflake.NewStage(ctx, "stageResource", &snowflake.StageArgs{
Database: pulumi.String("string"),
Schema: pulumi.String("string"),
Credentials: pulumi.String("string"),
AwsExternalId: pulumi.String("string"),
CopyOptions: pulumi.String("string"),
Directory: pulumi.String("string"),
Encryption: pulumi.String("string"),
FileFormat: pulumi.String("string"),
Name: pulumi.String("string"),
Comment: pulumi.String("string"),
SnowflakeIamUser: pulumi.String("string"),
StorageIntegration: pulumi.String("string"),
Url: pulumi.String("string"),
})
var stageResource = new Stage("stageResource", StageArgs.builder()
.database("string")
.schema("string")
.credentials("string")
.awsExternalId("string")
.copyOptions("string")
.directory("string")
.encryption("string")
.fileFormat("string")
.name("string")
.comment("string")
.snowflakeIamUser("string")
.storageIntegration("string")
.url("string")
.build());
stage_resource = snowflake.Stage("stageResource",
database="string",
schema="string",
credentials="string",
aws_external_id="string",
copy_options="string",
directory="string",
encryption="string",
file_format="string",
name="string",
comment="string",
snowflake_iam_user="string",
storage_integration="string",
url="string")
const stageResource = new snowflake.Stage("stageResource", {
database: "string",
schema: "string",
credentials: "string",
awsExternalId: "string",
copyOptions: "string",
directory: "string",
encryption: "string",
fileFormat: "string",
name: "string",
comment: "string",
snowflakeIamUser: "string",
storageIntegration: "string",
url: "string",
});
type: snowflake:Stage
properties:
awsExternalId: string
comment: string
copyOptions: string
credentials: string
database: string
directory: string
encryption: string
fileFormat: string
name: string
schema: string
snowflakeIamUser: string
storageIntegration: string
url: string
Stage 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 Stage resource accepts the following input properties:
- Database string
- The database in which to create the stage.
- Schema string
- The schema in which to create the stage.
- Aws
External stringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- Comment string
- Specifies a comment for the stage.
- Copy
Options string - Specifies the copy options for the stage.
- Credentials string
- Specifies the credentials for the stage.
- Directory string
- Specifies the directory settings for the stage.
- Encryption string
- Specifies the encryption settings for the stage.
- File
Format string - Specifies the file format for the stage.
- Name string
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- Snowflake
Iam stringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- Storage
Integration string - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- List<Stage
Tag> - Definitions of a tag to associate with the resource.
- Url string
- Specifies the URL for the stage.
- Database string
- The database in which to create the stage.
- Schema string
- The schema in which to create the stage.
- Aws
External stringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- Comment string
- Specifies a comment for the stage.
- Copy
Options string - Specifies the copy options for the stage.
- Credentials string
- Specifies the credentials for the stage.
- Directory string
- Specifies the directory settings for the stage.
- Encryption string
- Specifies the encryption settings for the stage.
- File
Format string - Specifies the file format for the stage.
- Name string
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- Snowflake
Iam stringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- Storage
Integration string - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- []Stage
Tag Args - Definitions of a tag to associate with the resource.
- Url string
- Specifies the URL for the stage.
- database String
- The database in which to create the stage.
- schema String
- The schema in which to create the stage.
- aws
External StringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment String
- Specifies a comment for the stage.
- copy
Options String - Specifies the copy options for the stage.
- credentials String
- Specifies the credentials for the stage.
- directory String
- Specifies the directory settings for the stage.
- encryption String
- Specifies the encryption settings for the stage.
- file
Format String - Specifies the file format for the stage.
- name String
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- snowflake
Iam StringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage
Integration String - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- List<Stage
Tag> - Definitions of a tag to associate with the resource.
- url String
- Specifies the URL for the stage.
- database string
- The database in which to create the stage.
- schema string
- The schema in which to create the stage.
- aws
External stringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment string
- Specifies a comment for the stage.
- copy
Options string - Specifies the copy options for the stage.
- credentials string
- Specifies the credentials for the stage.
- directory string
- Specifies the directory settings for the stage.
- encryption string
- Specifies the encryption settings for the stage.
- file
Format string - Specifies the file format for the stage.
- name string
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- snowflake
Iam stringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage
Integration string - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- Stage
Tag[] - Definitions of a tag to associate with the resource.
- url string
- Specifies the URL for the stage.
- database str
- The database in which to create the stage.
- schema str
- The schema in which to create the stage.
- aws_
external_ strid - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment str
- Specifies a comment for the stage.
- copy_
options str - Specifies the copy options for the stage.
- credentials str
- Specifies the credentials for the stage.
- directory str
- Specifies the directory settings for the stage.
- encryption str
- Specifies the encryption settings for the stage.
- file_
format str - Specifies the file format for the stage.
- name str
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- snowflake_
iam_ struser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage_
integration str - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- Sequence[Stage
Tag Args] - Definitions of a tag to associate with the resource.
- url str
- Specifies the URL for the stage.
- database String
- The database in which to create the stage.
- schema String
- The schema in which to create the stage.
- aws
External StringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment String
- Specifies a comment for the stage.
- copy
Options String - Specifies the copy options for the stage.
- credentials String
- Specifies the credentials for the stage.
- directory String
- Specifies the directory settings for the stage.
- encryption String
- Specifies the encryption settings for the stage.
- file
Format String - Specifies the file format for the stage.
- name String
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- snowflake
Iam StringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage
Integration String - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- List<Property Map>
- Definitions of a tag to associate with the resource.
- url String
- Specifies the URL for the stage.
Outputs
All input properties are implicitly available as output properties. Additionally, the Stage 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 Stage Resource
Get an existing Stage 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?: StageState, opts?: CustomResourceOptions): Stage
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
aws_external_id: Optional[str] = None,
comment: Optional[str] = None,
copy_options: Optional[str] = None,
credentials: Optional[str] = None,
database: Optional[str] = None,
directory: Optional[str] = None,
encryption: Optional[str] = None,
file_format: Optional[str] = None,
name: Optional[str] = None,
schema: Optional[str] = None,
snowflake_iam_user: Optional[str] = None,
storage_integration: Optional[str] = None,
tags: Optional[Sequence[StageTagArgs]] = None,
url: Optional[str] = None) -> Stage
func GetStage(ctx *Context, name string, id IDInput, state *StageState, opts ...ResourceOption) (*Stage, error)
public static Stage Get(string name, Input<string> id, StageState? state, CustomResourceOptions? opts = null)
public static Stage get(String name, Output<String> id, StageState 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.
- Aws
External stringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- Comment string
- Specifies a comment for the stage.
- Copy
Options string - Specifies the copy options for the stage.
- Credentials string
- Specifies the credentials for the stage.
- Database string
- The database in which to create the stage.
- Directory string
- Specifies the directory settings for the stage.
- Encryption string
- Specifies the encryption settings for the stage.
- File
Format string - Specifies the file format for the stage.
- Name string
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- Schema string
- The schema in which to create the stage.
- Snowflake
Iam stringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- Storage
Integration string - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- List<Stage
Tag> - Definitions of a tag to associate with the resource.
- Url string
- Specifies the URL for the stage.
- Aws
External stringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- Comment string
- Specifies a comment for the stage.
- Copy
Options string - Specifies the copy options for the stage.
- Credentials string
- Specifies the credentials for the stage.
- Database string
- The database in which to create the stage.
- Directory string
- Specifies the directory settings for the stage.
- Encryption string
- Specifies the encryption settings for the stage.
- File
Format string - Specifies the file format for the stage.
- Name string
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- Schema string
- The schema in which to create the stage.
- Snowflake
Iam stringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- Storage
Integration string - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- []Stage
Tag Args - Definitions of a tag to associate with the resource.
- Url string
- Specifies the URL for the stage.
- aws
External StringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment String
- Specifies a comment for the stage.
- copy
Options String - Specifies the copy options for the stage.
- credentials String
- Specifies the credentials for the stage.
- database String
- The database in which to create the stage.
- directory String
- Specifies the directory settings for the stage.
- encryption String
- Specifies the encryption settings for the stage.
- file
Format String - Specifies the file format for the stage.
- name String
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- schema String
- The schema in which to create the stage.
- snowflake
Iam StringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage
Integration String - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- List<Stage
Tag> - Definitions of a tag to associate with the resource.
- url String
- Specifies the URL for the stage.
- aws
External stringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment string
- Specifies a comment for the stage.
- copy
Options string - Specifies the copy options for the stage.
- credentials string
- Specifies the credentials for the stage.
- database string
- The database in which to create the stage.
- directory string
- Specifies the directory settings for the stage.
- encryption string
- Specifies the encryption settings for the stage.
- file
Format string - Specifies the file format for the stage.
- name string
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- schema string
- The schema in which to create the stage.
- snowflake
Iam stringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage
Integration string - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- Stage
Tag[] - Definitions of a tag to associate with the resource.
- url string
- Specifies the URL for the stage.
- aws_
external_ strid - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment str
- Specifies a comment for the stage.
- copy_
options str - Specifies the copy options for the stage.
- credentials str
- Specifies the credentials for the stage.
- database str
- The database in which to create the stage.
- directory str
- Specifies the directory settings for the stage.
- encryption str
- Specifies the encryption settings for the stage.
- file_
format str - Specifies the file format for the stage.
- name str
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- schema str
- The schema in which to create the stage.
- snowflake_
iam_ struser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage_
integration str - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- Sequence[Stage
Tag Args] - Definitions of a tag to associate with the resource.
- url str
- Specifies the URL for the stage.
- aws
External StringId - A unique ID assigned to the specific stage. The ID has the following format: <snowflakeAccount>SFCRole=<snowflakeRoleId><randomId>
- comment String
- Specifies a comment for the stage.
- copy
Options String - Specifies the copy options for the stage.
- credentials String
- Specifies the credentials for the stage.
- database String
- The database in which to create the stage.
- directory String
- Specifies the directory settings for the stage.
- encryption String
- Specifies the encryption settings for the stage.
- file
Format String - Specifies the file format for the stage.
- name String
- Specifies the identifier for the stage; must be unique for the database and schema in which the stage is created.
- schema String
- The schema in which to create the stage.
- snowflake
Iam StringUser - An AWS IAM user created for your Snowflake account. This user is the same for every external S3 stage created in your account.
- storage
Integration String - Specifies the name of the storage integration used to delegate authentication responsibility for external cloud storage to a Snowflake identity and access management (IAM) entity.
- List<Property Map>
- Definitions of a tag to associate with the resource.
- url String
- Specifies the URL for the stage.
Supporting Types
StageTag, StageTagArgs
Import
format is database name | schema name | stage name
$ pulumi import snowflake:index/stage:Stage example 'dbName|schemaName|stageName'
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.