snowflake.FunctionPython
Explore with Pulumi AI
Import
$ pulumi import snowflake:index/functionPython:FunctionPython 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.
Create FunctionPython Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FunctionPython(name: string, args: FunctionPythonArgs, opts?: CustomResourceOptions);@overload
def FunctionPython(resource_name: str,
                   args: FunctionPythonArgs,
                   opts: Optional[ResourceOptions] = None)
@overload
def FunctionPython(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   handler: Optional[str] = None,
                   schema: Optional[str] = None,
                   database: Optional[str] = None,
                   runtime_version: Optional[str] = None,
                   return_type: Optional[str] = None,
                   log_level: Optional[str] = None,
                   name: Optional[str] = None,
                   imports: Optional[Sequence[FunctionPythonImportArgs]] = None,
                   is_aggregate: Optional[str] = None,
                   is_secure: Optional[str] = None,
                   arguments: Optional[Sequence[FunctionPythonArgumentArgs]] = None,
                   metric_level: Optional[str] = None,
                   function_definition: Optional[str] = None,
                   null_input_behavior: Optional[str] = None,
                   packages: Optional[Sequence[str]] = None,
                   return_results_behavior: Optional[str] = None,
                   external_access_integrations: Optional[Sequence[str]] = None,
                   enable_console_output: Optional[bool] = None,
                   comment: Optional[str] = None,
                   secrets: Optional[Sequence[FunctionPythonSecretArgs]] = None,
                   trace_level: Optional[str] = None)func NewFunctionPython(ctx *Context, name string, args FunctionPythonArgs, opts ...ResourceOption) (*FunctionPython, error)public FunctionPython(string name, FunctionPythonArgs args, CustomResourceOptions? opts = null)
public FunctionPython(String name, FunctionPythonArgs args)
public FunctionPython(String name, FunctionPythonArgs args, CustomResourceOptions options)
type: snowflake:FunctionPython
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 FunctionPythonArgs
- 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 FunctionPythonArgs
- 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 FunctionPythonArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FunctionPythonArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FunctionPythonArgs
- 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 functionPythonResource = new Snowflake.FunctionPython("functionPythonResource", new()
{
    Handler = "string",
    Schema = "string",
    Database = "string",
    RuntimeVersion = "string",
    ReturnType = "string",
    LogLevel = "string",
    Name = "string",
    Imports = new[]
    {
        new Snowflake.Inputs.FunctionPythonImportArgs
        {
            PathOnStage = "string",
            StageLocation = "string",
        },
    },
    IsAggregate = "string",
    IsSecure = "string",
    Arguments = new[]
    {
        new Snowflake.Inputs.FunctionPythonArgumentArgs
        {
            ArgDataType = "string",
            ArgName = "string",
            ArgDefaultValue = "string",
        },
    },
    MetricLevel = "string",
    FunctionDefinition = "string",
    NullInputBehavior = "string",
    Packages = new[]
    {
        "string",
    },
    ReturnResultsBehavior = "string",
    ExternalAccessIntegrations = new[]
    {
        "string",
    },
    EnableConsoleOutput = false,
    Comment = "string",
    Secrets = new[]
    {
        new Snowflake.Inputs.FunctionPythonSecretArgs
        {
            SecretId = "string",
            SecretVariableName = "string",
        },
    },
    TraceLevel = "string",
});
example, err := snowflake.NewFunctionPython(ctx, "functionPythonResource", &snowflake.FunctionPythonArgs{
	Handler:        pulumi.String("string"),
	Schema:         pulumi.String("string"),
	Database:       pulumi.String("string"),
	RuntimeVersion: pulumi.String("string"),
	ReturnType:     pulumi.String("string"),
	LogLevel:       pulumi.String("string"),
	Name:           pulumi.String("string"),
	Imports: snowflake.FunctionPythonImportArray{
		&snowflake.FunctionPythonImportArgs{
			PathOnStage:   pulumi.String("string"),
			StageLocation: pulumi.String("string"),
		},
	},
	IsAggregate: pulumi.String("string"),
	IsSecure:    pulumi.String("string"),
	Arguments: snowflake.FunctionPythonArgumentArray{
		&snowflake.FunctionPythonArgumentArgs{
			ArgDataType:     pulumi.String("string"),
			ArgName:         pulumi.String("string"),
			ArgDefaultValue: pulumi.String("string"),
		},
	},
	MetricLevel:        pulumi.String("string"),
	FunctionDefinition: pulumi.String("string"),
	NullInputBehavior:  pulumi.String("string"),
	Packages: pulumi.StringArray{
		pulumi.String("string"),
	},
	ReturnResultsBehavior: pulumi.String("string"),
	ExternalAccessIntegrations: pulumi.StringArray{
		pulumi.String("string"),
	},
	EnableConsoleOutput: pulumi.Bool(false),
	Comment:             pulumi.String("string"),
	Secrets: snowflake.FunctionPythonSecretArray{
		&snowflake.FunctionPythonSecretArgs{
			SecretId:           pulumi.String("string"),
			SecretVariableName: pulumi.String("string"),
		},
	},
	TraceLevel: pulumi.String("string"),
})
var functionPythonResource = new FunctionPython("functionPythonResource", FunctionPythonArgs.builder()
    .handler("string")
    .schema("string")
    .database("string")
    .runtimeVersion("string")
    .returnType("string")
    .logLevel("string")
    .name("string")
    .imports(FunctionPythonImportArgs.builder()
        .pathOnStage("string")
        .stageLocation("string")
        .build())
    .isAggregate("string")
    .isSecure("string")
    .arguments(FunctionPythonArgumentArgs.builder()
        .argDataType("string")
        .argName("string")
        .argDefaultValue("string")
        .build())
    .metricLevel("string")
    .functionDefinition("string")
    .nullInputBehavior("string")
    .packages("string")
    .returnResultsBehavior("string")
    .externalAccessIntegrations("string")
    .enableConsoleOutput(false)
    .comment("string")
    .secrets(FunctionPythonSecretArgs.builder()
        .secretId("string")
        .secretVariableName("string")
        .build())
    .traceLevel("string")
    .build());
