Skip to main content

workspace_identity_details

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

Overview

Nameworkspace_identity_details
TypeResource
Iddatabricks_workspace.iamv2.workspace_identity_details

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
principal_idintegerThe internal ID of the principal (user/sp/group) in Databricks.
assignment_typestringThe type of assignment the principal has to the workspace (direct or indirect). (DIRECT, INDIRECT)
principal_typestringThe type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER)
workspace_identity_statusstringThe activity status of an identity in a Databricks workspace. (ACTIVE, INACTIVE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprincipal_id, deployment_nameReturns the identity details for a principal in a workspace.
updateupdateprincipal_id, update_mask, deployment_name, workspace_identity_detailUpdates a workspace identity detail for a principal.

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.
update_maskobjectRequired. The list of fields to update.

SELECT examples

Returns the identity details for a principal in a workspace.

SELECT
principal_id,
assignment_type,
principal_type,
workspace_identity_status
FROM databricks_workspace.iamv2.workspace_identity_details
WHERE principal_id = '{{ principal_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;

UPDATE examples

Updates a workspace identity detail for a principal.

UPDATE databricks_workspace.iamv2.workspace_identity_details
SET
workspace_identity_detail = '{{ workspace_identity_detail }}'
WHERE
principal_id = '{{ principal_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_identity_detail = '{{ workspace_identity_detail }}' --required
RETURNING
principal_id,
assignment_type,
principal_type,
workspace_identity_status;