1. Packages
  2. Snowflake Provider
  3. API Docs
  4. ProcedureScala
Snowflake v1.2.0 published on Monday, Apr 14, 2025 by Pulumi

snowflake.ProcedureScala

Explore with Pulumi AI

Import

$ pulumi import snowflake:index/procedureScala:ProcedureScala example '"<database_name>"."<schema_name>"."<function_name>"(varchar, varchar, varchar)'
Copy

Note: Snowflake is not returning all information needed to populate the state correctly after import (e.g. data types with attributes like NUMBER(32, 10) are returned as NUMBER, default values for arguments are not returned at all).

Also, ALTER for functions is very limited so most of the attributes on this resource are marked as force new. Because of that, in multiple situations plan won’t be empty after importing and manual state operations may be required.

Create ProcedureScala Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ProcedureScala(name: string, args: ProcedureScalaArgs, opts?: CustomResourceOptions);
@overload
def ProcedureScala(resource_name: str,
                   args: ProcedureScalaArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ProcedureScala(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   handler: Optional[str] = None,
                   snowpark_package: Optional[str] = None,
                   database: Optional[str] = None,
                   schema: Optional[str] = None,
                   runtime_version: Optional[str] = None,
                   return_type: Optional[str] = None,
                   external_access_integrations: Optional[Sequence[str]] = None,
                   packages: Optional[Sequence[str]] = None,
                   is_secure: Optional[str] = None,
                   log_level: Optional[str] = None,
                   metric_level: Optional[str] = None,
                   name: Optional[str] = None,
                   null_input_behavior: Optional[str] = None,
                   imports: Optional[Sequence[ProcedureScalaImportArgs]] = None,
                   procedure_definition: Optional[str] = None,
                   arguments: Optional[Sequence[ProcedureScalaArgumentArgs]] = None,
                   execute_as: Optional[str] = None,
                   enable_console_output: Optional[bool] = None,
                   secrets: Optional[Sequence[ProcedureScalaSecretArgs]] = None,
                   comment: Optional[str] = None,
                   target_path: Optional[ProcedureScalaTargetPathArgs] = None,
                   trace_level: Optional[str] = None)
func NewProcedureScala(ctx *Context, name string, args ProcedureScalaArgs, opts ...ResourceOption) (*ProcedureScala, error)
public ProcedureScala(string name, ProcedureScalaArgs args, CustomResourceOptions? opts = null)
public ProcedureScala(String name, ProcedureScalaArgs args)
public ProcedureScala(String name, ProcedureScalaArgs args, CustomResourceOptions options)
type: snowflake:ProcedureScala
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProcedureScalaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProcedureScalaArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProcedureScalaArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProcedureScalaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProcedureScalaArgs
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 procedureScalaResource = new Snowflake.ProcedureScala("procedureScalaResource", new()
{
    Handler = "string",
    SnowparkPackage = "string",
    Database = "string",
    Schema = "string",
    RuntimeVersion = "string",
    ReturnType = "string",
    ExternalAccessIntegrations = new[]
    {
        "string",
    },
    Packages = new[]
    {
        "string",
    },
    IsSecure = "string",
    LogLevel = "string",
    MetricLevel = "string",
    Name = "string",
    NullInputBehavior = "string",
    Imports = new[]
    {
        new Snowflake.Inputs.ProcedureScalaImportArgs
        {
            PathOnStage = "string",
            StageLocation = "string",
        },
    },
    ProcedureDefinition = "string",
    Arguments = new[]
    {
        new Snowflake.Inputs.ProcedureScalaArgumentArgs
        {
            ArgDataType = "string",
            ArgName = "string",
            ArgDefaultValue = "string",
        },
    },
    ExecuteAs = "string",
    EnableConsoleOutput = false,
    Secrets = new[]
    {
        new Snowflake.Inputs.ProcedureScalaSecretArgs
        {
            SecretId = "string",
            SecretVariableName = "string",
        },
    },
    Comment = "string",
    TargetPath = new Snowflake.Inputs.ProcedureScalaTargetPathArgs
    {
        PathOnStage = "string",
        StageLocation = "string",
    },
    TraceLevel = "string",
});
Copy
example, err := snowflake.NewProcedureScala(ctx, "procedureScalaResource", &snowflake.ProcedureScalaArgs{
	Handler:         pulumi.String("string"),
	SnowparkPackage: pulumi.String("string"),
	Database:        pulumi.String("string"),
	Schema:          pulumi.String("string"),
	RuntimeVersion:  pulumi.String("string"),
	ReturnType:      pulumi.String("string"),
	ExternalAccessIntegrations: pulumi.StringArray{
		pulumi.String("string"),
	},
	Packages: pulumi.StringArray{
		pulumi.String("string"),
	},
	IsSecure:          pulumi.String("string"),
	LogLevel:          pulumi.String("string"),
	MetricLevel:       pulumi.String("string"),
	Name:              pulumi.String("string"),
	NullInputBehavior: pulumi.String("string"),
	Imports: snowflake.ProcedureScalaImportArray{
		&snowflake.ProcedureScalaImportArgs{
			PathOnStage:   pulumi.String("string"),
			StageLocation: pulumi.String("string"),
		},
	},
	ProcedureDefinition: pulumi.String("string"),
	Arguments: snowflake.ProcedureScalaArgumentArray{
		&snowflake.ProcedureScalaArgumentArgs{
			ArgDataType:     pulumi.String("string"),
			ArgName:         pulumi.String("string"),
			ArgDefaultValue: pulumi.String("string"),
		},
	},
	ExecuteAs:           pulumi.String("string"),
	EnableConsoleOutput: pulumi.Bool(false),
	Secrets: snowflake.ProcedureScalaSecretArray{
		&snowflake.ProcedureScalaSecretArgs{
			SecretId:           pulumi.String("string"),
			SecretVariableName: pulumi.String("string"),
		},
	},
	Comment: pulumi.String("string"),
	TargetPath: &snowflake.ProcedureScalaTargetPathArgs{
		PathOnStage:   pulumi.String("string"),
		StageLocation: pulumi.String("string"),
	},
	TraceLevel: pulumi.String("string"),
})
Copy
var procedureScalaResource = new ProcedureScala("procedureScalaResource", ProcedureScalaArgs.builder()
    .handler("string")
    .snowparkPackage("string")
    .database("string")
    .schema("string")
    .runtimeVersion("string")
    .returnType("string")
    .externalAccessIntegrations("string")
    .packages("string")
    .isSecure("string")
    .logLevel("string")
    .metricLevel("string")
    .name("string")
    .nullInputBehavior("string")
    .imports(ProcedureScalaImportArgs.builder()
        .pathOnStage("string")
        .stageLocation("string")
        .build())
    .procedureDefinition("string")
    .arguments(ProcedureScalaArgumentArgs.builder()
        .argDataType("string")
        .argName("string")
        .argDefaultValue("string")
        .build())
    .executeAs("string")
    .enableConsoleOutput(false)
    .secrets(ProcedureScalaSecretArgs.builder()
        .secretId("string")
        .secretVariableName("string")
        .build())
    .comment("string")
    .targetPath(ProcedureScalaTargetPathArgs.builder()
        .pathOnStage("string")
        .stageLocation("string")
        .build())
    .traceLevel("string")
    .build());
Copy
procedure_scala_resource = snowflake.ProcedureScala("procedureScalaResource",
    handler="string",
    snowpark_package="string",
    database="string",
    schema="string",
    runtime_version="string",
    return_type="string",
    external_access_integrations=["string"],
    packages=["string"],
    is_secure="string",
    log_level="string",
    metric_level="string",
    name="string",
    null_input_behavior="string",
    imports=[{
        "path_on_stage": "string",
        "stage_location": "string",
    }],
    procedure_definition="string",
    arguments=[{
        "arg_data_type": "string",
        "arg_name": "string",
        "arg_default_value": "string",
    }],
    execute_as="string",
    enable_console_output=False,
    secrets=[{
        "secret_id": "string",
        "secret_variable_name": "string",
    }],
    comment="string",
    target_path={
        "path_on_stage": "string",
        "stage_location": "string",
    },
    trace_level="string")
Copy
const procedureScalaResource = new snowflake.ProcedureScala("procedureScalaResource", {
    handler: "string",
    snowparkPackage: "string",
    database: "string",
    schema: "string",
    runtimeVersion: "string",
    returnType: "string",
    externalAccessIntegrations: ["string"],
    packages: ["string"],
    isSecure: "string",
    logLevel: "string",
    metricLevel: "string",
    name: "string",
    nullInputBehavior: "string",
    imports: [{
        pathOnStage: "string",
        stageLocation: "string",
    }],
    procedureDefinition: "string",
    arguments: [{
        argDataType: "string",
        argName: "string",
        argDefaultValue: "string",
    }],
    executeAs: "string",
    enableConsoleOutput: false,
    secrets: [{
        secretId: "string",
        secretVariableName: "string",
    }],
    comment: "string",
    targetPath: {
        pathOnStage: "string",
        stageLocation: "string",
    },
    traceLevel: "string",
});
Copy
type: snowflake:ProcedureScala
properties:
    arguments:
        - argDataType: string
          argDefaultValue: string
          argName: string
    comment: string
    database: string
    enableConsoleOutput: false
    executeAs: string
    externalAccessIntegrations:
        - string
    handler: string
    imports:
        - pathOnStage: string
          stageLocation: string
    isSecure: string
    logLevel: string
    metricLevel: string
    name: string
    nullInputBehavior: string
    packages:
        - string
    procedureDefinition: string
    returnType: string
    runtimeVersion: string
    schema: string
    secrets:
        - secretId: string
          secretVariableName: string
    snowparkPackage: string
    targetPath:
        pathOnStage: string
        stageLocation: string
    traceLevel: string
Copy

ProcedureScala Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ProcedureScala resource accepts the following input properties:

Database
This property is required.
Changes to this property will trigger replacement.
string
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
Handler
This property is required.
Changes to this property will trigger replacement.
string
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
ReturnType
This property is required.
Changes to this property will trigger replacement.
string
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
RuntimeVersion
This property is required.
Changes to this property will trigger replacement.
string
The language runtime version to use. Currently, the supported versions are: 2.12.
Schema
This property is required.
Changes to this property will trigger replacement.
string
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
SnowparkPackage
This property is required.
Changes to this property will trigger replacement.
string
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
Arguments Changes to this property will trigger replacement. List<ProcedureScalaArgument>
List of the arguments for the procedure. Consult the docs for more details.
Comment string
(Default: user-defined procedure) Specifies a comment for the procedure.
EnableConsoleOutput bool
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
ExecuteAs string
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
ExternalAccessIntegrations List<string>
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
Imports Changes to this property will trigger replacement. List<ProcedureScalaImport>
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
IsSecure string
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
LogLevel string
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
MetricLevel string
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
Name string
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
NullInputBehavior Changes to this property will trigger replacement. string
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
Packages Changes to this property will trigger replacement. List<string>
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
ProcedureDefinition Changes to this property will trigger replacement. string
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
Secrets List<ProcedureScalaSecret>
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
TargetPath Changes to this property will trigger replacement. ProcedureScalaTargetPath
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
TraceLevel string
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
Database
This property is required.
Changes to this property will trigger replacement.
string
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
Handler
This property is required.
Changes to this property will trigger replacement.
string
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
ReturnType
This property is required.
Changes to this property will trigger replacement.
string
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
RuntimeVersion
This property is required.
Changes to this property will trigger replacement.
string
The language runtime version to use. Currently, the supported versions are: 2.12.
Schema
This property is required.
Changes to this property will trigger replacement.
string
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
SnowparkPackage
This property is required.
Changes to this property will trigger replacement.
string
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
Arguments Changes to this property will trigger replacement. []ProcedureScalaArgumentArgs
List of the arguments for the procedure. Consult the docs for more details.
Comment string
(Default: user-defined procedure) Specifies a comment for the procedure.
EnableConsoleOutput bool
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
ExecuteAs string
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
ExternalAccessIntegrations []string
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
Imports Changes to this property will trigger replacement. []ProcedureScalaImportArgs
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
IsSecure string
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
LogLevel string
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
MetricLevel string
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
Name string
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
NullInputBehavior Changes to this property will trigger replacement. string
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
Packages Changes to this property will trigger replacement. []string
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
ProcedureDefinition Changes to this property will trigger replacement. string
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
Secrets []ProcedureScalaSecretArgs
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
TargetPath Changes to this property will trigger replacement. ProcedureScalaTargetPathArgs
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
TraceLevel string
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
database
This property is required.
Changes to this property will trigger replacement.
String
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
handler
This property is required.
Changes to this property will trigger replacement.
String
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
returnType
This property is required.
Changes to this property will trigger replacement.
String
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtimeVersion
This property is required.
Changes to this property will trigger replacement.
String
The language runtime version to use. Currently, the supported versions are: 2.12.
schema
This property is required.
Changes to this property will trigger replacement.
String
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
snowparkPackage
This property is required.
Changes to this property will trigger replacement.
String
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
arguments Changes to this property will trigger replacement. List<ProcedureScalaArgument>
List of the arguments for the procedure. Consult the docs for more details.
comment String
(Default: user-defined procedure) Specifies a comment for the procedure.
enableConsoleOutput Boolean
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
executeAs String
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
externalAccessIntegrations List<String>
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
imports Changes to this property will trigger replacement. List<ProcedureScalaImport>
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
isSecure String
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
logLevel String
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metricLevel String
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name String
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
nullInputBehavior Changes to this property will trigger replacement. String
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. List<String>
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
procedureDefinition Changes to this property will trigger replacement. String
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
secrets List<ProcedureScalaSecret>
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
targetPath Changes to this property will trigger replacement. ProcedureScalaTargetPath
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
traceLevel String
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
database
This property is required.
Changes to this property will trigger replacement.
string
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
handler
This property is required.
Changes to this property will trigger replacement.
string
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
returnType
This property is required.
Changes to this property will trigger replacement.
string
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtimeVersion
This property is required.
Changes to this property will trigger replacement.
string
The language runtime version to use. Currently, the supported versions are: 2.12.
schema
This property is required.
Changes to this property will trigger replacement.
string
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
snowparkPackage
This property is required.
Changes to this property will trigger replacement.
string
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
arguments Changes to this property will trigger replacement. ProcedureScalaArgument[]
List of the arguments for the procedure. Consult the docs for more details.
comment string
(Default: user-defined procedure) Specifies a comment for the procedure.
enableConsoleOutput boolean
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
executeAs string
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
externalAccessIntegrations string[]
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
imports Changes to this property will trigger replacement. ProcedureScalaImport[]
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
isSecure string
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
logLevel string
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metricLevel string
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name string
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
nullInputBehavior Changes to this property will trigger replacement. string
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. string[]
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
procedureDefinition Changes to this property will trigger replacement. string
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
secrets ProcedureScalaSecret[]
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
targetPath Changes to this property will trigger replacement. ProcedureScalaTargetPath
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
traceLevel string
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
database
This property is required.
Changes to this property will trigger replacement.
str
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
handler
This property is required.
Changes to this property will trigger replacement.
str
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
return_type
This property is required.
Changes to this property will trigger replacement.
str
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtime_version
This property is required.
Changes to this property will trigger replacement.
str
The language runtime version to use. Currently, the supported versions are: 2.12.
schema
This property is required.
Changes to this property will trigger replacement.
str
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
snowpark_package
This property is required.
Changes to this property will trigger replacement.
str
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
arguments Changes to this property will trigger replacement. Sequence[ProcedureScalaArgumentArgs]
List of the arguments for the procedure. Consult the docs for more details.
comment str
(Default: user-defined procedure) Specifies a comment for the procedure.
enable_console_output bool
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
execute_as str
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
external_access_integrations Sequence[str]
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
imports Changes to this property will trigger replacement. Sequence[ProcedureScalaImportArgs]
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
is_secure str
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
log_level str
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metric_level str
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name str
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
null_input_behavior Changes to this property will trigger replacement. str
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. Sequence[str]
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
procedure_definition Changes to this property will trigger replacement. str
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
secrets Sequence[ProcedureScalaSecretArgs]
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
target_path Changes to this property will trigger replacement. ProcedureScalaTargetPathArgs
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
trace_level str
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
database
This property is required.
Changes to this property will trigger replacement.
String
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
handler
This property is required.
Changes to this property will trigger replacement.
String
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
returnType
This property is required.
Changes to this property will trigger replacement.
String
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtimeVersion
This property is required.
Changes to this property will trigger replacement.
String
The language runtime version to use. Currently, the supported versions are: 2.12.
schema
This property is required.
Changes to this property will trigger replacement.
String
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
snowparkPackage
This property is required.
Changes to this property will trigger replacement.
String
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
arguments Changes to this property will trigger replacement. List<Property Map>
List of the arguments for the procedure. Consult the docs for more details.
comment String
(Default: user-defined procedure) Specifies a comment for the procedure.
enableConsoleOutput Boolean
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
executeAs String
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
externalAccessIntegrations List<String>
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
imports Changes to this property will trigger replacement. List<Property Map>
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
isSecure String
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
logLevel String
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metricLevel String
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name String
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
nullInputBehavior Changes to this property will trigger replacement. String
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. List<String>
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
procedureDefinition Changes to this property will trigger replacement. String
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
secrets List<Property Map>
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
targetPath Changes to this property will trigger replacement. Property Map
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
traceLevel String
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProcedureScala resource produces the following output properties:

FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
Id string
The provider-assigned unique ID for this managed resource.
Parameters List<ProcedureScalaParameter>
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
ProcedureLanguage string
Specifies language for the procedure. Used to detect external changes.
ShowOutputs List<ProcedureScalaShowOutput>
Outputs the result of SHOW PROCEDURE for the given procedure.
FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
Id string
The provider-assigned unique ID for this managed resource.
Parameters []ProcedureScalaParameter
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
ProcedureLanguage string
Specifies language for the procedure. Used to detect external changes.
ShowOutputs []ProcedureScalaShowOutput
Outputs the result of SHOW PROCEDURE for the given procedure.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
id String
The provider-assigned unique ID for this managed resource.
parameters List<ProcedureScalaParameter>
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedureLanguage String
Specifies language for the procedure. Used to detect external changes.
showOutputs List<ProcedureScalaShowOutput>
Outputs the result of SHOW PROCEDURE for the given procedure.
fullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
id string
The provider-assigned unique ID for this managed resource.
parameters ProcedureScalaParameter[]
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedureLanguage string
Specifies language for the procedure. Used to detect external changes.
showOutputs ProcedureScalaShowOutput[]
Outputs the result of SHOW PROCEDURE for the given procedure.
fully_qualified_name str
Fully qualified name of the resource. For more information, see object name resolution.
id str
The provider-assigned unique ID for this managed resource.
parameters Sequence[ProcedureScalaParameter]
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedure_language str
Specifies language for the procedure. Used to detect external changes.
show_outputs Sequence[ProcedureScalaShowOutput]
Outputs the result of SHOW PROCEDURE for the given procedure.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
id String
The provider-assigned unique ID for this managed resource.
parameters List<Property Map>
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedureLanguage String
Specifies language for the procedure. Used to detect external changes.
showOutputs List<Property Map>
Outputs the result of SHOW PROCEDURE for the given procedure.

Look up Existing ProcedureScala Resource

Get an existing ProcedureScala 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?: ProcedureScalaState, opts?: CustomResourceOptions): ProcedureScala
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arguments: Optional[Sequence[ProcedureScalaArgumentArgs]] = None,
        comment: Optional[str] = None,
        database: Optional[str] = None,
        enable_console_output: Optional[bool] = None,
        execute_as: Optional[str] = None,
        external_access_integrations: Optional[Sequence[str]] = None,
        fully_qualified_name: Optional[str] = None,
        handler: Optional[str] = None,
        imports: Optional[Sequence[ProcedureScalaImportArgs]] = None,
        is_secure: Optional[str] = None,
        log_level: Optional[str] = None,
        metric_level: Optional[str] = None,
        name: Optional[str] = None,
        null_input_behavior: Optional[str] = None,
        packages: Optional[Sequence[str]] = None,
        parameters: Optional[Sequence[ProcedureScalaParameterArgs]] = None,
        procedure_definition: Optional[str] = None,
        procedure_language: Optional[str] = None,
        return_type: Optional[str] = None,
        runtime_version: Optional[str] = None,
        schema: Optional[str] = None,
        secrets: Optional[Sequence[ProcedureScalaSecretArgs]] = None,
        show_outputs: Optional[Sequence[ProcedureScalaShowOutputArgs]] = None,
        snowpark_package: Optional[str] = None,
        target_path: Optional[ProcedureScalaTargetPathArgs] = None,
        trace_level: Optional[str] = None) -> ProcedureScala
