Skip to main content

workspace_assignment_details

Creates, updates, deletes, gets or lists a workspace_assignment_details resource.

Overview

Nameworkspace_assignment_details
TypeResource
Iddatabricks_workspace.iamv2.workspace_assignment_details

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe account ID parent of the workspace where the principal is assigned
principal_idintegerThe internal ID of the principal (user/sp/group) in Databricks.
workspace_idintegerThe workspace ID where the principal is assigned
effective_entitlementsarrayThe 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.
entitlementsarrayEntitlements 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_typestringThe type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprincipal_id, deployment_nameReturns the assignment details for a principal in a workspace (workspace-level proxy).
listselectdeployment_namepage_size, page_tokenLists workspace assignment details for a workspace (workspace-level proxy). For scalability, the
createinsertdeployment_name, workspace_assignment_detailCreates a workspace assignment detail for a principal (workspace-level proxy). Entitlement grants are
updateupdateprincipal_id, update_mask, deployment_name, workspace_assignment_detailUpdates the entitlements of a directly assigned principal in a workspace (workspace-level proxy).
deletedeleteprincipal_id, deployment_nameDeletes 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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
principal_idintegerRequired. ID of the principal in Databricks to delete workspace assignment for.
update_maskobjectRequired. The list of fields to update.
page_sizeintegerThe maximum number of workspace assignment details to return. The service may return fewer than this value.
page_tokenstringA page token, received from a previous ListWorkspaceAssignmentDetailsProxy call. Provide this to retrieve the subsequent page.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;