Skip to main content

grants_of

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

Overview

Namegrants_of
TypeResource
Idsnowflake.role.grants_of

Fields

The following fields are returned by SELECT queries:

successful

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
list_grants_ofselectname, 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 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 of the role

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