workspaces
Operations on a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | databricks_account.provisioning.workspaces |
Fields
- vw_workspaces
- workspaces
Name | Datatype |
---|---|
account_id | text |
aws_region | text |
compliance_security_profile_enabled | unknown |
creation_time | integer |
credentials_id | text |
deployment_name | text |
enhanced_security_monitoring_enabled | unknown |
identity_federation_enabled | unknown |
is_no_public_ip_enabled | boolean |
pricing_tier | text |
storage_configuration_id | text |
workspace_id | integer |
workspace_name | text |
workspace_status | text |
workspace_status_message | text |
Name | Datatype |
---|---|
account_id | string |
aws_region | string |
creation_time | integer |
credentials_id | string |
custom_tags | object |
deployment_name | string |
is_no_public_ip_enabled | boolean |
managed_services_customer_managed_key_id | string |
network_id | string |
pricing_tier | string |
private_access_settings_id | string |
storage_configuration_id | string |
storage_customer_managed_key_id | string |
workspace_id | integer |
workspace_name | string |
workspace_status | string |
workspace_status_message | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | account_id, workspace_id | Gets information including status for a Databricks workspace, specified by ID. In the response, the |
list | SELECT | account_id | Gets a list of all workspaces associated with an account, specified by ID. |
create | INSERT | account_id | 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. |
delete | DELETE | account_id, workspace_id | 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. |
update | UPDATE | account_id, workspace_id | 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. |
SELECT
examples
- vw_workspaces
- workspaces (list)
- workspaces (get)
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 }}';
SELECT
account_id,
aws_region,
creation_time,
credentials_id,
custom_tags,
deployment_name,
is_no_public_ip_enabled,
managed_services_customer_managed_key_id,
network_id,
pricing_tier,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
workspace_name,
workspace_status,
workspace_status_message
FROM databricks_account.provisioning.workspaces
WHERE account_id = '{{ account_id }}';
SELECT
account_id,
aws_region,
creation_time,
credentials_id,
custom_tags,
deployment_name,
is_no_public_ip_enabled,
managed_services_customer_managed_key_id,
network_id,
pricing_tier,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
workspace_name,
workspace_status,
workspace_status_message
FROM databricks_account.provisioning.workspaces
WHERE account_id = '{{ account_id }}' AND
workspace_id = '{{ workspace_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new workspaces
resource.
- workspaces
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: workspace_name
value: string
- name: network_id
value: fd0cc5bc-683c-47e9-b15e-144d7744a496
- name: deployment_name
value: workspace_1
- name: aws_region
value: us-west-2
- name: credentials_id
value: ccc64f28-ebdc-4c89-add9-5dcb6d7727d8
- name: storage_configuration_id
value: b43a6064-04c1-4e1c-88b6-d91e5b136b13
- name: managed_services_customer_managed_key_id
value: 849b3d6b-e68e-468d-b3e5-deb08b03c56d
- name: private_access_settings_id
value: 3b3bbcb5-46bd-4b03-944e-97eb44ed7991
- name: pricing_tier
value: PREMIUM
- name: storage_customer_managed_key_id
value: 14138d0f-a575-4ae2-be71-ddfd0b602286
- name: custom_tags
value:
property1: string
property2: string
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 }}';