workspace_permission_assignments
Operations on a workspace_permission_assignments
resource.
Overview
Name | workspace_permission_assignments |
Type | Resource |
Id | databricks_account.iam.workspace_permission_assignments |
Fields
Name | Datatype |
---|---|
error | string |
permissions | array |
principal | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | account_id, workspace_id | Get the permission assignments for the specified Databricks account and Databricks workspace. |
createorupdate | INSERT | account_id, principal_id, workspace_id | Creates or updates the workspace permissions assignment in a given account and workspace for the specified principal. |
delete | DELETE | account_id, principal_id, workspace_id | Deletes 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.
- workspace_permission_assignments
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: permissions
value:
- UNKNOWN
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 }}';