Skip to main content

role_grants_of

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

Overview

Namerole_grants_of
TypeResource
Idsnowflake.roles.role_grants_of

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
grantee_namestringThe name of the grantee
created_onstring (date-time)Date and time when the grant was created
granted_bystringThe role that granted this role to this grantee
granted_tostringThe type of the grantee, can be USER or ROLE
rolestringThe name of the role

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectname, endpointshowLimitList all grants of 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 of the role

SELECT
grantee_name,
created_on,
granted_by,
granted_to,
role
FROM snowflake.roles.role_grants_of
WHERE name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND showLimit = '{{ showLimit }}'
;