workspace_access_details
Creates, updates, deletes, gets or lists a workspace_access_details resource.
Overview​
| Name | workspace_access_details |
| Type | Resource |
| Id | databricks_account.iamv2.workspace_access_details |
Fields​
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account ID parent of the workspace where the principal has access. |
principal_id | integer | The internal ID of the principal (user/sp/group) in Databricks. |
workspace_id | integer | The workspace ID where the principal has access. |
access_type | string | The type of access the principal has to the workspace. (DIRECT, INDIRECT) |
permissions | array | The permissions granted to the principal in the workspace. |
principal_type | string | The type of the principal (user/sp/group). (GROUP, SERVICE_PRINCIPAL, USER) |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, workspace_id, principal_id, account_host | view | Returns the access details for a principal in a workspace. Allows for checking access details for any |
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 |
|---|---|---|
account_host | string | The Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}}) |
account_id | string | |
principal_id | integer | Required. The internal ID of the principal (user/sp/group) for which the access details are being requested. |
workspace_id | integer | Required. The workspace ID for which the access details are being requested. |
view | string | Controls what fields are returned. |
SELECT examples​
- get
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 account_host = '{{ account_host }}' -- required
AND view = '{{ view }}'
;