grants
Creates, updates, deletes, gets or lists a grants
resource.
Overview
Name | grants |
Type | Resource |
Id | snowflake.service.grants |
Fields
The following fields are returned by SELECT
queries:
- list_service_role_grants_to
successful
Name | Datatype | Description |
---|---|---|
name | string | The name of the securable |
grantee_name | string | The name of the grantee |
created_on | string (date-time) | Date and time when the grant was created |
granted_on | string | The type of of the securable |
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_service_role_grants_to | select | database_name , schema_name , service , name , endpoint | List all the grants given to the service 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 |
---|---|---|
database_name | string | Identifier (i.e. name) for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases. |
endpoint | string | Organization and Account Name (default: orgid-acctid) |
name | string | Identifier (i.e. name) for the resource. |
schema_name | string | Identifier (i.e. name) for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database. |
service | string | Name of the service that contains the service role. |
SELECT
examples
- list_service_role_grants_to
List all the grants given to the service role
SELECT
name,
grantee_name,
created_on,
granted_on,
granted_to,
privilege
FROM snowflake.service.grants
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND service = '{{ service }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required;