Skip to main content

workspace_permission_assignments

Operations on a workspace_permission_assignments resource.

Overview

Nameworkspace_permission_assignments
TypeResource
Iddatabricks_account.iam.workspace_permission_assignments

Fields

NameDatatype
errorstring
permissionsarray
principalobject

Methods

NameAccessible byRequired ParamsDescription
listSELECTaccount_id, workspace_idGet the permission assignments for the specified Databricks account and Databricks workspace.
createorupdateINSERTaccount_id, principal_id, workspace_idCreates or updates the workspace permissions assignment in a given account and workspace for the specified principal.
deleteDELETEaccount_id, principal_id, workspace_idDeletes the workspace permissions assignment in a given account and workspace for the specified principal.

SELECT examples

SELECT
error,
permissions,
principal
FROM databricks_account.iam.workspace_permission_assignments
WHERE account_id = '{{ account_id }}' AND
workspace_id = '{{ workspace_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new workspace_permission_assignments resource.

/*+ create */
INSERT INTO databricks_account.iam.workspace_permission_assignments (
account_id,
principal_id,
workspace_id,
data__permissions
)
SELECT
'{{ account_id }}',
'{{ principal_id }}',
'{{ workspace_id }}',
'{{ permissions }}'
;

DELETE example

Deletes a workspace_permission_assignments resource.

/*+ delete */
DELETE FROM databricks_account.iam.workspace_permission_assignments
WHERE account_id = '{{ account_id }}' AND
principal_id = '{{ principal_id }}' AND
workspace_id = '{{ workspace_id }}';