grant_options
Creates, updates, deletes, gets or lists a grant_options resource.
Overview
| Name | grant_options |
| Type | Resource |
| Id | snowflake.grant.grant_options |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
revoke_privilege_grant_option | delete | granteeType, granteeName, securableType, securableName, privilege, endpoint | deleteMode | Endpoint to indicate that the grant option for the privilege listed in the path should be revoked. |
revoke_group_privilege_grant_option | delete | granteeType, granteeName, bulkGrantType, securableTypePlural, scopeType, scopeName, privilege, endpoint | deleteMode | Endpoint to indicate that the grant option for the privilege listed on the group securable in the given scope should be revoked. |
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 |
|---|---|---|
bulkGrantType | string | String that species whether this group privilege should be on ALL or FUTURE resources of the specified plural type |
endpoint | string | Organization and Account Name (default: orgid-acctid) |
granteeName | string | String that specifies the name of the privilege grantee. |
granteeType | string | String that specifies the type of resource that is the privilege grantee. |
privilege | string | String that specifies a privilege to be revoked |
scopeName | string | String that specifies the name of resource that is the scope of an ALL/FUTURE privilege |
scopeType | string | String that specifies the type of resource that is the scope of an ALL/FUTURE privilege. Can only be DATABASE or SCHEMA |
securableName | string | String that specifies the name of resource that is being secured by a privilege. |
securableType | string | String that specifies the type of resource that is being secured by a privilege. |
securableTypePlural | string | String that specifies the plural of the type of resource that is being secured by an ALL/FUTURE privilege. Must be either "schemas" or any plural object type that can nest under a schema such as "tables" |
deleteMode | string | If "cascade", recursively revoke the grant from sub-grantees to which this privilege was re-granted. Acceptable values are "restrict" or "cascade". |
DELETE examples
- revoke_privilege_grant_option
- revoke_group_privilege_grant_option
Endpoint to indicate that the grant option for the privilege listed in the path should be revoked.
DELETE FROM snowflake.grant.grant_options
WHERE granteeType = '{{ granteeType }}' --required
AND granteeName = '{{ granteeName }}' --required
AND securableType = '{{ securableType }}' --required
AND securableName = '{{ securableName }}' --required
AND privilege = '{{ privilege }}' --required
AND endpoint = '{{ endpoint }}' --required
AND deleteMode = '{{ deleteMode }}'
;
Endpoint to indicate that the grant option for the privilege listed on the group securable in the given scope should be revoked.
DELETE FROM snowflake.grant.grant_options
WHERE granteeType = '{{ granteeType }}' --required
AND granteeName = '{{ granteeName }}' --required
AND bulkGrantType = '{{ bulkGrantType }}' --required
AND securableTypePlural = '{{ securableTypePlural }}' --required
AND scopeType = '{{ scopeType }}' --required
AND scopeName = '{{ scopeName }}' --required
AND privilege = '{{ privilege }}' --required
AND endpoint = '{{ endpoint }}' --required
AND deleteMode = '{{ deleteMode }}'
;