snowflake.core.grant.Grant

class snowflake.core.grant.Grant(grantee: Grantee, securable: Securable, privileges: List[Privileges] | None = None, grant_option: bool = False)

Bases: object

Represents Snowflake Grant Operation.

Parameters:
  • grantee – An instance of Grantee class.

  • securable – An instance of Securable instance

  • privileges – Acceptable Privileges value

  • grant_option – Boolean If true, grantee can pass this privilege down.

Example

>>> from snowflake.core.grant._grantee import Grantees
>>> from snowflake.core.grant._privileges import Privileges
>>> from snowflake.core.grant._securables import Securables
>>>
>>> Grant(grantee=Grantees.role(name="test_role",
>>>    securable=Securables.current_account,
>>>    privileges=[Privileges.create_database])
Copy

Attributes

grant_option
grantee
privileges
securable

Methods

__init__(grantee: Grantee, securable: Securable, privileges: List[Privileges] | None = None, grant_option: bool = False)