func GetProcedureScala(ctx *Context, name string, id IDInput, state *ProcedureScalaState, opts ...ResourceOption) (*ProcedureScala, error)
public static ProcedureScala Get(string name, Input<string> id, ProcedureScalaState? state, CustomResourceOptions? opts = null)
public static ProcedureScala get(String name, Output<String> id, ProcedureScalaState state, CustomResourceOptions options)
resources:  _:    type: snowflake:ProcedureScala    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Arguments Changes to this property will trigger replacement. List<ProcedureScalaArgument>
List of the arguments for the procedure. Consult the docs for more details.
Comment string
(Default: user-defined procedure) Specifies a comment for the procedure.
Database Changes to this property will trigger replacement. string
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
EnableConsoleOutput bool
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
ExecuteAs string
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
ExternalAccessIntegrations List<string>
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
Handler Changes to this property will trigger replacement. string
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
Imports Changes to this property will trigger replacement. List<ProcedureScalaImport>
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
IsSecure string
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
LogLevel string
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
MetricLevel string
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
Name string
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
NullInputBehavior Changes to this property will trigger replacement. string
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
Packages Changes to this property will trigger replacement. List<string>
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
Parameters List<ProcedureScalaParameter>
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
ProcedureDefinition Changes to this property will trigger replacement. string
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
ProcedureLanguage string
Specifies language for the procedure. Used to detect external changes.
ReturnType Changes to this property will trigger replacement. string
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
RuntimeVersion Changes to this property will trigger replacement. string
The language runtime version to use. Currently, the supported versions are: 2.12.
Schema Changes to this property will trigger replacement. string
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
Secrets List<ProcedureScalaSecret>
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
ShowOutputs List<ProcedureScalaShowOutput>
Outputs the result of SHOW PROCEDURE for the given procedure.
SnowparkPackage Changes to this property will trigger replacement. string
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
TargetPath Changes to this property will trigger replacement. ProcedureScalaTargetPath
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
TraceLevel string
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
Arguments Changes to this property will trigger replacement. []ProcedureScalaArgumentArgs
List of the arguments for the procedure. Consult the docs for more details.
Comment string
(Default: user-defined procedure) Specifies a comment for the procedure.
Database Changes to this property will trigger replacement. string
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
EnableConsoleOutput bool
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
ExecuteAs string
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
ExternalAccessIntegrations []string
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
Handler Changes to this property will trigger replacement. string
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
Imports Changes to this property will trigger replacement. []ProcedureScalaImportArgs
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
IsSecure string
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
LogLevel string
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
MetricLevel string
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
Name string
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
NullInputBehavior Changes to this property will trigger replacement. string
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
Packages Changes to this property will trigger replacement. []string
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
Parameters []ProcedureScalaParameterArgs
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
ProcedureDefinition Changes to this property will trigger replacement. string
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
ProcedureLanguage string
Specifies language for the procedure. Used to detect external changes.
ReturnType Changes to this property will trigger replacement. string
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
RuntimeVersion Changes to this property will trigger replacement. string
The language runtime version to use. Currently, the supported versions are: 2.12.
Schema Changes to this property will trigger replacement. string
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
Secrets []ProcedureScalaSecretArgs
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
ShowOutputs []ProcedureScalaShowOutputArgs
Outputs the result of SHOW PROCEDURE for the given procedure.
SnowparkPackage Changes to this property will trigger replacement. string
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
TargetPath Changes to this property will trigger replacement. ProcedureScalaTargetPathArgs
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
TraceLevel string
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
arguments Changes to this property will trigger replacement. List<ProcedureScalaArgument>
List of the arguments for the procedure. Consult the docs for more details.
comment String
(Default: user-defined procedure) Specifies a comment for the procedure.
database Changes to this property will trigger replacement. String
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
enableConsoleOutput Boolean
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
executeAs String
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
externalAccessIntegrations List<String>
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
handler Changes to this property will trigger replacement. String
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
imports Changes to this property will trigger replacement. List<ProcedureScalaImport>
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
isSecure String
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
logLevel String
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metricLevel String
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name String
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
nullInputBehavior Changes to this property will trigger replacement. String
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. List<String>
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
parameters List<ProcedureScalaParameter>
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedureDefinition Changes to this property will trigger replacement. String
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
procedureLanguage String
Specifies language for the procedure. Used to detect external changes.
returnType Changes to this property will trigger replacement. String
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtimeVersion Changes to this property will trigger replacement. String
The language runtime version to use. Currently, the supported versions are: 2.12.
schema Changes to this property will trigger replacement. String
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
secrets List<ProcedureScalaSecret>
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
showOutputs List<ProcedureScalaShowOutput>
Outputs the result of SHOW PROCEDURE for the given procedure.
snowparkPackage Changes to this property will trigger replacement. String
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
targetPath Changes to this property will trigger replacement. ProcedureScalaTargetPath
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
traceLevel String
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
arguments Changes to this property will trigger replacement. ProcedureScalaArgument[]
List of the arguments for the procedure. Consult the docs for more details.
comment string
(Default: user-defined procedure) Specifies a comment for the procedure.
database Changes to this property will trigger replacement. string
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
enableConsoleOutput boolean
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
executeAs string
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
externalAccessIntegrations string[]
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
fullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
handler Changes to this property will trigger replacement. string
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
imports Changes to this property will trigger replacement. ProcedureScalaImport[]
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
isSecure string
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
logLevel string
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metricLevel string
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name string
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
nullInputBehavior Changes to this property will trigger replacement. string
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. string[]
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
parameters ProcedureScalaParameter[]
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedureDefinition Changes to this property will trigger replacement. string
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
procedureLanguage string
Specifies language for the procedure. Used to detect external changes.
returnType Changes to this property will trigger replacement. string
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtimeVersion Changes to this property will trigger replacement. string
The language runtime version to use. Currently, the supported versions are: 2.12.
schema Changes to this property will trigger replacement. string
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
secrets ProcedureScalaSecret[]
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
showOutputs ProcedureScalaShowOutput[]
Outputs the result of SHOW PROCEDURE for the given procedure.
snowparkPackage Changes to this property will trigger replacement. string
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
targetPath Changes to this property will trigger replacement. ProcedureScalaTargetPath
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
traceLevel string
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
arguments Changes to this property will trigger replacement. Sequence[ProcedureScalaArgumentArgs]
List of the arguments for the procedure. Consult the docs for more details.
comment str
(Default: user-defined procedure) Specifies a comment for the procedure.
database Changes to this property will trigger replacement. str
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
enable_console_output bool
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
execute_as str
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
external_access_integrations Sequence[str]
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
fully_qualified_name str
Fully qualified name of the resource. For more information, see object name resolution.
handler Changes to this property will trigger replacement. str
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
imports Changes to this property will trigger replacement. Sequence[ProcedureScalaImportArgs]
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
is_secure str
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
log_level str
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metric_level str
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name str
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
null_input_behavior Changes to this property will trigger replacement. str
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. Sequence[str]
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
parameters Sequence[ProcedureScalaParameterArgs]
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedure_definition Changes to this property will trigger replacement. str
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
procedure_language str
Specifies language for the procedure. Used to detect external changes.
return_type Changes to this property will trigger replacement. str
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtime_version Changes to this property will trigger replacement. str
The language runtime version to use. Currently, the supported versions are: 2.12.
schema Changes to this property will trigger replacement. str
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
secrets Sequence[ProcedureScalaSecretArgs]
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
show_outputs Sequence[ProcedureScalaShowOutputArgs]
Outputs the result of SHOW PROCEDURE for the given procedure.
snowpark_package Changes to this property will trigger replacement. str
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
target_path Changes to this property will trigger replacement. ProcedureScalaTargetPathArgs
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
trace_level str
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
arguments Changes to this property will trigger replacement. List<Property Map>
List of the arguments for the procedure. Consult the docs for more details.
comment String
(Default: user-defined procedure) Specifies a comment for the procedure.
database Changes to this property will trigger replacement. String
The database in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
enableConsoleOutput Boolean
Enable stdout/stderr fast path logging for anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
executeAs String
Specifies whether the stored procedure executes with the privileges of the owner (an “owner’s rights” stored procedure) or with the privileges of the caller (a “caller’s rights” stored procedure). If you execute the statement CREATE PROCEDURE … EXECUTE AS CALLER, then in the future the procedure will execute as a caller’s rights procedure. If you execute CREATE PROCEDURE … EXECUTE AS OWNER, then the procedure will execute as an owner’s rights procedure. For more information, see Understanding caller’s rights and owner’s rights stored procedures. Valid values are (case-insensitive): CALLER | OWNER.
externalAccessIntegrations List<String>
The names of external access integrations needed in order for this procedure’s handler code to access external networks. An external access integration specifies network rules and secrets that specify external locations and credentials (if any) allowed for use by handler code when making requests of an external network, such as an external REST API.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
handler Changes to this property will trigger replacement. String
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
imports Changes to this property will trigger replacement. List<Property Map>
The location (stage), path, and name of the file(s) to import. You must set the IMPORTS clause to include any files that your stored procedure depends on. If you are writing an in-line stored procedure, you can omit this clause, unless your code depends on classes defined outside the stored procedure or resource files. If you are writing a stored procedure with a staged handler, you must also include a path to the JAR file containing the stored procedure’s handler code. The IMPORTS definition cannot reference variables from arguments that are passed into the stored procedure. Each file in the IMPORTS clause must have a unique name, even if the files are in different subdirectories or different stages.
isSecure String
(Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (default)) Specifies that the procedure is secure. For more information about secure procedures, see Protecting Sensitive Information with Secure UDFs and Stored Procedures. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
logLevel String
LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
metricLevel String
METRIC*LEVEL value to control whether to emit metrics to Event Table For more information, check METRIC*LEVEL docs.
name String
The name of the procedure; the identifier does not need to be unique for the schema in which the procedure is created because stored procedures are identified and resolved by the combination of the name and argument types. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
nullInputBehavior Changes to this property will trigger replacement. String
Specifies the behavior of the procedure when called with null inputs. Valid values are (case-insensitive): CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT.
packages Changes to this property will trigger replacement. List<String>
List of the names of packages deployed in Snowflake that should be included in the handler code’s execution environment. The Snowpark package is required for stored procedures, but is specified in the snowpark_package attribute. For more information about Snowpark, see Snowpark API.
parameters List<Property Map>
Outputs the result of SHOW PARAMETERS IN PROCEDURE for the given procedure.
procedureDefinition Changes to this property will trigger replacement. String
Defines the code executed by the stored procedure. The definition can consist of any valid code. Wrapping $$ signs are added by the provider automatically; do not include them. The procedure_definition value must be Scala source code. For more information, see Scala (using Snowpark). To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
procedureLanguage String
Specifies language for the procedure. Used to detect external changes.
returnType Changes to this property will trigger replacement. String
Specifies the type of the result returned by the stored procedure. For <result_data_type>, use the Snowflake data type that corresponds to the type of the language that you are using (see SQL-Scala Data Type Mappings). For RETURNS TABLE ( [ col_name col_data_type [ , ... ] ] ), if you know the Snowflake data types of the columns in the returned table, specify the column names and types. Otherwise (e.g. if you are determining the column types during run time), you can omit the column names and types (i.e. TABLE ()).
runtimeVersion Changes to this property will trigger replacement. String
The language runtime version to use. Currently, the supported versions are: 2.12.
schema Changes to this property will trigger replacement. String
The schema in which to create the procedure. Due to technical limitations (read more here), avoid using the following characters: |, ., ".
secrets List<Property Map>
Assigns the names of secrets to variables so that you can use the variables to reference the secrets when retrieving information from secrets in handler code. Secrets you specify here must be allowed by the external access integration specified as a value of this CREATE FUNCTION command’s EXTERNALACCESSINTEGRATIONS parameter.
showOutputs List<Property Map>
Outputs the result of SHOW PROCEDURE for the given procedure.
snowparkPackage Changes to this property will trigger replacement. String
The Snowpark package is required for stored procedures, so it must always be present. For more information about Snowpark, see Snowpark API.
targetPath Changes to this property will trigger replacement. Property Map
Use the fully qualified name of the method or function for the stored procedure. This is typically in the following form: com.my_company.my_package.MyClass.myMethod where com.my_company.my_package corresponds to the package containing the object or class: package com.my_company.my_package;.
traceLevel String
Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.

