Skip to main content

workspace_bindings

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

Overview

Nameworkspace_bindings
TypeResource
Iddatabricks_workspace.unitycatalog.workspace_bindings

Fields

The following fields are returned by SELECT queries:

A list of workspace IDs that are bound to the securable

NameDatatypeDescription
workspace_idinteger
binding_typestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getbindingsselectdeployment_nameGets workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.
updateupdatedeployment_nameUpdates workspace bindings of the catalog. The caller must be a metastore admin or an owner of the catalog.
updatebindingsupdatedeployment_nameUpdates workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.

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 workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.

SELECT
workspace_id,
binding_type
FROM databricks_workspace.unitycatalog.workspace_bindings
WHERE deployment_name = '{{ deployment_name }}' -- required;

UPDATE examples

Updates workspace bindings of the catalog. The caller must be a metastore admin or an owner of the catalog.

UPDATE databricks_workspace.unitycatalog.workspace_bindings
SET
data__assign_workspaces = '{{ assign_workspaces }}',
data__unassign_workspaces = '{{ unassign_workspaces }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
workspaces;