Skip to main content

workspace_access_details

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

Overview

Nameworkspace_access_details
TypeResource
Iddatabricks_account.iamv2.workspace_access_details

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe account ID parent of the workspace where the principal has access.
principal_idintegerThe internal ID of the principal (user/sp/group) in Databricks.
workspace_idintegerThe workspace ID where the principal has access.
access_typestringThe type of access the principal has to the workspace. (DIRECT, INDIRECT)
permissionsarrayThe permissions granted to the principal in the workspace.
principal_typestringThe type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER)
statusstringThe activity status of the principal in the workspace. Not applicable for groups at the moment. (ACTIVE, INACTIVE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, workspace_id, principal_idviewReturns the access details for a principal in a workspace. Allows for checking access details for any
listselectaccount_id, workspace_idpage_size, page_tokenLists the access details of every provisioned principal (user, service principal, or group) with

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
account_idstring
principal_idintegerRequired. The internal ID of the principal (user/sp/group) for which the access details are being requested.
workspace_idintegerThe workspace ID for which the workspace access details are being fetched.
page_sizeintegerThe maximum number of workspace access details to return. The service may return fewer than this value.
page_tokenstringA page token, received from a previous ListWorkspaceAccessDetails call. Provide this to retrieve the subsequent page.
viewstringControls what fields are returned.

SELECT examples

Returns the access details for a principal in a workspace. Allows for checking access details for any

SELECT
account_id,
principal_id,
workspace_id,
access_type,
permissions,
principal_type,
status
FROM databricks_account.iamv2.workspace_access_details
WHERE account_id = '{{ account_id }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
AND principal_id = '{{ principal_id }}' -- required
AND view = '{{ view }}'
;