Skip to main content

permissions

Creates, updates, deletes, gets or lists a permissions resource.

Overview

Namepermissions
TypeResource
Iddatabricks_workspace.dbsql.permissions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
object_idstring
access_control_listarray
object_typestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_nameGets a JSON representation of the access control list (ACL) for a specified object.
setreplacedeployment_nameSets the access control list (ACL) for a specified object. This operation will complete rewrite the ACL.
transferownershipexecdeployment_nameTransfer ownership of a single object.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Gets a JSON representation of the access control list (ACL) for a specified object.

SELECT
object_id,
access_control_list,
object_type
FROM databricks_workspace.dbsql.permissions
WHERE deployment_name = '{{ deployment_name }}' -- required;

REPLACE examples

Sets the access control list (ACL) for a specified object. This operation will complete rewrite the ACL.

REPLACE databricks_workspace.dbsql.permissions
SET
data__access_control_list = '{{ access_control_list }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
object_id,
access_control_list,
object_type;

Lifecycle Methods

Transfer ownership of a single object.

EXEC databricks_workspace.dbsql.permissions.transferownership 
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"new_owner": "{{ new_owner }}"
}';