Skip to main content

permissions

Operations on a permissions resource.

Overview

Namepermissions
TypeResource
Iddatabricks_workspace.dbsql.permissions

Fields

NameDatatype
access_control_listarray
object_idstring
object_typestring

Methods

NameAccessible byRequired ParamsDescription
getSELECTobjectId, objectType, deployment_nameGets a JSON representation of the access control list (ACL) for a specified object.
setREPLACEobjectId, objectType, deployment_nameSets the access control list (ACL) for a specified object. This operation will complete rewrite the ACL.
transferownershipEXECobjectType, deployment_nameTransfer ownership of a single object.

SELECT examples

SELECT
access_control_list,
object_id,
object_type
FROM databricks_workspace.dbsql.permissions
WHERE objectId = '{{ objectId }}' AND
objectType = '{{ objectType }}' 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.dbsql.permissions
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE objectId = '{{ objectId }}' AND
objectType = '{{ objectType }}' AND
deployment_name = '{{ deployment_name }}';