privileges
Creates, updates, deletes, gets or lists a privileges
resource.
Overview
Name | privileges |
Type | Resource |
Id | snowflake.grant.privileges |
Fields
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
grant_group_privilege | INSERT | bulkGrantType, granteeName, granteeType, scopeName, scopeType, securableTypePlural, endpoint | Endpoint to indicate that the privileges listed in the request body should be granted to all securables of this type in the given scope. |
grant_privilege | INSERT | granteeName, granteeType, securableName, securableType, endpoint | Endpoint to indicate that the privileges listed in the request body should be granted. |
revoke_group_privilege | DELETE | bulkGrantType, granteeName, granteeType, privilege, scopeName, scopeType, securableTypePlural, endpoint | Endpoint to indicate that the privilege listed on the group securable in the given scope should be revoked. |
revoke_privilege | DELETE | granteeName, granteeType, privilege, securableName, securableType, endpoint | Endpoint to indicate that the privilege listed in the path should be revoked. |
INSERT
example
Use the following StackQL query and manifest file to create a new privileges
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO snowflake.grant.privileges (
data__privileges,
data__grant_option,
data__created_on,
data__grantee_type,
data__grantee_name,
data__securable_type,
data__securable_name,
data__granted_by_role_type,
data__granted_by_name,
granteeName,
granteeType,
securableName,
securableType,
endpoint
)
SELECT
'{{ privileges }}',
'{{ grant_option }}',
'{{ created_on }}',
'{{ grantee_type }}',
'{{ grantee_name }}',
'{{ securable_type }}',
'{{ securable_name }}',
'{{ granted_by_role_type }}',
'{{ granted_by_name }}',
'{{ granteeName }}',
'{{ granteeType }}',
'{{ securableName }}',
'{{ securableType }}',
'{{ endpoint }}'
;
/*+ create */
INSERT INTO snowflake.grant.privileges (
granteeName,
granteeType,
securableName,
securableType,
endpoint
)
SELECT
'{{ granteeName }}',
'{{ granteeType }}',
'{{ securableName }}',
'{{ securableType }}',
'{{ endpoint }}'
;
- name: privileges
props:
- name: granteeName
value: string
- name: granteeType
value: string
- name: securableName
value: string
- name: securableType
value: string
- name: endpoint
value: string
- name: privileges
value: array
- name: grant_option
value: boolean
- name: created_on
value: string
- name: grantee_type
value: string
- name: grantee_name
value: string
- name: securable_type
value: string
- name: securable_name
value: string
- name: granted_by_role_type
value: string
- name: granted_by_name
value: string
DELETE
example
Deletes the specified privileges
resource.
/*+ delete */
DELETE FROM snowflake.grant.privileges
WHERE granteeName = '{{ granteeName }}'
AND granteeType = '{{ granteeType }}'
AND privilege = '{{ privilege }}'
AND securableName = '{{ securableName }}'
AND securableType = '{{ securableType }}'
AND endpoint = '{{ endpoint }}';