snowflake.core.grant.GrantΒΆ
- class snowflake.core.grant.Grant(grantee: Grantee, securable: Securable, privileges: list[Privileges] | None = None, grant_option: bool = False)ΒΆ
Bases:
objectRepresents Snowflake Grant Operation.
- Parameters:
grantee (Grantee) β The role that the
Grantis being applied to.securable (Securable) β The
Securableobject.privileges (Privileges) β The
Privilegesbeing granted.grant_option (bool, optional) β If
True, grantee can pass this privilege down. Default isNone, which is equivalent toFalse.
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], ... )
Attributes
- grant_optionΒΆ
- granteeΒΆ
- privilegesΒΆ
- securableΒΆ
Methods
- to_dict(hide_readonly_properties: bool = False) dict[str, Any]ΒΆ