Supporting Types

ProcedureScalaArgument
, ProcedureScalaArgumentArgs

ArgDataType This property is required. string
The argument type.
ArgName This property is required. string
The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.
ArgDefaultValue string
ArgDataType This property is required. string
The argument type.
ArgName This property is required. string
The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.
ArgDefaultValue string
argDataType This property is required. String
The argument type.
argName This property is required. String
The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.
argDefaultValue String
argDataType This property is required. string
The argument type.
argName This property is required. string
The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.
argDefaultValue string
arg_data_type This property is required. str
The argument type.
arg_name This property is required. str
The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.
arg_default_value str
argDataType This property is required. String
The argument type.
argName This property is required. String
The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.
argDefaultValue String

ProcedureScalaImport
, ProcedureScalaImportArgs

PathOnStage This property is required. string
Path for import on stage, without the leading /.
StageLocation This property is required. string
PathOnStage This property is required. string
Path for import on stage, without the leading /.
StageLocation This property is required. string
pathOnStage This property is required. String
Path for import on stage, without the leading /.
stageLocation This property is required. String
pathOnStage This property is required. string
Path for import on stage, without the leading /.
stageLocation This property is required. string
path_on_stage This property is required. str
Path for import on stage, without the leading /.
stage_location This property is required. str
pathOnStage This property is required. String
Path for import on stage, without the leading /.
stageLocation This property is required. String

