Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Iddatabricks_account.provisioning.workspaces

Fields

The following fields are returned by SELECT queries:

The workspace configuration was successfully returned.

NameDatatypeDescription
account_idstring
credentials_idstring
managed_services_customer_managed_key_idstring
network_idstring
private_access_settings_idstring
storage_configuration_idstring
storage_customer_managed_key_idstring
workspace_idinteger
deployment_namestring
workspace_namestring
aws_regionstring
creation_timeinteger
custom_tagsobject
is_no_public_ip_enabledboolean
pricing_tierstring
workspace_statusstring
workspace_status_messagestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectGets information including status for a Databricks workspace, specified by ID. In the response, the
listselectGets a list of all workspaces associated with an account, specified by ID.
createinsertCreates a new workspace using a credential configuration and a storage configuration, an optional network configuration (if using a customer-managed VPC), an optional managed services key configuration (if using customer-managed keys for managed services), and an optional storage key configuration (if using customer-managed keys for storage). The key configurations used for managed services and storage encryption can be the same or different.
updateupdateUpdates a workspace configuration for either a running workspace or a failed workspace. The elements that can be updated varies between these two use cases.
deletedeleteTerminates and deletes a Databricks workspace. From an API perspective, deletion is immediate. However, it might take a few minutes for all workspaces resources to be deleted, depending on the size and number of workspace resources.

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

SELECT examples

Gets information including status for a Databricks workspace, specified by ID. In the response, the

SELECT
account_id,
credentials_id,
managed_services_customer_managed_key_id,
network_id,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
deployment_name,
workspace_name,
aws_region,
creation_time,
custom_tags,
is_no_public_ip_enabled,
pricing_tier,
workspace_status,
workspace_status_message
FROM databricks_account.provisioning.workspaces;

INSERT examples

Creates a new workspace using a credential configuration and a storage configuration, an optional network configuration (if using a customer-managed VPC), an optional managed services key configuration (if using customer-managed keys for managed services), and an optional storage key configuration (if using customer-managed keys for storage). The key configurations used for managed services and storage encryption can be the same or different.

INSERT INTO databricks_account.provisioning.workspaces (
data__workspace_name,
data__network_id,
data__deployment_name,
data__aws_region,
data__credentials_id,
data__storage_configuration_id,
data__managed_services_customer_managed_key_id,
data__private_access_settings_id,
data__pricing_tier,
data__storage_customer_managed_key_id,
data__custom_tags
)
SELECT
'{{ workspace_name }}',
'{{ network_id }}',
'{{ deployment_name }}',
'{{ aws_region }}',
'{{ credentials_id }}',
'{{ storage_configuration_id }}',
'{{ managed_services_customer_managed_key_id }}',
'{{ private_access_settings_id }}',
'{{ pricing_tier }}',
'{{ storage_customer_managed_key_id }}',
'{{ custom_tags }}'
;

UPDATE examples

Updates a workspace configuration for either a running workspace or a failed workspace. The elements that can be updated varies between these two use cases.

UPDATE databricks_account.provisioning.workspaces
SET
data__aws_region = '{{ aws_region }}',
data__credentials_id = '{{ credentials_id }}',
data__storage_configuration_id = '{{ storage_configuration_id }}',
data__network_id = '{{ network_id }}',
data__managed_services_customer_managed_key_id = '{{ managed_services_customer_managed_key_id }}',
data__private_access_settings_id = '{{ private_access_settings_id }}',
data__storage_customer_managed_key_id = '{{ storage_customer_managed_key_id }}',
data__network_connectivity_config_id = '{{ network_connectivity_config_id }}',
data__custom_tags = '{{ custom_tags }}'
WHERE
;

DELETE examples

Terminates and deletes a Databricks workspace. From an API perspective, deletion is immediate. However, it might take a few minutes for all workspaces resources to be deleted, depending on the size and number of workspace resources.

DELETE FROM databricks_account.provisioning.workspaces;