Skip to main content

future_grants

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

Overview

Namefuture_grants
TypeResource
Idsnowflake.role.future_grants

Fields

NameDatatypeDescription
containing_scopeobject
created_onstringDate and time when the grant was created
grant_optionbooleanIf true, allows the recipient role to grant the privileges to other roles.
granted_bystringThe role that granted this privilege to this grantee
privilegesarrayList of privileges to be granted.
securableobject
securable_typestringType of the securable to be granted.

Methods

NameAccessible byRequired ParamsOptional ParamsDescription
list_future_grantsSELECTname, endpointshowLimitList all future grants to the role
grant_future_privilegesINSERTname, data__securable_type, endpoint-Grant future privileges to the role
revoke_future_grantsDELETEname, data__securable_type, endpointmodeRevoke future grants from the role
Optional Parameter Details
NameDescriptionTypeDefault
modeQuery parameter determines whether the revoke operation succeeds or fails for the privileges, based on the whether the privileges had been re-granted to another role. - restrict: If the privilege being revoked has been re-granted to another role, the REVOKE command fails. - cascade: If the privilege being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. If the same privilege on an object has been granted to the target role by a different grantor (parallel grant), that grant is not affected and the target role retains the privilege.string-
showLimitQuery parameter to limit the maximum number of rows returned by a command.integer-

SELECT examples

List all future grants to the role

SELECT
containing_scope,
created_on,
grant_option,
granted_by,
privileges,
securable,
securable_type
FROM snowflake.role.future_grants
WHERE name = '{{ name }}'
AND endpoint = '{{ endpoint }}';

INSERT example

Use the following StackQL query and manifest file to create a new future_grants resource.

/*+ create */
INSERT INTO snowflake.role.future_grants (
data__securable,
data__containing_scope,
data__securable_type,
data__grant_option,
data__privileges,
name,
endpoint
)
SELECT
'{{ securable }}',
'{{ containing_scope }}',
'{{ securable_type }}',
'{{ grant_option }}',
'{{ privileges }}',
'{{ name }}',
'{{ endpoint }}'
;

DELETE example

Deletes the specified future_grants resource.

/*+ delete */
DELETE FROM snowflake.role.future_grants
WHERE name = '{{ name }}'
AND data__securable_type = '{{ data__securable_type }}'
AND endpoint = '{{ endpoint }}';