Skip to main content

grants_on

Creates, updates, deletes, gets or lists a grants_on resource.

Overview

Namegrants_on
TypeResource
Idsnowflake.role.grants_on

Fields

The following fields are returned by SELECT queries:

successful

NameDatatypeDescription
namestringThe name of the role
grantee_namestringThe name of the grantee
created_onstring (date-time)Date and time when the grant was created
grant_optionstringIf true, allows the recipient role to grant the privileges to other roles.
granted_bystringThe role that granted this privilege to this grantee
granted_by_role_typestringType of the role that granted this privilege to this grantee
granted_onstringThe type of of the role
granted_tostringThe type of the grantee
privilegestringThe name of the privilege

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_grants_onselectname, endpointshowLimitList all grants on the role

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringOrganization and Account Name (default: orgid-acctid)
namestringIdentifier (i.e. name) for the resource.
showLimitintegerQuery parameter to limit the maximum number of rows returned by a command.

SELECT examples

List all grants on the role

SELECT
name,
grantee_name,
created_on,
grant_option,
granted_by,
granted_by_role_type,
granted_on,
granted_to,
privilege
FROM snowflake.role.grants_on
WHERE name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND showLimit = '{{ showLimit }}';