ProcedureScalaParameter
, ProcedureScalaParameterArgs

ProcedureScalaParameterEnableConsoleOutput
, ProcedureScalaParameterEnableConsoleOutputArgs

Default string
Description string
Key string
Level string
Value string
Default string
Description string
Key string
Level string
Value string
default_ String
description String
key String
level String
value String
default string
description string
key string
level string
value string
default String
description String
key String
level String
value String

ProcedureScalaParameterLogLevel
, ProcedureScalaParameterLogLevelArgs

Default string
Description string
Key string
Level string
Value string
Default string
Description string
Key string
Level string
Value string
default_ String
description String
key String
level String
value String
default string
description string
key string
level string
value string
default String
description String
key String
level String
value String

ProcedureScalaParameterMetricLevel
, ProcedureScalaParameterMetricLevelArgs

Default string
Description string
Key string
Level string
Value string
Default string
Description string
Key string
Level string
Value string
default_ String
description String
key String
level String
value String
default string
description string
key string
level string
value string
default String
description String
key String
level String
value String

ProcedureScalaParameterTraceLevel
, ProcedureScalaParameterTraceLevelArgs

Default string
Description string
Key string
Level string
Value string
Default string
Description string
Key string
Level string
Value string
default_ String
description String
key String
level String
value String
default string
description string
key string
level string
value string
default String
description String
key String
level String
value String