function_python_resource = snowflake.FunctionPython("functionPythonResource",
    handler="string",
    schema="string",
    database="string",
    runtime_version="string",
    return_type="string",
    log_level="string",
    name="string",
    imports=[{
        "path_on_stage": "string",
        "stage_location": "string",
    }],
    is_aggregate="string",
    is_secure="string",
    arguments=[{
        "arg_data_type": "string",
        "arg_name": "string",
        "arg_default_value": "string",
    }],
    metric_level="string",
    function_definition="string",
    null_input_behavior="string",
    packages=["string"],
    return_results_behavior="string",
    external_access_integrations=["string"],
    enable_console_output=False,
    comment="string",
    secrets=[{
        "secret_id": "string",
        "secret_variable_name": "string",
    }],
    trace_level="string")
const functionPythonResource = new snowflake.FunctionPython("functionPythonResource", {
    handler: "string",
    schema: "string",
    database: "string",
    runtimeVersion: "string",
    returnType: "string",
    logLevel: "string",
    name: "string",
    imports: [{
        pathOnStage: "string",
        stageLocation: "string",
    }],
    isAggregate: "string",
    isSecure: "string",
    arguments: [{
        argDataType: "string",
        argName: "string",
        argDefaultValue: "string",
    }],
    metricLevel: "string",
    functionDefinition: "string",
    nullInputBehavior: "string",
    packages: ["string"],
    returnResultsBehavior: "string",
    externalAccessIntegrations: ["string"],
    enableConsoleOutput: false,
    comment: "string",
    secrets: [{
        secretId: "string",
        secretVariableName: "string",
    }],
    traceLevel: "string",
});
type: snowflake:FunctionPython
properties:
    arguments:
        - argDataType: string
          argDefaultValue: string
          argName: string
    comment: string
    database: string
    enableConsoleOutput: false
    externalAccessIntegrations:
        - string
    functionDefinition: string
    handler: string
    imports:
        - pathOnStage: string
          stageLocation: string
    isAggregate: string
    isSecure: string
    logLevel: string
    metricLevel: string
    name: string
    nullInputBehavior: string
    packages:
        - string
    returnResultsBehavior: string
    returnType: string
    runtimeVersion: string
    schema: string
    secrets:
        - secretId: string
          secretVariableName: string
    traceLevel: string
