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

snowflake.getParameters

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 database = new snowflake.Database("database", {});
    const parameters = snowflake.getParametersOutput({
        parameterType: "OBJECT",
        objectType: "DATABASE",
        objectName: database.name,
    });
    const p2 = snowflake.getParameters({
        parameterType: "ACCOUNT",
        pattern: "%TIMESTAMP%",
    });
    const p3 = snowflake.getParameters({
        parameterType: "SESSION",
        pattern: "ROWS_PER_RESULTSET",
        user: "TEST_USER",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    database = snowflake.Database("database")
    parameters = snowflake.get_parameters_output(parameter_type="OBJECT",
        object_type="DATABASE",
        object_name=database.name)
    p2 = snowflake.get_parameters(parameter_type="ACCOUNT",
        pattern="%TIMESTAMP%")
    p3 = snowflake.get_parameters(parameter_type="SESSION",
        pattern="ROWS_PER_RESULTSET",
        user="TEST_USER")
    
    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 {
    		database, err := snowflake.NewDatabase(ctx, "database", nil)
    		if err != nil {
    			return err
    		}
    		_ = snowflake.GetParametersOutput(ctx, snowflake.GetParametersOutputArgs{
    			ParameterType: pulumi.String("OBJECT"),
    			ObjectType:    pulumi.String("DATABASE"),
    			ObjectName:    database.Name,
    		}, nil)
    		_, err = snowflake.GetParameters(ctx, &snowflake.GetParametersArgs{
    			ParameterType: pulumi.StringRef("ACCOUNT"),
    			Pattern:       pulumi.StringRef("%TIMESTAMP%"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.GetParameters(ctx, &snowflake.GetParametersArgs{
    			ParameterType: pulumi.StringRef("SESSION"),
    			Pattern:       pulumi.StringRef("ROWS_PER_RESULTSET"),
    			User:          pulumi.StringRef("TEST_USER"),
    		}, nil)
    		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 database = new Snowflake.Database("database");
    
        var parameters = Snowflake.GetParameters.Invoke(new()
        {
            ParameterType = "OBJECT",
            ObjectType = "DATABASE",
            ObjectName = database.Name,
        });
    
        var p2 = Snowflake.GetParameters.Invoke(new()
        {
            ParameterType = "ACCOUNT",
            Pattern = "%TIMESTAMP%",
        });
    
        var p3 = Snowflake.GetParameters.Invoke(new()
        {
            ParameterType = "SESSION",
            Pattern = "ROWS_PER_RESULTSET",
            User = "TEST_USER",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.Database;
    import com.pulumi.snowflake.SnowflakeFunctions;
    import com.pulumi.snowflake.inputs.GetParametersArgs;
    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 database = new Database("database");
    
            final var parameters = SnowflakeFunctions.getParameters(GetParametersArgs.builder()
                .parameterType("OBJECT")
                .objectType("DATABASE")
                .objectName(database.name())
                .build());
    
            final var p2 = SnowflakeFunctions.getParameters(GetParametersArgs.builder()
                .parameterType("ACCOUNT")
                .pattern("%TIMESTAMP%")
                .build());
    
            final var p3 = SnowflakeFunctions.getParameters(GetParametersArgs.builder()
                .parameterType("SESSION")
                .pattern("ROWS_PER_RESULTSET")
                .user("TEST_USER")
                .build());
    
        }
    }
    
    resources:
      database:
        type: snowflake:Database
    variables:
      parameters:
        fn::invoke:
          Function: snowflake:getParameters
          Arguments:
            parameterType: OBJECT
            objectType: DATABASE
            objectName: ${database.name}
      p2:
        fn::invoke:
          Function: snowflake:getParameters
          Arguments:
            parameterType: ACCOUNT
            pattern: '%TIMESTAMP%'
      p3:
        fn::invoke:
          Function: snowflake:getParameters
          Arguments:
            parameterType: SESSION
            pattern: ROWS_PER_RESULTSET
            user: TEST_USER
    

    Using getParameters

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getParameters(args: GetParametersArgs, opts?: InvokeOptions): Promise<GetParametersResult>
    function getParametersOutput(args: GetParametersOutputArgs, opts?: InvokeOptions): Output<GetParametersResult>
    def get_parameters(object_name: Optional[str] = None,
                       object_type: Optional[str] = None,
                       parameter_type: Optional[str] = None,
                       pattern: Optional[str] = None,
                       user: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetParametersResult
    def get_parameters_output(object_name: Optional[pulumi.Input[str]] = None,
                       object_type: Optional[pulumi.Input[str]] = None,
                       parameter_type: Optional[pulumi.Input[str]] = None,
                       pattern: Optional[pulumi.Input[str]] = None,
                       user: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetParametersResult]
    func GetParameters(ctx *Context, args *GetParametersArgs, opts ...InvokeOption) (*GetParametersResult, error)
    func GetParametersOutput(ctx *Context, args *GetParametersOutputArgs, opts ...InvokeOption) GetParametersResultOutput

    > Note: This function is named GetParameters in the Go SDK.

    public static class GetParameters 
    {
        public static Task<GetParametersResult> InvokeAsync(GetParametersArgs args, InvokeOptions? opts = null)
        public static Output<GetParametersResult> Invoke(GetParametersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetParametersResult> getParameters(GetParametersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: snowflake:index/getParameters:getParameters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ObjectName string
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    ObjectType string
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    ParameterType string
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    Pattern string
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    User string
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    ObjectName string
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    ObjectType string
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    ParameterType string
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    Pattern string
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    User string
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    objectName String
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    objectType String
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameterType String
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern String
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user String
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    objectName string
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    objectType string
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameterType string
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern string
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user string
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    object_name str
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    object_type str
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameter_type str
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern str
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user str
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    objectName String
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    objectType String
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameterType String
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern String
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user String
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.

    getParameters Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Parameters List<GetParametersParameter>
    The pipes in the schema
    ObjectName string
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    ObjectType string
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    ParameterType string
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    Pattern string
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    User string
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    Id string
    The provider-assigned unique ID for this managed resource.
    Parameters []GetParametersParameter
    The pipes in the schema
    ObjectName string
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    ObjectType string
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    ParameterType string
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    Pattern string
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    User string
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    id String
    The provider-assigned unique ID for this managed resource.
    parameters List<GetParametersParameter>
    The pipes in the schema
    objectName String
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    objectType String
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameterType String
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern String
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user String
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    id string
    The provider-assigned unique ID for this managed resource.
    parameters GetParametersParameter[]
    The pipes in the schema
    objectName string
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    objectType string
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameterType string
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern string
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user string
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    id str
    The provider-assigned unique ID for this managed resource.
    parameters Sequence[GetParametersParameter]
    The pipes in the schema
    object_name str
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    object_type str
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameter_type str
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern str
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user str
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.
    id String
    The provider-assigned unique ID for this managed resource.
    parameters List<Property Map>
    The pipes in the schema
    objectName String
    If parametertype is set to "OBJECT" then objectname is the name of the object to display object parameters for.
    objectType String
    If parametertype is set to "OBJECT" then objecttype is the type of object to display object parameters for. Valid values are any object supported by the IN clause of the SHOW PARAMETERS statement, including: WAREHOUSE | DATABASE | SCHEMA | TASK | TABLE
    parameterType String
    The type of parameter to filter by. Valid values are: "ACCOUNT", "SESSION", "OBJECT".
    pattern String
    Allows limiting the list of parameters by name using LIKE clause. Refer to Limiting the List of Parameters by Name
    user String
    If parameter_type is set to "SESSION" then user is the name of the user to display session parameters for.

    Supporting Types

    GetParametersParameter

    Default string
    The default value of the parameter
    Description string
    The description of the parameter
    Key string
    The name of the parameter
    Level string
    The level of the parameter
    Value string
    The value of the parameter
    Default string
    The default value of the parameter
    Description string
    The description of the parameter
    Key string
    The name of the parameter
    Level string
    The level of the parameter
    Value string
    The value of the parameter
    default_ String
    The default value of the parameter
    description String
    The description of the parameter
    key String
    The name of the parameter
    level String
    The level of the parameter
    value String
    The value of the parameter
    default string
    The default value of the parameter
    description string
    The description of the parameter
    key string
    The name of the parameter
    level string
    The level of the parameter
    value string
    The value of the parameter
    default str
    The default value of the parameter
    description str
    The description of the parameter
    key str
    The name of the parameter
    level str
    The level of the parameter
    value str
    The value of the parameter
    default String
    The default value of the parameter
    description String
    The description of the parameter
    key String
    The name of the parameter
    level String
    The level of the parameter
    value String
    The value of the parameter

    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