Skip to main content

workspace_bindings

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

Overview

Nameworkspace_bindings
TypeResource
Iddatabricks_workspace.catalog.workspace_bindings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
workspace_idinteger
binding_typestringOne of READ_WRITE/READ_ONLY. Default is READ_WRITE. (BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_bindingsselectsecurable_type, securable_name, deployment_namemax_results, page_tokenGets workspace bindings of the securable. The caller must be a metastore admin or an owner of the
getselectname, deployment_nameGets workspace bindings of the catalog. The caller must be a metastore admin or an owner of the
update_bindingsupdatesecurable_type, securable_name, deployment_nameUpdates workspace bindings of the securable. The caller must be a metastore admin or an owner of the
updateupdatename, deployment_nameUpdates workspace bindings of the catalog. The caller must be a metastore admin or an owner of the

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)
namestringThe name of the catalog.
securable_namestringThe name of the securable.
securable_typestringThe type of the securable to bind to a workspace (catalog, storage_credential, credential, or external_location).
max_resultsintegerMaximum number of workspace bindings to return. - When set to 0, the page length is set to a server configured value (recommended); - When set to a value greater than 0, the page length is the minimum of this value and a server configured value; - When set to a value less than 0, an invalid parameter error is returned; - If not set, all the workspace bindings are returned (not recommended).
page_tokenstringOpaque pagination token to go to next page based on previous query.

SELECT examples

Gets workspace bindings of the securable. The caller must be a metastore admin or an owner of the

SELECT
workspace_id,
binding_type
FROM databricks_workspace.catalog.workspace_bindings
WHERE securable_type = '{{ securable_type }}' -- required
AND securable_name = '{{ securable_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND max_results = '{{ max_results }}'
AND page_token = '{{ page_token }}'
;

UPDATE examples

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

UPDATE databricks_workspace.catalog.workspace_bindings
SET
add = '{{ add }}',
remove = '{{ remove }}'
WHERE
securable_type = '{{ securable_type }}' --required
AND securable_name = '{{ securable_name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
RETURNING
bindings;