Skip to main content

object_permissions

Operations on a object_permissions resource.

Overview

Nameobject_permissions
TypeResource
Iddatabricks_workspace.workspace.object_permissions

Fields

NameDatatype
access_control_listarray
object_idstring
object_typestring

Methods

NameAccessible byRequired ParamsDescription
getpermissionsSELECTworkspace_object_id, workspace_object_type, deployment_nameGets the permissions of a workspace object. Workspace objects can inherit permissions from their parent objects or root object.
updatepermissionsUPDATEworkspace_object_id, workspace_object_type, deployment_nameUpdates the permissions on a workspace object. Workspace objects can inherit permissions from their parent objects or root object.
setpermissionsREPLACEworkspace_object_id, workspace_object_type, 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 parent objects or root object.

SELECT examples

SELECT
access_control_list,
object_id,
object_type
FROM databricks_workspace.workspace.object_permissions
WHERE workspace_object_id = '{{ workspace_object_id }}' AND
workspace_object_type = '{{ workspace_object_type }}' AND
deployment_name = '{{ deployment_name }}';

UPDATE example

Updates a object_permissions resource.

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

REPLACE example

Replaces a object_permissions resource.

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