!> Caution: Preview Feature This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to preview_features_enabled field in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
!> Sensitive values This resource’s function_definition and show_output.arguments_raw fields are not marked as sensitive in the provider. Ensure that no personal data, sensitive data, export-controlled data, or other regulated data is entered as metadata when using the provider. If you use one of these fields, they may be present in logs, so ensure that the provider logs are properly restricted. For more information, see Sensitive values limitations and Metadata fields in Snowflake.
Note External changes to
is_secure,return_results_behavior, andnull_input_behaviorare not currently supported. They will be handled in the following versions of the provider which may still affect this resource.
Note
COPY GRANTSandOR REPLACEare not currently supported.
Note
RETURN... [[ NOT ] NULL]is not currently supported. It will be improved in the following versions of the provider which may still affect this resource.
Note Use of return type
TABLEis currently limited. It will be improved in the following versions of the provider which may still affect this resource.
Note Snowflake is not returning full data type information for arguments which may lead to unexpected plan outputs. Diff suppression for such cases will be improved.
Note Snowflake is not returning the default values for arguments so argument’s
arg_default_valueexternal changes cannot be tracked.
Note Limit the use of special characters (
.,',/,",(,),[,],{,},) in argument names, stage ids, and secret ids. It’s best to limit to only alphanumeric and underscores. There is a lot of parsing of SHOW/DESCRIBE outputs involved and using special characters may limit the possibility to achieve the correct results.
Required warehouse This resource may require active warehouse. Please, make sure you have either set a DEFAULT_WAREHOUSE for the user, or specified a warehouse in the provider configuration.
Resource used to manage javascript function objects. For more information, check function documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
// Minimal
const minimal = new snowflake.FunctionJavascript("minimal", {
database: test.name,
schema: testSnowflakeSchema.name,
name: "my_javascript_function",
arguments: [{
argDataType: "VARIANT",
argName: "x",
}],
returnType: "VARIANT",
functionDefinition: ` if (x == 0) {
return 1;
} else {
return 2;
}
`,
});
import pulumi
import pulumi_snowflake as snowflake
# Minimal
minimal = snowflake.FunctionJavascript("minimal",
database=test["name"],
schema=test_snowflake_schema["name"],
name="my_javascript_function",
arguments=[{
"arg_data_type": "VARIANT",
"arg_name": "x",
}],
return_type="VARIANT",
function_definition=""" if (x == 0) {
return 1;
} else {
return 2;
}
""")
package main
import (
"github.com/pulumi/pulumi-snowflake/sdk/v2/go/snowflake"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Minimal
_, err := snowflake.NewFunctionJavascript(ctx, "minimal", &snowflake.FunctionJavascriptArgs{
Database: pulumi.Any(test.Name),
Schema: pulumi.Any(testSnowflakeSchema.Name),
Name: pulumi.String("my_javascript_function"),
Arguments: snowflake.FunctionJavascriptArgumentArray{
&snowflake.FunctionJavascriptArgumentArgs{
ArgDataType: pulumi.String("VARIANT"),
ArgName: pulumi.String("x"),
},
},
ReturnType: pulumi.String("VARIANT"),
FunctionDefinition: pulumi.String(` if (x == 0) {
return 1;
} else {
return 2;
}
`),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;
return await Deployment.RunAsync(() =>
{
// Minimal
var minimal = new Snowflake.FunctionJavascript("minimal", new()
{
Database = test.Name,
Schema = testSnowflakeSchema.Name,
Name = "my_javascript_function",
Arguments = new[]
{
new Snowflake.Inputs.FunctionJavascriptArgumentArgs
{
ArgDataType = "VARIANT",
ArgName = "x",
},
},
ReturnType = "VARIANT",
FunctionDefinition = @" if (x == 0) {
return 1;
} else {
return 2;
}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.FunctionJavascript;
import com.pulumi.snowflake.FunctionJavascriptArgs;
import com.pulumi.snowflake.inputs.FunctionJavascriptArgumentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Minimal
var minimal = new FunctionJavascript("minimal", FunctionJavascriptArgs.builder()
.database(test.name())
.schema(testSnowflakeSchema.name())
.name("my_javascript_function")
.arguments(FunctionJavascriptArgumentArgs.builder()
.argDataType("VARIANT")
.argName("x")
.build())
.returnType("VARIANT")
.functionDefinition("""
if (x == 0) {
return 1;
} else {
return 2;
}
""")
.build());
}
}
resources:
# Minimal
minimal:
type: snowflake:FunctionJavascript
properties:
database: ${test.name}
schema: ${testSnowflakeSchema.name}
name: my_javascript_function
arguments:
- argDataType: VARIANT
argName: x
returnType: VARIANT
functionDefinition: |2
if (x == 0) {
return 1;
} else {
return 2;
}
Note Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult identifiers guide.
Note If a field has a default value, it is shown next to the type in the schema.
Create FunctionJavascript Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FunctionJavascript(name: string, args: FunctionJavascriptArgs, opts?: CustomResourceOptions);@overload
def FunctionJavascript(resource_name: str,
args: FunctionJavascriptArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FunctionJavascript(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_definition: Optional[str] = None,
schema: Optional[str] = None,
database: Optional[str] = None,
return_type: Optional[str] = None,
log_level: Optional[str] = None,
is_secure: Optional[str] = None,
arguments: Optional[Sequence[FunctionJavascriptArgumentArgs]] = None,
metric_level: Optional[str] = None,
name: Optional[str] = None,
null_input_behavior: Optional[str] = None,
return_results_behavior: Optional[str] = None,
enable_console_output: Optional[bool] = None,
comment: Optional[str] = None,
trace_level: Optional[str] = None)func NewFunctionJavascript(ctx *Context, name string, args FunctionJavascriptArgs, opts ...ResourceOption) (*FunctionJavascript, error)public FunctionJavascript(string name, FunctionJavascriptArgs args, CustomResourceOptions? opts = null)
public FunctionJavascript(String name, FunctionJavascriptArgs args)
public FunctionJavascript(String name, FunctionJavascriptArgs args, CustomResourceOptions options)
type: snowflake:FunctionJavascript
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FunctionJavascriptArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FunctionJavascriptArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FunctionJavascriptArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FunctionJavascriptArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FunctionJavascriptArgs
- 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 functionJavascriptResource = new Snowflake.FunctionJavascript("functionJavascriptResource", new()
{
FunctionDefinition = "string",
Schema = "string",
Database = "string",
ReturnType = "string",
LogLevel = "string",
IsSecure = "string",
Arguments = new[]
{
new Snowflake.Inputs.FunctionJavascriptArgumentArgs
{
ArgDataType = "string",
ArgName = "string",
ArgDefaultValue = "string",
},
},
MetricLevel = "string",
Name = "string",
NullInputBehavior = "string",
ReturnResultsBehavior = "string",
EnableConsoleOutput = false,
Comment = "string",
TraceLevel = "string",
});
example, err := snowflake.NewFunctionJavascript(ctx, "functionJavascriptResource", &snowflake.FunctionJavascriptArgs{
FunctionDefinition: pulumi.String("string"),
Schema: pulumi.String("string"),
Database: pulumi.String("string"),
ReturnType: pulumi.String("string"),
LogLevel: pulumi.String("string"),
IsSecure: pulumi.String("string"),
Arguments: snowflake.FunctionJavascriptArgumentArray{
&snowflake.FunctionJavascriptArgumentArgs{
ArgDataType: pulumi.String("string"),
ArgName: pulumi.String("string"),
ArgDefaultValue: pulumi.String("string"),
},
},
MetricLevel: pulumi.String("string"),
Name: pulumi.String("string"),
NullInputBehavior: pulumi.String("string"),
ReturnResultsBehavior: pulumi.String("string"),
EnableConsoleOutput: pulumi.Bool(false),
Comment: pulumi.String("string"),
TraceLevel: pulumi.String("string"),
})
var functionJavascriptResource = new FunctionJavascript("functionJavascriptResource", FunctionJavascriptArgs.builder()
.functionDefinition("string")
.schema("string")
.database("string")
.returnType("string")
.logLevel("string")
.isSecure("string")
.arguments(FunctionJavascriptArgumentArgs.builder()
.argDataType("string")
.argName("string")
.argDefaultValue("string")
.build())
.metricLevel("string")
.name("string")
.nullInputBehavior("string")
.returnResultsBehavior("string")
.enableConsoleOutput(false)
.comment("string")
.traceLevel("string")
.build());
function_javascript_resource = snowflake.FunctionJavascript("functionJavascriptResource",
function_definition="string",
schema="string",
database="string",
return_type="string",
log_level="string",
is_secure="string",
arguments=[{
"arg_data_type": "string",
"arg_name": "string",
"arg_default_value": "string",
}],
metric_level="string",
name="string",
null_input_behavior="string",
return_results_behavior="string",
enable_console_output=False,
comment="string",
trace_level="string")
const functionJavascriptResource = new snowflake.FunctionJavascript("functionJavascriptResource", {
functionDefinition: "string",
schema: "string",
database: "string",
returnType: "string",
logLevel: "string",
isSecure: "string",
arguments: [{
argDataType: "string",
argName: "string",
argDefaultValue: "string",
}],
metricLevel: "string",
name: "string",
nullInputBehavior: "string",
returnResultsBehavior: "string",
enableConsoleOutput: false,
comment: "string",
traceLevel: "string",
});
type: snowflake:FunctionJavascript
properties:
arguments:
- argDataType: string
argDefaultValue: string
argName: string
comment: string
database: string
enableConsoleOutput: false
functionDefinition: string
isSecure: string
logLevel: string
metricLevel: string
name: string
nullInputBehavior: string
returnResultsBehavior: string
returnType: string
schema: string
traceLevel: string
FunctionJavascript 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 FunctionJavascript resource accepts the following input properties:
- Database string
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Function
Definition string - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - Return
Type string - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Arguments
List<Function
Javascript Argument> - List of the arguments for the function. Consult the docs for more details.
- Comment string
- (Default:
user-defined function) Specifies a comment for the function. - Enable
Console boolOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- Is
Secure string - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 string - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- Metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Null
Input stringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - Return
Results stringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - Trace
Level string - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- Database string
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Function
Definition string - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - Return
Type string - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Arguments
[]Function
Javascript Argument Args - List of the arguments for the function. Consult the docs for more details.
- Comment string
- (Default:
user-defined function) Specifies a comment for the function. - Enable
Console boolOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- Is
Secure string - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 string - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- Metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Null
Input stringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - Return
Results stringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - Trace
Level string - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- database String
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - function
Definition String - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - return
Type String - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema String
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - arguments
List<Function
Javascript Argument> - List of the arguments for the function. Consult the docs for more details.
- comment String
- (Default:
user-defined function) Specifies a comment for the function. - enable
Console BooleanOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- is
Secure String - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 String - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null
Input StringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - return
Results StringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - trace
Level String - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- database string
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - function
Definition string - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - return
Type string - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - arguments
Function
Javascript Argument[] - List of the arguments for the function. Consult the docs for more details.
- comment string
- (Default:
user-defined function) Specifies a comment for the function. - enable
Console booleanOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- is
Secure string - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 string - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null
Input stringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - return
Results stringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - trace
Level string - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- database str
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - function_
definition str - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - return_
type str - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema str
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - arguments
Sequence[Function
Javascript Argument Args] - List of the arguments for the function. Consult the docs for more details.
- comment str
- (Default:
user-defined function) Specifies a comment for the function. - enable_
console_ booloutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- is_
secure str - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null_
input_ strbehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - return_
results_ strbehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - trace_
level str - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- database String
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - function
Definition String - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - return
Type String - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema String
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - arguments List<Property Map>
- List of the arguments for the function. Consult the docs for more details.
- comment String
- (Default:
user-defined function) Specifies a comment for the function. - enable
Console BooleanOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- is
Secure String - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 String - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null
Input StringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - return
Results StringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - trace
Level 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 FunctionJavascript resource produces the following output properties:
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Function
Language string - Specifies language for the user. Used to detect external changes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Parameters
List<Function
Javascript Parameter> - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - Show
Outputs List<FunctionJavascript Show Output> - Outputs the result of
SHOW FUNCTIONfor the given function.
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Function
Language string - Specifies language for the user. Used to detect external changes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Parameters
[]Function
Javascript Parameter - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - Show
Outputs []FunctionJavascript Show Output - Outputs the result of
SHOW FUNCTIONfor the given function.
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- function
Language String - Specifies language for the user. Used to detect external changes.
- id String
- The provider-assigned unique ID for this managed resource.
- parameters
List<Function
Javascript Parameter> - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - show
Outputs List<FunctionJavascript Show Output> - Outputs the result of
SHOW FUNCTIONfor the given function.
- fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- function
Language string - Specifies language for the user. Used to detect external changes.
- id string
- The provider-assigned unique ID for this managed resource.
- parameters
Function
Javascript Parameter[] - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - show
Outputs FunctionJavascript Show Output[] - Outputs the result of
SHOW FUNCTIONfor the given function.
- fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- function_
language str - Specifies language for the user. Used to detect external changes.
- id str
- The provider-assigned unique ID for this managed resource.
- parameters
Sequence[Function
Javascript Parameter] - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - show_
outputs Sequence[FunctionJavascript Show Output] - Outputs the result of
SHOW FUNCTIONfor the given function.
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- function
Language String - Specifies language for the user. Used to detect external changes.
- id String
- The provider-assigned unique ID for this managed resource.
- parameters List<Property Map>
- Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - show
Outputs List<Property Map> - Outputs the result of
SHOW FUNCTIONfor the given function.
Look up Existing FunctionJavascript Resource
Get an existing FunctionJavascript 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?: FunctionJavascriptState, opts?: CustomResourceOptions): FunctionJavascript@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arguments: Optional[Sequence[FunctionJavascriptArgumentArgs]] = None,
comment: Optional[str] = None,
database: Optional[str] = None,
enable_console_output: Optional[bool] = None,
fully_qualified_name: Optional[str] = None,
function_definition: Optional[str] = None,
function_language: Optional[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,
parameters: Optional[Sequence[FunctionJavascriptParameterArgs]] = None,
return_results_behavior: Optional[str] = None,
return_type: Optional[str] = None,
schema: Optional[str] = None,
show_outputs: Optional[Sequence[FunctionJavascriptShowOutputArgs]] = None,
trace_level: Optional[str] = None) -> FunctionJavascriptfunc GetFunctionJavascript(ctx *Context, name string, id IDInput, state *FunctionJavascriptState, opts ...ResourceOption) (*FunctionJavascript, error)public static FunctionJavascript Get(string name, Input<string> id, FunctionJavascriptState? state, CustomResourceOptions? opts = null)public static FunctionJavascript get(String name, Output<String> id, FunctionJavascriptState state, CustomResourceOptions options)resources: _: type: snowflake:FunctionJavascript get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arguments
List<Function
Javascript Argument> - List of the arguments for the function. Consult the docs for more details.
- Comment string
- (Default:
user-defined function) Specifies a comment for the function. - Database string
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Enable
Console boolOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Function
Definition string - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - Function
Language string - Specifies language for the user. Used to detect external changes.
- Is
Secure string - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 string - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- Metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Null
Input stringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - Parameters
List<Function
Javascript Parameter> - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - Return
Results stringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - Return
Type string - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Show
Outputs List<FunctionJavascript Show Output> - Outputs the result of
SHOW FUNCTIONfor the given function. - Trace
Level string - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- Arguments
[]Function
Javascript Argument Args - List of the arguments for the function. Consult the docs for more details.
- Comment string
- (Default:
user-defined function) Specifies a comment for the function. - Database string
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Enable
Console boolOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Function
Definition string - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - Function
Language string - Specifies language for the user. Used to detect external changes.
- Is
Secure string - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 string - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- Metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Null
Input stringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - Parameters
[]Function
Javascript Parameter Args - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - Return
Results stringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - Return
Type string - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Show
Outputs []FunctionJavascript Show Output Args - Outputs the result of
SHOW FUNCTIONfor the given function. - Trace
Level string - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments
List<Function
Javascript Argument> - List of the arguments for the function. Consult the docs for more details.
- comment String
- (Default:
user-defined function) Specifies a comment for the function. - database String
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - enable
Console BooleanOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- function
Definition String - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - function
Language String - Specifies language for the user. Used to detect external changes.
- is
Secure String - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 String - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null
Input StringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - parameters
List<Function
Javascript Parameter> - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - return
Results StringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - return
Type String - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema String
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show
Outputs List<FunctionJavascript Show Output> - Outputs the result of
SHOW FUNCTIONfor the given function. - trace
Level String - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments
Function
Javascript Argument[] - List of the arguments for the function. Consult the docs for more details.
- comment string
- (Default:
user-defined function) Specifies a comment for the function. - database string
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - enable
Console booleanOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- function
Definition string - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - function
Language string - Specifies language for the user. Used to detect external changes.
- is
Secure string - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 string - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null
Input stringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - parameters
Function
Javascript Parameter[] - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - return
Results stringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - return
Type string - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show
Outputs FunctionJavascript Show Output[] - Outputs the result of
SHOW FUNCTIONfor the given function. - trace
Level string - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments
Sequence[Function
Javascript Argument Args] - List of the arguments for the function. Consult the docs for more details.
- comment str
- (Default:
user-defined function) Specifies a comment for the function. - database str
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - enable_
console_ booloutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- function_
definition str - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - function_
language str - Specifies language for the user. Used to detect external changes.
- is_
secure str - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null_
input_ strbehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - parameters
Sequence[Function
Javascript Parameter Args] - Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - return_
results_ strbehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - return_
type str - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema str
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show_
outputs Sequence[FunctionJavascript Show Output Args] - Outputs the result of
SHOW FUNCTIONfor the given function. - trace_
level str - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments List<Property Map>
- List of the arguments for the function. Consult the docs for more details.
- comment String
- (Default:
user-defined function) Specifies a comment for the function. - database String
- The database in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - enable
Console BooleanOutput - Enable stdout/stderr fast path logging for anonymous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- function
Definition String - Defines the handler code executed when the UDF is called. Wrapping
$$signs are added by the provider automatically; do not include them. Thefunction_definitionvalue must be JavaScript source code. For more information, see Introduction to JavaScript UDFs. 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. - function
Language String - Specifies language for the user. Used to detect external changes.
- is
Secure String - (Default: fallback to Snowflake default - uses special value that cannot be set in the configuration manually (
default)) Specifies that the function is secure. By design, the Snowflake'sSHOW FUNCTIONScommand does not provide information about secure functions (consult function docs and Protecting Sensitive Information with Secure UDFs and Stored Procedures) which is essential to manage/import function with Terraform. Use the role owning the function while managing secure functions. 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 String - LOG*LEVEL to use when filtering events For more information, check LOG*LEVEL docs.
- metric
Level 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 function; the identifier does not need to be unique for the schema in which the function is created because UDFs are identified and resolved by the combination of the name and argument types. Check the docs. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - null
Input StringBehavior - Specifies the behavior of the function when called with null inputs. Valid values are (case-insensitive):
CALLED ON NULL INPUT|RETURNS NULL ON NULL INPUT. - parameters List<Property Map>
- Outputs the result of
SHOW PARAMETERS IN FUNCTIONfor the given function. - return
Results StringBehavior - Specifies the behavior of the function when returning results. Valid values are (case-insensitive):
VOLATILE|IMMUTABLE. - return
Type String - Specifies the results returned by the UDF, which determines the UDF type. Use
<result_data_type>to create a scalar UDF that returns a single value with the specified data type. UseTABLE (col_name col_data_type, ...)to creates a table UDF that returns tabular results with the specified table column(s) and column type(s). For the details, consult the docs. - schema String
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show
Outputs List<Property Map> - Outputs the result of
SHOW FUNCTIONfor the given function. - trace
Level String - Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
Supporting Types
FunctionJavascriptArgument, FunctionJavascriptArgumentArgs
- Arg
Data stringType - The argument type.
- Arg
Name string - The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.
- Arg
Default stringValue - Optional default value for the argument. For text values use single quotes. Numeric values can be unquoted. External changes for this field won't be detected. In case you want to apply external changes, you can re-create the resource manually using "terraform taint".
- Arg
Data stringType - The argument type.
- Arg
Name string - The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.
- Arg
Default stringValue - Optional default value for the argument. For text values use single quotes. Numeric values can be unquoted. External changes for this field won't be detected. In case you want to apply external changes, you can re-create the resource manually using "terraform taint".
- arg
Data StringType - The argument type.
- arg
Name String - The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.
- arg
Default StringValue - Optional default value for the argument. For text values use single quotes. Numeric values can be unquoted. External changes for this field won't be detected. In case you want to apply external changes, you can re-create the resource manually using "terraform taint".
- arg
Data stringType - The argument type.
- arg
Name string - The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.
- arg
Default stringValue - Optional default value for the argument. For text values use single quotes. Numeric values can be unquoted. External changes for this field won't be detected. In case you want to apply external changes, you can re-create the resource manually using "terraform taint".
- arg_
data_ strtype - The argument type.
- arg_
name str - The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.
- arg_
default_ strvalue - Optional default value for the argument. For text values use single quotes. Numeric values can be unquoted. External changes for this field won't be detected. In case you want to apply external changes, you can re-create the resource manually using "terraform taint".
- arg
Data StringType - The argument type.
- arg
Name String - The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.
- arg
Default StringValue - Optional default value for the argument. For text values use single quotes. Numeric values can be unquoted. External changes for this field won't be detected. In case you want to apply external changes, you can re-create the resource manually using "terraform taint".
FunctionJavascriptParameter, FunctionJavascriptParameterArgs
FunctionJavascriptParameterEnableConsoleOutput, FunctionJavascriptParameterEnableConsoleOutputArgs
- 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 str
- description str
- key str
- level str
- value str
- default String
- description String
- key String
- level String
- value String
FunctionJavascriptParameterLogLevel, FunctionJavascriptParameterLogLevelArgs
- 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 str
- description str
- key str
- level str
- value str
- default String
- description String
- key String
- level String
- value String
FunctionJavascriptParameterMetricLevel, FunctionJavascriptParameterMetricLevelArgs
- 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 str
- description str
- key str
- level str
- value str
- default String
- description String
- key String
- level String
- value String
FunctionJavascriptParameterTraceLevel, FunctionJavascriptParameterTraceLevelArgs
- 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 str
- description str
- key str
- level str
- value str
- default String
- description String
- key String
- level String
- value String
FunctionJavascriptShowOutput, FunctionJavascriptShowOutputArgs
- Arguments
Raw string - Catalog
Name string - Created
On string - Description string
- External
Access stringIntegrations - Is
Aggregate bool - Is
Ansi bool - Is
Builtin bool - Is
Data boolMetric - Is
External boolFunction - Is
Memoizable bool - Is
Secure bool - Is
Table boolFunction - Language string
- Max
Num intArguments - Min
Num intArguments - Name string
- Schema
Name string - Secrets string
- Valid
For boolClustering
- Arguments
Raw string - Catalog
Name string - Created
On string - Description string
- External
Access stringIntegrations - Is
Aggregate bool - Is
Ansi bool - Is
Builtin bool - Is
Data boolMetric - Is
External boolFunction - Is
Memoizable bool - Is
Secure bool - Is
Table boolFunction - Language string
- Max
Num intArguments - Min
Num intArguments - Name string
- Schema
Name string - Secrets string
- Valid
For boolClustering
- arguments
Raw String - catalog
Name String - created
On String - description String
- external
Access StringIntegrations - is
Aggregate Boolean - is
Ansi Boolean - is
Builtin Boolean - is
Data BooleanMetric - is
External BooleanFunction - is
Memoizable Boolean - is
Secure Boolean - is
Table BooleanFunction - language String
- max
Num IntegerArguments - min
Num IntegerArguments - name String
- schema
Name String - secrets String
- valid
For BooleanClustering
- arguments
Raw string - catalog
Name string - created
On string - description string
- external
Access stringIntegrations - is
Aggregate boolean - is
Ansi boolean - is
Builtin boolean - is
Data booleanMetric - is
External booleanFunction - is
Memoizable boolean - is
Secure boolean - is
Table booleanFunction - language string
- max
Num numberArguments - min
Num numberArguments - name string
- schema
Name string - secrets string
- valid
For booleanClustering
- arguments_
raw str - catalog_
name str - created_
on str - description str
- external_
access_ strintegrations - is_
aggregate bool - is_
ansi bool - is_
builtin bool - is_
data_ boolmetric - is_
external_ boolfunction - is_
memoizable bool - is_
secure bool - is_
table_ boolfunction - language str
- max_
num_ intarguments - min_
num_ intarguments - name str
- schema_
name str - secrets str
- valid_
for_ boolclustering
- arguments
Raw String - catalog
Name String - created
On String - description String
- external
Access StringIntegrations - is
Aggregate Boolean - is
Ansi Boolean - is
Builtin Boolean - is
Data BooleanMetric - is
External BooleanFunction - is
Memoizable Boolean - is
Secure Boolean - is
Table BooleanFunction - language String
- max
Num NumberArguments - min
Num NumberArguments - name String
- schema
Name String - secrets String
- valid
For BooleanClustering
Import
terraform import snowflake_function_javascript.example '"<database_name>"."<schema_name>"."<function_name>"(varchar, varchar, varchar)'
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.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflakeTerraform Provider.
