snowflake.SessionParameter
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
const s = new snowflake.SessionParameter("s", {
key: "AUTOCOMMIT",
value: "false",
user: "TEST_USER",
});
const s2 = new snowflake.SessionParameter("s2", {
key: "BINARY_OUTPUT_FORMAT",
value: "BASE64",
onAccount: true,
});
import pulumi
import pulumi_snowflake as snowflake
s = snowflake.SessionParameter("s",
key="AUTOCOMMIT",
value="false",
user="TEST_USER")
s2 = snowflake.SessionParameter("s2",
key="BINARY_OUTPUT_FORMAT",
value="BASE64",
on_account=True)
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.NewSessionParameter(ctx, "s", &snowflake.SessionParameterArgs{
Key: pulumi.String("AUTOCOMMIT"),
Value: pulumi.String("false"),
User: pulumi.String("TEST_USER"),
})
if err != nil {
return err
}
_, err = snowflake.NewSessionParameter(ctx, "s2", &snowflake.SessionParameterArgs{
Key: pulumi.String("BINARY_OUTPUT_FORMAT"),
Value: pulumi.String("BASE64"),
OnAccount: pulumi.Bool(true),
})
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 s = new Snowflake.SessionParameter("s", new()
{
Key = "AUTOCOMMIT",
Value = "false",
User = "TEST_USER",
});
var s2 = new Snowflake.SessionParameter("s2", new()
{
Key = "BINARY_OUTPUT_FORMAT",
Value = "BASE64",
OnAccount = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.SessionParameter;
import com.pulumi.snowflake.SessionParameterArgs;
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 s = new SessionParameter("s", SessionParameterArgs.builder()
.key("AUTOCOMMIT")
.value("false")
.user("TEST_USER")
.build());
var s2 = new SessionParameter("s2", SessionParameterArgs.builder()
.key("BINARY_OUTPUT_FORMAT")
.value("BASE64")
.onAccount(true)
.build());
}
}
resources:
s:
type: snowflake:SessionParameter
properties:
key: AUTOCOMMIT
value: 'false'
user: TEST_USER
s2:
type: snowflake:SessionParameter
properties:
key: BINARY_OUTPUT_FORMAT
value: BASE64
onAccount: true
Create SessionParameter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SessionParameter(name: string, args: SessionParameterArgs, opts?: CustomResourceOptions);
@overload
def SessionParameter(resource_name: str,
args: SessionParameterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SessionParameter(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
value: Optional[str] = None,
on_account: Optional[bool] = None,
user: Optional[str] = None)
func NewSessionParameter(ctx *Context, name string, args SessionParameterArgs, opts ...ResourceOption) (*SessionParameter, error)
public SessionParameter(string name, SessionParameterArgs args, CustomResourceOptions? opts = null)
public SessionParameter(String name, SessionParameterArgs args)
public SessionParameter(String name, SessionParameterArgs args, CustomResourceOptions options)
type: snowflake:SessionParameter
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 SessionParameterArgs
- 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 SessionParameterArgs
- 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 SessionParameterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SessionParameterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SessionParameterArgs
- 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 sessionParameterResource = new Snowflake.SessionParameter("sessionParameterResource", new()
{
Key = "string",
Value = "string",
OnAccount = false,
User = "string",
});
example, err := snowflake.NewSessionParameter(ctx, "sessionParameterResource", &snowflake.SessionParameterArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
OnAccount: pulumi.Bool(false),
User: pulumi.String("string"),
})
var sessionParameterResource = new SessionParameter("sessionParameterResource", SessionParameterArgs.builder()
.key("string")
.value("string")
.onAccount(false)
.user("string")
.build());
session_parameter_resource = snowflake.SessionParameter("sessionParameterResource",
key="string",
value="string",
on_account=False,
user="string")
const sessionParameterResource = new snowflake.SessionParameter("sessionParameterResource", {
key: "string",
value: "string",
onAccount: false,
user: "string",
});
type: snowflake:SessionParameter
properties:
key: string
onAccount: false
user: string
value: string
SessionParameter 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 SessionParameter resource accepts the following input properties:
- Key string
- Name of session parameter. Valid values are those in session parameters.
- Value string
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- On
Account bool - If true, the session parameter will be set on the account level.
- User string
- The user to set the session parameter for. Required if on_account is false
- Key string
- Name of session parameter. Valid values are those in session parameters.
- Value string
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- On
Account bool - If true, the session parameter will be set on the account level.
- User string
- The user to set the session parameter for. Required if on_account is false
- key String
- Name of session parameter. Valid values are those in session parameters.
- value String
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- on
Account Boolean - If true, the session parameter will be set on the account level.
- user String
- The user to set the session parameter for. Required if on_account is false
- key string
- Name of session parameter. Valid values are those in session parameters.
- value string
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- on
Account boolean - If true, the session parameter will be set on the account level.
- user string
- The user to set the session parameter for. Required if on_account is false
- key str
- Name of session parameter. Valid values are those in session parameters.
- value str
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- on_
account bool - If true, the session parameter will be set on the account level.
- user str
- The user to set the session parameter for. Required if on_account is false
- key String
- Name of session parameter. Valid values are those in session parameters.
- value String
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- on
Account Boolean - If true, the session parameter will be set on the account level.
- user String
- The user to set the session parameter for. Required if on_account is false
Outputs
All input properties are implicitly available as output properties. Additionally, the SessionParameter 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 SessionParameter Resource
Get an existing SessionParameter 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?: SessionParameterState, opts?: CustomResourceOptions): SessionParameter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
on_account: Optional[bool] = None,
user: Optional[str] = None,
value: Optional[str] = None) -> SessionParameter
func GetSessionParameter(ctx *Context, name string, id IDInput, state *SessionParameterState, opts ...ResourceOption) (*SessionParameter, error)
public static SessionParameter Get(string name, Input<string> id, SessionParameterState? state, CustomResourceOptions? opts = null)
public static SessionParameter get(String name, Output<String> id, SessionParameterState 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.
- Key string
- Name of session parameter. Valid values are those in session parameters.
- On
Account bool - If true, the session parameter will be set on the account level.
- User string
- The user to set the session parameter for. Required if on_account is false
- Value string
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- Key string
- Name of session parameter. Valid values are those in session parameters.
- On
Account bool - If true, the session parameter will be set on the account level.
- User string
- The user to set the session parameter for. Required if on_account is false
- Value string
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- key String
- Name of session parameter. Valid values are those in session parameters.
- on
Account Boolean - If true, the session parameter will be set on the account level.
- user String
- The user to set the session parameter for. Required if on_account is false
- value String
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- key string
- Name of session parameter. Valid values are those in session parameters.
- on
Account boolean - If true, the session parameter will be set on the account level.
- user string
- The user to set the session parameter for. Required if on_account is false
- value string
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- key str
- Name of session parameter. Valid values are those in session parameters.
- on_
account bool - If true, the session parameter will be set on the account level.
- user str
- The user to set the session parameter for. Required if on_account is false
- value str
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
- key String
- Name of session parameter. Valid values are those in session parameters.
- on
Account Boolean - If true, the session parameter will be set on the account level.
- user String
- The user to set the session parameter for. Required if on_account is false
- value String
- Value of session parameter, as a string. Constraints are the same as those for the parameters in Snowflake documentation.
Import
$ pulumi import snowflake:index/sessionParameter:SessionParameter s <parameter_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.