1. Packages
  2. Snowflake
  3. API Docs
  4. getParameters
Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi

snowflake.getParameters

Explore with Pulumi AI

snowflake logo
Snowflake v0.55.0 published on Friday, Jun 7, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const d = new snowflake.Database("d", {name: "TEST_DB"});
    // read all object parameters in database TEST_DB
    const p = snowflake.getParametersOutput({
        parameterType: "OBJECT",
        objectType: "DATABASE",
        objectName: d.name,
    });
    // read all account parameters with the pattern '%TIMESTAMP%'
    const p2 = snowflake.getParameters({
        parameterType: "ACCOUNT",
        pattern: "%TIMESTAMP%",
    });
    // read the exact session parameter ROWS_PER_RESULTSET
    const p3 = snowflake.getParameters({
        parameterType: "SESSION",
        pattern: "ROWS_PER_RESULTSET",
        user: "TEST_USER",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    d = snowflake.Database("d", name="TEST_DB")
    # read all object parameters in database TEST_DB
    p = snowflake.get_parameters_output(parameter_type="OBJECT",
        object_type="DATABASE",
        object_name=d.name)
    # read all account parameters with the pattern '%TIMESTAMP%'
    p2 = snowflake.get_parameters(parameter_type="ACCOUNT",
        pattern="%TIMESTAMP%")
    # read the exact session parameter ROWS_PER_RESULTSET
    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 {
    		d, err := snowflake.NewDatabase(ctx, "d", &snowflake.DatabaseArgs{
    			Name: pulumi.String("TEST_DB"),
    		})
    		if err != nil {
    			return err
    		}
    		// read all object parameters in database TEST_DB
    		_ = snowflake.GetParametersOutput(ctx, snowflake.GetParametersOutputArgs{
    			ParameterType: pulumi.String("OBJECT"),
    			ObjectType:    pulumi.String("DATABASE"),
    			ObjectName:    d.Name,
    		}, nil)
    		// read all account parameters with the pattern '%TIMESTAMP%'
    		_, err = snowflake.GetParameters(ctx, &snowflake.GetParametersArgs{
    			ParameterType: pulumi.StringRef("ACCOUNT"),
    			Pattern:       pulumi.StringRef("%TIMESTAMP%"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// read the exact session parameter ROWS_PER_RESULTSET
    		_, 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 d = new Snowflake.Database("d", new()
        {
            Name = "TEST_DB",
        });
    
        // read all object parameters in database TEST_DB
        var p = Snowflake.GetParameters.Invoke(new()
        {
            ParameterType = "OBJECT",
            ObjectType = "DATABASE",
            ObjectName = d.Name,
        });
    
        // read all account parameters with the pattern '%TIMESTAMP%'
        var p2 = Snowflake.GetParameters.Invoke(new()
        {
            ParameterType = "ACCOUNT",
            Pattern = "%TIMESTAMP%",
        });
    
        // read the exact session parameter ROWS_PER_RESULTSET
        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.DatabaseArgs;
    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 d = new Database("d", DatabaseArgs.builder()
                .name("TEST_DB")
                .build());
    
            // read all object parameters in database TEST_DB
            final var p = SnowflakeFunctions.getParameters(GetParametersArgs.builder()
                .parameterType("OBJECT")
                .objectType("DATABASE")
                .objectName(d.name())
                .build());
    
            // read all account parameters with the pattern '%TIMESTAMP%'
            final var p2 = SnowflakeFunctions.getParameters(GetParametersArgs.builder()
                .parameterType("ACCOUNT")
                .pattern("%TIMESTAMP%")
                .build());
    
            // read the exact session parameter ROWS_PER_RESULTSET
            final var p3 = SnowflakeFunctions.getParameters(GetParametersArgs.builder()
                .parameterType("SESSION")
                .pattern("ROWS_PER_RESULTSET")
                .user("TEST_USER")
                .build());
    
        }
    }
    
    resources:
      d:
        type: snowflake:Database
        properties:
          name: TEST_DB
    variables:
      # read all object parameters in database TEST_DB
      p:
        fn::invoke:
          Function: snowflake:getParameters
          Arguments:
            parameterType: OBJECT
            objectType: DATABASE
            objectName: ${d.name}
      # read all account parameters with the pattern '%TIMESTAMP%'
      p2:
        fn::invoke:
          Function: snowflake:getParameters
          Arguments:
            parameterType: ACCOUNT
            pattern: '%TIMESTAMP%'
      # read the exact session parameter ROWS_PER_RESULTSET
      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.55.0 published on Friday, Jun 7, 2024 by Pulumi