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_dict(obj: dict) → Procedure¶

Create an instance of Procedure from a dict.

classmethod from_json(json_str: str) → Procedure¶

Create an instance of Procedure from a JSON string.

to_dict()¶

Returns the dictionary representation of the model using alias.

to_json() → str¶

Returns the JSON representation of the model using alias.

to_str() → str¶

Returns the string representation of the model using alias.