Skip to main content

workspaces

Operations on a workspaces resource.

Overview

Nameworkspaces
TypeResource
Iddatabricks_account.provisioning.workspaces

Fields

NameDatatype
account_idtext
aws_regiontext
compliance_security_profile_enabledunknown
creation_timeinteger
credentials_idtext
deployment_nametext
enhanced_security_monitoring_enabledunknown
identity_federation_enabledunknown
is_no_public_ip_enabledboolean
pricing_tiertext
storage_configuration_idtext
workspace_idinteger
workspace_nametext
workspace_statustext
workspace_status_messagetext

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccount_id, workspace_idGets information including status for a Databricks workspace, specified by ID. In the response, the
listSELECTaccount_idGets a list of all workspaces associated with an account, specified by ID.
createINSERTaccount_idCreates 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.
deleteDELETEaccount_id, workspace_idTerminates 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.
updateUPDATEaccount_id, workspace_idUpdates a workspace configuration for either a running workspace or a failed workspace. The elements that can be updated varies between these two use cases.

SELECT examples

SELECT
account_id,
aws_region,
compliance_security_profile_enabled,
creation_time,
credentials_id,
deployment_name,
enhanced_security_monitoring_enabled,
identity_federation_enabled,
is_no_public_ip_enabled,
pricing_tier,
storage_configuration_id,
workspace_id,
workspace_name,
workspace_status,
workspace_status_message
FROM databricks_account.provisioning.vw_workspaces
WHERE account_id = '{{ account_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new workspaces resource.

/*+ create */
INSERT INTO databricks_account.provisioning.workspaces (
account_id,
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
'{{ account_id }}',
'{{ 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 example

Updates a workspaces resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_account.provisioning.workspaces
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE account_id = '{{ account_id }}' AND
workspace_id = '{{ workspace_id }}';

DELETE example

Deletes a workspaces resource.

/*+ delete */
DELETE FROM databricks_account.provisioning.workspaces
WHERE account_id = '{{ account_id }}' AND
workspace_id = '{{ workspace_id }}';