grants_on
Creates, updates, deletes, gets or lists a grants_on
resource.
Overview
Name | grants_on |
Type | Resource |
Id | snowflake.role.grants_on |
Fields
The following fields are returned by SELECT
queries:
- list_grants_on
successful
Name | Datatype | Description |
---|---|---|
name | string | The name of the role |
grantee_name | string | The name of the grantee |
created_on | string (date-time) | Date and time when the grant was created |
grant_option | string | If true, allows the recipient role to grant the privileges to other roles. |
granted_by | string | The role that granted this privilege to this grantee |
granted_by_role_type | string | Type of the role that granted this privilege to this grantee |
granted_on | string | The type of of the role |
granted_to | string | The type of the grantee |
privilege | string | The name of the privilege |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_grants_on | select | name , endpoint | showLimit | List 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.
Name | Datatype | Description |
---|---|---|
endpoint | string | Organization and Account Name (default: orgid-acctid) |
name | string | Identifier (i.e. name) for the resource. |
showLimit | integer | Query parameter to limit the maximum number of rows returned by a command. |
SELECT
examples
- list_grants_on
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 }}';