snowflake.core.grant.Grants¶
- class snowflake.core.grant.Grants(root: Root)¶
Bases:
objectThe entry point of the Snowflake Core Python APIs to manage Snowflake Grants.
Methods
- grant(grant: Grant) None¶
Grant the specified privilege(s) on the named securable to the named grantee.
- Parameters:
grant (Grant) – The
Grantobject, together with theGrant’s properties: grantee, securable, privilege; grant_option is optional.
Examples
Applying a grant to a test role:
- revoke(grant: Grant, mode: DeleteMode = DeleteMode.restrict) None¶
Revoke the specified privilege(s) on the named securable to the named grantee.
- Parameters:
grant (Grant) – The
Grantobject, together with theGrant’s properties: grantee, securable, privilege; grant_option is optional.
Examples
Revoking a Privilege from test role:
- revoke_grant_option(grant: Grant, mode: DeleteMode = DeleteMode.restrict) None¶
Revoke the grant option on the specified privilege(s) on the named securable to the named grantee.
- Parameters:
grant (Grant) – The
Grantobject, together with theGrant’s properties: grantee, securable, privilege; grant_option is optional.
Examples
Revoking grant option for a Privilege from test role: