Skip to main content

permissions

Operations on a permissions resource.

Overview

Namepermissions
TypeResource
Iddatabricks_workspace.apps.permissions

Fields

NameDatatype
access_control_listarray
object_idstring
object_typestring

Methods

NameAccessible byRequired ParamsDescription
getpermissionsSELECTapp_name, deployment_nameGets the permissions of an app. Apps can inherit permissions from their root object.
updatepermissionsUPDATEapp_name, deployment_nameUpdates the permissions on an app. Apps can inherit permissions from their root object.
setpermissionsREPLACEapp_name, deployment_nameSets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object.

SELECT examples

SELECT
access_control_list,
object_id,
object_type
FROM databricks_workspace.apps.permissions
WHERE app_name = '{{ app_name }}' AND
deployment_name = '{{ deployment_name }}';

UPDATE example

Updates a permissions resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.apps.permissions
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE app_name = '{{ app_name }}' AND
deployment_name = '{{ deployment_name }}';

REPLACE example

Replaces a permissions resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_workspace.apps.permissions
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE app_name = '{{ app_name }}' AND
deployment_name = '{{ deployment_name }}';