Skip to main content

effective_privilege_assignments

Creates, updates, deletes, gets or lists an effective_privilege_assignments resource.

Overview

Nameeffective_privilege_assignments
TypeResource
Iddatabricks_workspace.catalog.effective_privilege_assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
principalstring
privilegesarrayThe privileges conveyed to the principal (either directly or via inheritance).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsecurable_type, full_name, deployment_namepage_size, page_token, principalLists the effective privilege assignments for a securable. Includes inherited privileges. Paginated

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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
full_namestringFull name of securable.
securable_typestringType of securable.
page_sizeintegerSpecifies the maximum number of privilege assignments to return (page length). Every EffectivePrivilegeAssignment present in a single page response is guaranteed to contain all the effective privileges granted on (or inherited by) the requested Securable for the respective principal. If not set, a server-configured default is used. If set to - lesser than 0: invalid parameter error - 0: page length is set to a server configured value - lesser than 150 but greater than 0: invalid parameter error (this is to ensure that server is able to return at least one complete EffectivePrivilegeAssignment in a single page response) - greater than (or equal to) 150: page length is the minimum of this value and a server configured value
page_tokenstringOpaque pagination token to go to next page based on previous query.
principalstringIf provided, only the effective permissions for the specified principal (user or group) are returned.

SELECT examples

Lists the effective privilege assignments for a securable. Includes inherited privileges. Paginated

SELECT
principal,
privileges
FROM databricks_workspace.catalog.effective_privilege_assignments
WHERE securable_type = '{{ securable_type }}' -- required
AND full_name = '{{ full_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
AND principal = '{{ principal }}'
;