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 (Grantee) – The role that the Grant is being applied to.

  • securable (Securable) – The Securable object.

  • privileges (Privileges) – The Privileges being granted.

  • grant_option (bool, optional) – If True, grantee can pass this privilege down. Default is None, which is equivalent to False.

Examples

Granting privileges to a test role:

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

Attributes

grant_option¶
grantee¶
privileges¶
securable¶