workspace_assignment_details
Creates, updates, deletes, gets or lists a workspace_assignment_details resource.
Overview
| Name | workspace_assignment_details |
| Type | Resource |
| Id | databricks_workspace.iamv2.workspace_assignment_details |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account ID parent of the workspace where the principal is assigned |
principal_id | integer | The internal ID of the principal (user/sp/group) in Databricks. |
workspace_id | integer | The workspace ID where the principal is assigned |
effective_entitlements | array | The principal's full effective entitlements granted in this workspace: every entitlement it holds whether granted directly or via group membership. Populated on Get; empty on List. |
entitlements | array | Entitlements granted directly to the principal on this workspace. The only client-settable field: create and update manage exactly this set (including entitlements the principal also holds via a group). Not populated by ListWorkspaceAssignmentDetails (omitted for scalability); call GetWorkspaceAssignmentDetail to read the entitlements for a single principal. |
principal_type | string | The type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER) |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account ID parent of the workspace where the principal is assigned |
principal_id | integer | The internal ID of the principal (user/sp/group) in Databricks. |
workspace_id | integer | The workspace ID where the principal is assigned |
effective_entitlements | array | The principal's full effective entitlements granted in this workspace: every entitlement it holds whether granted directly or via group membership. Populated on Get; empty on List. |
entitlements | array | Entitlements granted directly to the principal on this workspace. The only client-settable field: create and update manage exactly this set (including entitlements the principal also holds via a group). Not populated by ListWorkspaceAssignmentDetails (omitted for scalability); call GetWorkspaceAssignmentDetail to read the entitlements for a single principal. |
principal_type | string | The type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | principal_id, deployment_name | Returns the assignment details for a principal in a workspace (workspace-level proxy). | |
list | select | deployment_name | page_size, page_token | Lists workspace assignment details for a workspace (workspace-level proxy). For scalability, the |
create | insert | deployment_name, workspace_assignment_detail | Creates a workspace assignment detail for a principal (workspace-level proxy). Entitlement grants are | |
update | update | principal_id, update_mask, deployment_name, workspace_assignment_detail | Updates the entitlements of a directly assigned principal in a workspace (workspace-level proxy). | |
delete | delete | principal_id, deployment_name | Deletes a workspace assignment detail for a principal (workspace-level proxy), revoking all associated |
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) |
principal_id | integer | Required. ID of the principal in Databricks to delete workspace assignment for. |
update_mask | object | Required. The list of fields to update. |
page_size | integer | The maximum number of workspace assignment details to return. The service may return fewer than this value. |
page_token | string | A page token, received from a previous ListWorkspaceAssignmentDetailsProxy call. Provide this to retrieve the subsequent page. |
SELECT examples
- get
- list
Returns the assignment details for a principal in a workspace (workspace-level proxy).
SELECT
account_id,
principal_id,
workspace_id,
effective_entitlements,
entitlements,
principal_type
FROM databricks_workspace.iamv2.workspace_assignment_details
WHERE principal_id = '{{ principal_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Lists workspace assignment details for a workspace (workspace-level proxy). For scalability, the
SELECT
account_id,
principal_id,
workspace_id,
effective_entitlements,
entitlements,
principal_type
FROM databricks_workspace.iamv2.workspace_assignment_details
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Creates a workspace assignment detail for a principal (workspace-level proxy). Entitlement grants are
INSERT INTO databricks_workspace.iamv2.workspace_assignment_details (
workspace_assignment_detail,
deployment_name
)
SELECT
'{{ workspace_assignment_detail }}' /* required */,
'{{ deployment_name }}'
RETURNING
account_id,
principal_id,
workspace_id,
effective_entitlements,
entitlements,
principal_type
;
# Description fields are for documentation purposes
- name: workspace_assignment_details
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the workspace_assignment_details resource.
- name: workspace_assignment_detail
description: |
Required. Workspace assignment detail to be created in <Databricks>.
value:
principal_id: {{ principal_id }}
account_id: "{{ account_id }}"
effective_entitlements:
- "{{ effective_entitlements }}"
entitlements:
- "{{ entitlements }}"
principal_type: "{{ principal_type }}"
workspace_id: {{ workspace_id }}
UPDATE examples
- update
Updates the entitlements of a directly assigned principal in a workspace (workspace-level proxy).
UPDATE databricks_workspace.iamv2.workspace_assignment_details
SET
workspace_assignment_detail = '{{ workspace_assignment_detail }}'
WHERE
principal_id = '{{ principal_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_assignment_detail = '{{ workspace_assignment_detail }}' --required
RETURNING
account_id,
principal_id,
workspace_id,
effective_entitlements,
entitlements,
principal_type;
DELETE examples
- delete
Deletes a workspace assignment detail for a principal (workspace-level proxy), revoking all associated
DELETE FROM databricks_workspace.iamv2.workspace_assignment_details
WHERE principal_id = '{{ principal_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;