FunctionPython 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 FunctionPython 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: |,.,".
- Handler string
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- ReturnType 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.
- RuntimeVersion string
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- Arguments
List<FunctionPython Argument> 
- List of the arguments for the function. Consult the docs for more details.
- Comment string
- Specifies a comment for the function.
- EnableConsole boolOutput 
- 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.
- ExternalAccess List<string>Integrations 
- The names of external access integrations needed in order for this function’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.
- FunctionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- Imports
List<FunctionPython Import> 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- IsAggregate string
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- IsSecure string
- 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 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: |,.,".
- NullInput 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.
- Packages List<string>
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- ReturnResults stringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- Secrets
List<FunctionPython Secret> 
- 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.
- TraceLevel 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: |,.,".
- Handler string
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- ReturnType 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.
- RuntimeVersion string
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- Arguments
[]FunctionPython Argument Args 
- List of the arguments for the function. Consult the docs for more details.
- Comment string
- Specifies a comment for the function.
- EnableConsole boolOutput 
- 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.
- ExternalAccess []stringIntegrations 
- The names of external access integrations needed in order for this function’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.
- FunctionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- Imports
[]FunctionPython Import Args 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- IsAggregate string
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- IsSecure string
- 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 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: |,.,".
- NullInput 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.
- Packages []string
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- ReturnResults stringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- Secrets
[]FunctionPython Secret Args 
- 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.
- TraceLevel 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: |,.,".
- handler String
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- returnType 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.
- runtimeVersion String
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema String
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- arguments
List<FunctionPython Argument> 
- List of the arguments for the function. Consult the docs for more details.
- comment String
- Specifies a comment for the function.
- enableConsole BooleanOutput 
- 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.
- externalAccess List<String>Integrations 
- The names of external access integrations needed in order for this function’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.
- functionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- imports
List<FunctionPython Import> 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- isAggregate String
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- isSecure String
- 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 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: |,.,".
- nullInput 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.
- packages List<String>
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- returnResults StringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- secrets
List<FunctionPython Secret> 
- 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.
- traceLevel 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: |,.,".
- handler string
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- returnType 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.
- runtimeVersion string
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- arguments
FunctionPython Argument[] 
- List of the arguments for the function. Consult the docs for more details.
- comment string
- Specifies a comment for the function.
- enableConsole booleanOutput 
- 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.
- externalAccess string[]Integrations 
- The names of external access integrations needed in order for this function’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.
- functionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- imports
FunctionPython Import[] 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- isAggregate string
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- isSecure string
- 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 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: |,.,".
- nullInput 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.
- packages string[]
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- returnResults stringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- secrets
FunctionPython Secret[] 
- 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.
- traceLevel 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: |,.,".
- handler str
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- 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.
- runtime_version str
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema str
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- arguments
Sequence[FunctionPython Argument Args] 
- List of the arguments for the function. Consult the docs for more details.
- comment str
- Specifies a comment for the function.
- enable_console_ booloutput 
- 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.
- external_access_ Sequence[str]integrations 
- The names of external access integrations needed in order for this function’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.
- 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 Python source code. For more information, see Introduction to Python 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.
- imports
Sequence[FunctionPython Import Args] 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- is_aggregate str
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- is_secure str
- 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.
- packages Sequence[str]
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- return_results_ strbehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- secrets
Sequence[FunctionPython Secret Args] 
- 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.
- 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: |,.,".
- handler String
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- returnType 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.
- runtimeVersion String
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- 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
- Specifies a comment for the function.
- enableConsole BooleanOutput 
- 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.
- externalAccess List<String>Integrations 
- The names of external access integrations needed in order for this function’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.
- functionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- imports List<Property Map>
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- isAggregate String
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- isSecure String
- 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 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: |,.,".
- nullInput 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.
- packages List<String>
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- returnResults StringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- 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.
- 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 FunctionPython resource produces the following output properties:
- FullyQualified stringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- FunctionLanguage string
- Specifies language for the user. Used to detect external changes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Parameters
List<FunctionPython Parameter> 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- ShowOutputs List<FunctionPython Show Output> 
- Outputs the result of SHOW FUNCTIONfor the given function.
- FullyQualified stringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- FunctionLanguage string
- Specifies language for the user. Used to detect external changes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Parameters
[]FunctionPython Parameter 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- ShowOutputs []FunctionPython Show Output 
- Outputs the result of SHOW FUNCTIONfor the given function.
- fullyQualified StringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- functionLanguage String
- Specifies language for the user. Used to detect external changes.
- id String
- The provider-assigned unique ID for this managed resource.
- parameters
List<FunctionPython Parameter> 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- showOutputs List<FunctionPython Show Output> 
- Outputs the result of SHOW FUNCTIONfor the given function.
- fullyQualified stringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- functionLanguage string
- Specifies language for the user. Used to detect external changes.
- id string
- The provider-assigned unique ID for this managed resource.
- parameters
FunctionPython Parameter[] 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- showOutputs FunctionPython 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[FunctionPython Parameter] 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- show_outputs Sequence[FunctionPython Show Output] 
- Outputs the result of SHOW FUNCTIONfor the given function.
- fullyQualified StringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- functionLanguage 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.
- showOutputs List<Property Map>
- Outputs the result of SHOW FUNCTIONfor the given function.
Look up Existing FunctionPython Resource
Get an existing FunctionPython 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?: FunctionPythonState, opts?: CustomResourceOptions): FunctionPython@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arguments: Optional[Sequence[FunctionPythonArgumentArgs]] = None,
        comment: Optional[str] = None,
        database: Optional[str] = None,
        enable_console_output: Optional[bool] = None,
        external_access_integrations: Optional[Sequence[str]] = None,
        fully_qualified_name: Optional[str] = None,
        function_definition: Optional[str] = None,
        function_language: Optional[str] = None,
        handler: Optional[str] = None,
        imports: Optional[Sequence[FunctionPythonImportArgs]] = None,
        is_aggregate: 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,
        packages: Optional[Sequence[str]] = None,
        parameters: Optional[Sequence[FunctionPythonParameterArgs]] = None,
        return_results_behavior: Optional[str] = None,
        return_type: Optional[str] = None,
        runtime_version: Optional[str] = None,
        schema: Optional[str] = None,
        secrets: Optional[Sequence[FunctionPythonSecretArgs]] = None,
        show_outputs: Optional[Sequence[FunctionPythonShowOutputArgs]] = None,
        trace_level: Optional[str] = None) -> FunctionPythonfunc GetFunctionPython(ctx *Context, name string, id IDInput, state *FunctionPythonState, opts ...ResourceOption) (*FunctionPython, error)public static FunctionPython Get(string name, Input<string> id, FunctionPythonState? state, CustomResourceOptions? opts = null)public static FunctionPython get(String name, Output<String> id, FunctionPythonState state, CustomResourceOptions options)resources:  _:    type: snowflake:FunctionPython    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<FunctionPython Argument> 
