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_id, account_hostGets a Databricks storage configuration for an account, both specified by ID.
storage_listselectaccount_id, account_hostLists Databricks storage configurations for an account, specified by ID.
storage_createinsertaccount_id, account_host, storage_configuration_name, root_bucket_infoCreates a Databricks storage configuration for an account.
storage_deletedeleteaccount_id, storage_configuration_id, account_hostDeletes 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_hoststringThe Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}})
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
AND account_host = '{{ account_host }}' -- 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,
account_host
)
SELECT
'{{ storage_configuration_name }}' /* required */,
'{{ root_bucket_info }}' /* required */,
'{{ role_arn }}',
'{{ account_id }}',
'{{ account_host }}'
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
AND account_host = '{{ account_host }}' --required
;