Skip to main content

storage

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

Overview

Namestorage
TypeResource
Iddatabricks_account.provisioning.storage

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstring
storage_configuration_idstringDatabricks storage configuration ID.
storage_configuration_namestringThe human-readable name of the storage configuration.
creation_timeintegerTime in epoch milliseconds when the storage configuration was created.
role_arnstringOptional IAM role that is used to access the workspace catalog which is created during workspace creation for UC by Default. If a storage configuration with this field populated is used to create a workspace, then a workspace catalog is created together with the workspace. The workspace catalog shares the root bucket with internal workspace storage (including DBFS root) but uses a dedicated bucket path prefix.
root_bucket_infoobjectThe root bucket information for the storage configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
storage_getselectaccount_id, storage_configuration_idGets a Databricks storage configuration for an account, both specified by ID.
storage_listselectaccount_idLists Databricks storage configurations for an account, specified by ID.
storage_createinsertaccount_id, storage_configuration_name, root_bucket_infoCreates a Databricks storage configuration for an account.
storage_deletedeleteaccount_id, storage_configuration_idDeletes a Databricks storage configuration. You cannot delete a storage configuration that is

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
account_idstring
storage_configuration_idstring

SELECT examples

Gets a Databricks storage configuration for an account, both specified by ID.

SELECT
account_id,
storage_configuration_id,
storage_configuration_name,
creation_time,
role_arn,
root_bucket_info
FROM databricks_account.provisioning.storage
WHERE account_id = '{{ account_id }}' -- required
AND storage_configuration_id = '{{ storage_configuration_id }}' -- required
;

INSERT examples

Creates a Databricks storage configuration for an account.

INSERT INTO databricks_account.provisioning.storage (
storage_configuration_name,
root_bucket_info,
role_arn,
account_id
)
SELECT
'{{ storage_configuration_name }}' /* required */,
'{{ root_bucket_info }}' /* required */,
'{{ role_arn }}',
'{{ account_id }}'
RETURNING
account_id,
storage_configuration_id,
storage_configuration_name,
creation_time,
role_arn,
root_bucket_info
;

DELETE examples

Deletes a Databricks storage configuration. You cannot delete a storage configuration that is

DELETE FROM databricks_account.provisioning.storage
WHERE account_id = '{{ account_id }}' --required
AND storage_configuration_id = '{{ storage_configuration_id }}' --required
;