privilege_assignments
Creates, updates, deletes, gets or lists a privilege_assignments resource.
Overview
| Name | privilege_assignments |
| Type | Resource |
| Id | databricks_workspace.catalog.privilege_assignments |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
principal_id | integer | Unique identifier of the principal. For active principals, both ``principal`` and ``principal_id`` are present. |
principal | string | |
privileges | array | The privileges assigned to the principal. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | securable_type, full_name, deployment_name | include_deleted_principals, page_size, page_token, principal | Lists the privilege assignments for a securable. Does not include 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
full_name | string | Full name of securable. |
securable_type | string | Type of securable. |
include_deleted_principals | boolean | Optional. If true, also return privilege assignments whose principals have been deleted. |
page_size | integer | Specifies the maximum number of privilege assignments to return (page length). Every PrivilegeAssignment present in a single page response is guaranteed to contain all the privileges granted on the requested Securable for the respective principal. If not set, page length is the server configured value. 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 PrivilegeAssignment 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_token | string | Opaque pagination token to go to next page based on previous query. |
principal | string | If provided, only the permissions for the specified principal (user or group) are returned. |
SELECT examples
- list
Lists the privilege assignments for a securable. Does not include inherited privileges. Paginated
SELECT
principal_id,
principal,
privileges
FROM databricks_workspace.catalog.privilege_assignments
WHERE securable_type = '{{ securable_type }}' -- required
AND full_name = '{{ full_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND include_deleted_principals = '{{ include_deleted_principals }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
AND principal = '{{ principal }}'
;