workspace_identity_details
Creates, updates, deletes, gets or lists a workspace_identity_details resource.
Overview
| Name | workspace_identity_details |
| Type | Resource |
| Id | databricks_workspace.iamv2.workspace_identity_details |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
principal_id | integer | The internal ID of the principal (user/sp/group) in Databricks. |
assignment_type | string | The type of assignment the principal has to the workspace (direct or indirect). (DIRECT, INDIRECT) |
principal_type | string | The type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER) |
workspace_identity_status | string | The activity status of an identity in a Databricks workspace. (ACTIVE, INACTIVE) |
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 identity details for a principal in a workspace. | |
update | update | principal_id, update_mask, deployment_name, workspace_identity_detail | Updates 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.
| 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. |
update_mask | object | Required. The list of fields to update. |
SELECT examples
- get
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
- update
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;