Skip to main content

cluster_permissions

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

Overview​

Namecluster_permissions
TypeResource
Iddatabricks_workspace.compute.cluster_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
getselectcluster_id, deployment_name, workspace_domainGets the permissions of a cluster. Clusters can inherit permissions from their root object.
updateupdatecluster_id, deployment_name, workspace_domainUpdates the permissions on a cluster. Clusters can inherit permissions from their root object.
setreplacecluster_id, deployment_name, workspace_domainSets permissions on an object, replacing existing permissions if they exist. Deletes all direct

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
cluster_idstringThe cluster for which to get or manage permissions.
deployment_namestringThe Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME)
workspace_domainstringThe Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}})

SELECT examples​

Gets the permissions of a cluster. Clusters can inherit permissions from their root object.

SELECT
object_id,
access_control_list,
object_type
FROM databricks_workspace.compute.cluster_permissions
WHERE cluster_id = '{{ cluster_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;

UPDATE examples​

Updates the permissions on a cluster. Clusters can inherit permissions from their root object.

UPDATE databricks_workspace.compute.cluster_permissions
SET
access_control_list = '{{ access_control_list }}'
WHERE
cluster_id = '{{ cluster_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
RETURNING
object_id,
access_control_list,
object_type;

REPLACE examples​

Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct

REPLACE databricks_workspace.compute.cluster_permissions
SET
access_control_list = '{{ access_control_list }}'
WHERE
cluster_id = '{{ cluster_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
RETURNING
object_id,
access_control_list,
object_type;