Skip to main content

role_grants_on

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

Overview

Namerole_grants_on
TypeResource
Idsnowflake.roles.role_grants_on

Fields

The following fields are returned by SELECT queries:

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
listselectname, 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 identifier (orgname-accountname) (default: orgname-accountname)
namestringIdentifier (i.e. name) for the resource.
showLimitintegerParameter 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.roles.role_grants_on
WHERE name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND showLimit = '{{ showLimit }}'
;