- List of the arguments for the function. Consult the docs for more details.
- Comment string
- 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: |,.,".
- EnableConsole boolOutput 
- 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.
- ExternalAccess List<string>Integrations 
- The names of external access integrations needed in order for this function’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.
- FullyQualified stringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- FunctionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- FunctionLanguage string
- Specifies language for the user. Used to detect external changes.
- Handler string
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- Imports
List<FunctionPython Import> 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- IsAggregate string
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- IsSecure string
- 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 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: |,.,".
- NullInput 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.
- Packages List<string>
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- Parameters
List<FunctionPython Parameter> 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- ReturnResults stringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- ReturnType 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.
- RuntimeVersion string
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- Secrets
List<FunctionPython Secret> 
- 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<FunctionPython Show Output> 
- Outputs the result of SHOW FUNCTIONfor the given function.
- TraceLevel string
- Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- Arguments
[]FunctionPython Argument Args 
- List of the arguments for the function. Consult the docs for more details.
- Comment string
- 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: |,.,".
- EnableConsole boolOutput 
- 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.
- ExternalAccess []stringIntegrations 
- The names of external access integrations needed in order for this function’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.
- FullyQualified stringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- FunctionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- FunctionLanguage string
- Specifies language for the user. Used to detect external changes.
- Handler string
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- Imports
[]FunctionPython Import Args 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- IsAggregate string
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- IsSecure string
- 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 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: |,.,".
- NullInput 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.
- Packages []string
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- Parameters
[]FunctionPython Parameter Args 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- ReturnResults stringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- ReturnType 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.
- RuntimeVersion string
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- Schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- Secrets
[]FunctionPython Secret Args 
- 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 []FunctionPython Show Output Args 
- Outputs the result of SHOW FUNCTIONfor the given function.
- TraceLevel string
- Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments
List<FunctionPython Argument> 
- List of the arguments for the function. Consult the docs for more details.
- comment String
- 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: |,.,".
- enableConsole BooleanOutput 
- 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.
- externalAccess List<String>Integrations 
- The names of external access integrations needed in order for this function’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.
- fullyQualified StringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- functionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- functionLanguage String
- Specifies language for the user. Used to detect external changes.
- handler String
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- imports
List<FunctionPython Import> 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- isAggregate String
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- isSecure String
- 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 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: |,.,".
- nullInput 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.
- packages List<String>
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- parameters
List<FunctionPython Parameter> 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- returnResults StringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- returnType 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.
- runtimeVersion String
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema String
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- secrets
List<FunctionPython Secret> 
- 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<FunctionPython Show Output> 
- Outputs the result of SHOW FUNCTIONfor the given function.
- traceLevel String
- Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments
FunctionPython Argument[] 
- List of the arguments for the function. Consult the docs for more details.
- comment string
- 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: |,.,".
- enableConsole booleanOutput 
- 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.
- externalAccess string[]Integrations 
- The names of external access integrations needed in order for this function’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.
- fullyQualified stringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- functionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- functionLanguage string
- Specifies language for the user. Used to detect external changes.
- handler string
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- imports
FunctionPython Import[] 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- isAggregate string
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- isSecure string
- 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 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: |,.,".
- nullInput 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.
- packages string[]
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- parameters
FunctionPython Parameter[] 
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- returnResults stringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- returnType 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.
- runtimeVersion string
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema string
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- secrets
FunctionPython Secret[] 
- 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 FunctionPython Show Output[] 
- Outputs the result of SHOW FUNCTIONfor the given function.
- traceLevel string
- Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
- arguments
Sequence[FunctionPython Argument Args] 
- List of the arguments for the function. Consult the docs for more details.
- comment str
- 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 anonyous stored procs. This is a public parameter (similar to LOGLEVEL). For more information, check CONSOLE_OUTPUT docsENABLE.
- external_access_ Sequence[str]integrations 
- The names of external access integrations needed in order for this function’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_ 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 Python source code. For more information, see Introduction to Python 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.
- handler str
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- imports
Sequence[FunctionPython Import Args] 
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- is_aggregate str
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- is_secure str
- 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.
- packages Sequence[str]
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- parameters
Sequence[FunctionPython 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.
- runtime_version str
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema str
- The schema in which to create the function. Due to technical limitations (read more here), avoid using the following characters: |,.,".
- secrets
Sequence[FunctionPython Secret Args] 
- 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[FunctionPython 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
- 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: |,.,".
- enableConsole BooleanOutput 
- 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.
- externalAccess List<String>Integrations 
- The names of external access integrations needed in order for this function’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.
- fullyQualified StringName 
- Fully qualified name of the resource. For more information, see object name resolution.
- functionDefinition 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 Python source code. For more information, see Introduction to Python 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.
- functionLanguage String
- Specifies language for the user. Used to detect external changes.
- handler String
- The name of the handler function or class. If the handler is for a scalar UDF, returning a non-tabular value, the HANDLER value should be a function name. If the handler code is in-line with the CREATE FUNCTION statement, you can use the function name alone. When the handler code is referenced at a stage, this value should be qualified with the module name, as in the following form: my_module.my_function. If the handler is for a tabular UDF, the HANDLER value should be the name of a handler class.
- imports List<Property Map>
- The location (stage), path, and name of the file(s) to import. A file can be a .pyfile or another type of file. Python UDFs can also read non-Python files, such as text files. For an example, see Reading a file. Consult the docs.
- isAggregate String
- Specifies that the function is an aggregate function. For more information about user-defined aggregate functions, see Python user-defined aggregate 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.
- isSecure String
- 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 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: |,.,".
- nullInput 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.
- packages List<String>
- The name and version number of packages required as dependencies. The value should be of the form package_name==version_number.
- parameters List<Property Map>
- Outputs the result of SHOW PARAMETERS IN FUNCTIONfor the given function.
- returnResults StringBehavior 
- Specifies the behavior of the function when returning results. Valid values are (case-insensitive): VOLATILE|IMMUTABLE.
- returnType 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.
- runtimeVersion String
- Specifies the Python version to use. The supported versions of Python are: 3.9, 3.10, and 3.11.
- schema String
- The schema in which to create the function. 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 FUNCTIONfor the given function.
- traceLevel String
- Trace level value to use when generating/filtering trace events For more information, check TRACE_LEVEL docs.
Supporting Types
FunctionPythonArgument, FunctionPythonArgumentArgs      
- ArgData stringType 
- The argument type.
- ArgName 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.
- ArgDefault stringValue 
- ArgData stringType 
- The argument type.
- ArgName 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.
- ArgDefault stringValue 
- argData StringType 
- The argument type.
- argName 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.
- argDefault StringValue 
- argData stringType 
- The argument type.
- argName 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.
- argDefault stringValue 
- 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 
- argData StringType 
- The argument type.
- argName 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.
- argDefault StringValue 
FunctionPythonImport, FunctionPythonImportArgs      
- PathOn stringStage 
- Path for import on stage, without the leading /.
- StageLocation string
- PathOn stringStage 
- Path for import on stage, without the leading /.
- StageLocation string
- pathOn StringStage 
- Path for import on stage, without the leading /.
- stageLocation String
- pathOn stringStage 
- Path for import on stage, without the leading /.
- stageLocation string
- path_on_ strstage 
- Path for import on stage, without the leading /.
- stage_location str
- pathOn StringStage 
- Path for import on stage, without the leading /.
- stageLocation String
FunctionPythonParameter, FunctionPythonParameterArgs      
FunctionPythonParameterEnableConsoleOutput, FunctionPythonParameterEnableConsoleOutputArgs            
- 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
FunctionPythonParameterLogLevel, FunctionPythonParameterLogLevelArgs          
- 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
FunctionPythonParameterMetricLevel, FunctionPythonParameterMetricLevelArgs          
- 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
FunctionPythonParameterTraceLevel, FunctionPythonParameterTraceLevelArgs          
- 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
FunctionPythonSecret, FunctionPythonSecretArgs      
- SecretId 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.
- SecretVariable stringName 
- The variable that will be used in handler code when retrieving information from the secret.
- SecretId 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.
- SecretVariable stringName 
- The variable that will be used in handler code when retrieving information from the secret.
- secretId 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.
- secretVariable StringName 
- The variable that will be used in handler code when retrieving information from the secret.
- secretId 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.
- secretVariable stringName 
- The variable that will be used in handler code when retrieving information from the secret.
- secret_id 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_ strname 
- The variable that will be used in handler code when retrieving information from the secret.
- secretId 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.
- secretVariable StringName 
- The variable that will be used in handler code when retrieving information from the secret.
FunctionPythonShowOutput, FunctionPythonShowOutputArgs        
- ArgumentsRaw string
- CatalogName string
- CreatedOn string
- Description string
- ExternalAccess stringIntegrations 
- IsAggregate bool
- IsAnsi bool
- IsBuiltin bool
- IsData boolMetric 
- IsExternal boolFunction 
- IsMemoizable bool
- IsSecure bool
- IsTable boolFunction 
- Language string
- MaxNum intArguments 
- MinNum intArguments 
- Name string
- SchemaName string
- Secrets string
- ValidFor boolClustering 
- ArgumentsRaw string
- CatalogName string
- CreatedOn string
- Description string
- ExternalAccess stringIntegrations 
- IsAggregate bool
- IsAnsi bool
- IsBuiltin bool
- IsData boolMetric 
- IsExternal boolFunction 
- IsMemoizable bool
- IsSecure bool
- IsTable boolFunction 
- Language string
- MaxNum intArguments 
- MinNum intArguments 
- Name string
- SchemaName string
- Secrets string
- ValidFor boolClustering 
- argumentsRaw String
- catalogName String
- createdOn String
- description String
- externalAccess StringIntegrations 
- isAggregate Boolean
- isAnsi Boolean
- isBuiltin Boolean
- isData BooleanMetric 
- isExternal BooleanFunction 
- isMemoizable Boolean
- isSecure Boolean
- isTable BooleanFunction 
- language String
- maxNum IntegerArguments 
- minNum IntegerArguments 
- name String
- schemaName String
- secrets String
- validFor BooleanClustering 
- argumentsRaw string
- catalogName string
- createdOn string
- description string
- externalAccess stringIntegrations 
- isAggregate boolean
- isAnsi boolean
- isBuiltin boolean
- isData booleanMetric 
- isExternal booleanFunction 
- isMemoizable boolean
- isSecure boolean
- isTable booleanFunction 
- language string
- maxNum numberArguments 
- minNum numberArguments 
- name string
- schemaName string
- secrets string
- validFor 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 
- argumentsRaw String
- catalogName String
- createdOn String
- description String
- externalAccess StringIntegrations 
- isAggregate Boolean
- isAnsi Boolean
- isBuiltin Boolean
- isData BooleanMetric 
- isExternal BooleanFunction 
- isMemoizable Boolean
- isSecure Boolean
- isTable BooleanFunction 
- language String
- maxNum NumberArguments 
- minNum NumberArguments 
- name String
- schemaName String
- secrets String
- validFor BooleanClustering 
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the snowflakeTerraform Provider.