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

snowflake.SessionParameter

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 sessionParameter = new snowflake.SessionParameter("sessionParameter", {
        key: "AUTOCOMMIT",
        user: "TEST_USER",
        value: "false",
    });
    const s2 = new snowflake.SessionParameter("s2", {
        key: "BINARY_OUTPUT_FORMAT",
        onAccount: true,
        value: "BASE64",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    session_parameter = snowflake.SessionParameter("sessionParameter",
        key="AUTOCOMMIT",
        user="TEST_USER",
        value="false")
    s2 = snowflake.SessionParameter("s2",
        key="BINARY_OUTPUT_FORMAT",
        on_account=True,
        value="BASE64")
    
    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, "sessionParameter", &snowflake.SessionParameterArgs{
    			Key:   pulumi.String("AUTOCOMMIT"),
    			User:  pulumi.String("TEST_USER"),
    			Value: pulumi.String("false"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewSessionParameter(ctx, "s2", &snowflake.SessionParameterArgs{
    			Key:       pulumi.String("BINARY_OUTPUT_FORMAT"),
    			OnAccount: pulumi.Bool(true),
    			Value:     pulumi.String("BASE64"),
    		})
    		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 sessionParameter = new Snowflake.SessionParameter("sessionParameter", new()
        {
            Key = "AUTOCOMMIT",
            User = "TEST_USER",
            Value = "false",
        });
    
        var s2 = new Snowflake.SessionParameter("s2", new()
        {
            Key = "BINARY_OUTPUT_FORMAT",
            OnAccount = true,
            Value = "BASE64",
        });
    
    });
    
    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 sessionParameter = new SessionParameter("sessionParameter", SessionParameterArgs.builder()        
                .key("AUTOCOMMIT")
                .user("TEST_USER")
                .value("false")
                .build());
    
            var s2 = new SessionParameter("s2", SessionParameterArgs.builder()        
                .key("BINARY_OUTPUT_FORMAT")
                .onAccount(true)
                .value("BASE64")
                .build());
    
        }
    }
    
    resources:
      sessionParameter:
        type: snowflake:SessionParameter
        properties:
          key: AUTOCOMMIT
          user: TEST_USER
          value: 'false'
      s2:
        type: snowflake:SessionParameter
        properties:
          key: BINARY_OUTPUT_FORMAT
          onAccount: true
          value: BASE64
    

    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.

    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.
    OnAccount 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.
    OnAccount 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.
    onAccount 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.
    onAccount 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.
    onAccount 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.
    The following state arguments are supported:
    Key string
    Name of session parameter. Valid values are those in session parameters.
    OnAccount 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.
    OnAccount 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.
    onAccount 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.
    onAccount 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.
    onAccount 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.
    snowflake logo
    Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi