snowflake.core.procedure.ProcedureΒΆ
- class snowflake.core.procedure.Procedure(*, name: Annotated[str, Strict(strict=True)], execute_as: Annotated[str, Strict(strict=True)] | None = None, is_secure: Annotated[bool, Strict(strict=True)] | None = None, arguments: List[Argument], return_type: ReturnType, language_config: FunctionLanguage, comment: Annotated[str, Strict(strict=True)] | None = None, body: Annotated[str, Strict(strict=True)], created_on: datetime | None = None, schema_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, database_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, min_num_arguments: Annotated[int, Strict(strict=True)] | None = None, max_num_arguments: Annotated[int, Strict(strict=True)] | None = None, owner: Annotated[str, Strict(strict=True)] | None = None, owner_role_type: Annotated[str, Strict(strict=True)] | None = None, is_builtin: Annotated[bool, Strict(strict=True)] | None = None)ΒΆ
Bases:
BaseModel
A model object representing the Procedure resource.
Constructs an object of type Procedure with the provided properties.
- Parameters:
name (str) β Name of the procedure
arguments (List[Argument]) β List of arguments for the function/procedure
return_type (ReturnType)
language_config (FunctionLanguage)
body (str) β Function/procedure definition
execute_as (str, optional) β What permissions should the procedure execution be called with
is_secure (bool, optional) β Specifies whether the function/procedure is secure or not
comment (str, optional) β Specifies a comment for the function/procedure
created_on (datetime, optional) β The date and time when the function/procedure was created
schema_name (str, optional) β The name of the schema in which the function/procedure exists.
database_name (str, optional) β The name of the database in which the function/procedure exists.
min_num_arguments (int, optional) β The minimum number of arguments
max_num_arguments (int, optional) β The maximum number of arguments
owner (str, optional) β Role that owns the function/procedure
owner_role_type (str, optional) β The type of role that owns the function/procedure
is_builtin (bool, optional) β If the function/procedure is built-in or not (user-defined)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
- classmethod from_json(json_str: str) Procedure ΒΆ
Create an instance of Procedure from a JSON string.
- to_dict(hide_readonly_properties: bool = False) Dict[str, Any] ΒΆ
Returns the dictionary representation of the model using alias.
- to_dict_without_readonly_properties() Dict[str, Any] ΒΆ
Return the dictionary representation of the model without readonly properties.
- to_json() str ΒΆ
Returns the JSON representation of the model using alias.
- to_str() str ΒΆ
Returns the string representation of the model using alias.