ProcedureScalaSecret
, ProcedureScalaSecretArgs

SecretId This property is required. string
Fully qualified name of the allowed secret. You will receive an error if you specify a SECRETS value whose secret isn’t also included in an integration specified by the EXTERNALACCESSINTEGRATIONS parameter.
SecretVariableName This property is required. string
The variable that will be used in handler code when retrieving information from the secret.
SecretId This property is required. string
Fully qualified name of the allowed secret. You will receive an error if you specify a SECRETS value whose secret isn’t also included in an integration specified by the EXTERNALACCESSINTEGRATIONS parameter.
SecretVariableName This property is required. string
The variable that will be used in handler code when retrieving information from the secret.
secretId This property is required. String
Fully qualified name of the allowed secret. You will receive an error if you specify a SECRETS value whose secret isn’t also included in an integration specified by the EXTERNALACCESSINTEGRATIONS parameter.
secretVariableName This property is required. String
The variable that will be used in handler code when retrieving information from the secret.
secretId This property is required. string
Fully qualified name of the allowed secret. You will receive an error if you specify a SECRETS value whose secret isn’t also included in an integration specified by the EXTERNALACCESSINTEGRATIONS parameter.
secretVariableName This property is required. string
The variable that will be used in handler code when retrieving information from the secret.
secret_id This property is required. str
Fully qualified name of the allowed secret. You will receive an error if you specify a SECRETS value whose secret isn’t also included in an integration specified by the EXTERNALACCESSINTEGRATIONS parameter.
secret_variable_name This property is required. str
The variable that will be used in handler code when retrieving information from the secret.
secretId This property is required. String
Fully qualified name of the allowed secret. You will receive an error if you specify a SECRETS value whose secret isn’t also included in an integration specified by the EXTERNALACCESSINTEGRATIONS parameter.
secretVariableName This property is required. String
The variable that will be used in handler code when retrieving information from the secret.

ProcedureScalaShowOutput
, ProcedureScalaShowOutputArgs

ProcedureScalaTargetPath
, ProcedureScalaTargetPathArgs

PathOnStage This property is required. string
Path for import on stage, without the leading /.
StageLocation This property is required. string
PathOnStage This property is required. string
Path for import on stage, without the leading /.
StageLocation This property is required. string
pathOnStage This property is required. String
Path for import on stage, without the leading /.
stageLocation This property is required. String
pathOnStage This property is required. string
Path for import on stage, without the leading /.
stageLocation This property is required. string
path_on_stage This property is required. str
Path for import on stage, without the leading /.
stage_location This property is required. str
pathOnStage This property is required. String
Path for import on stage, without the leading /.
stageLocation This property is required. String

Package Details

Repository
Snowflake pulumi/pulumi-snowflake
License
Apache-2.0
Notes
This Pulumi package is based on the snowflake Terraform Provider.