Skip to main content

storage

Operations on a storage resource.

Overview

Namestorage
TypeResource
Iddatabricks_account.provisioning.storage

Fields

NameDatatype
account_idstring
creation_timeinteger
root_bucket_infoobject
storage_configuration_idstring
storage_configuration_namestring

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccount_id, storage_configuration_idGets a Databricks storage configuration for an account, both specified by ID.
listSELECTaccount_idGets a list of all Databricks storage configurations for your account, specified by ID.
createINSERTaccount_idCreates new storage configuration for an account, specified by ID. Uploads a storage configuration object that represents the root AWS S3 bucket in your account. Databricks stores related workspace assets including DBFS, cluster logs, and job results. For the AWS S3 bucket, you need to configure the required bucket policy.
deleteDELETEaccount_id, storage_configuration_idDeletes a Databricks storage configuration. You cannot delete a storage configuration that is associated with any workspace.

SELECT examples

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

INSERT example

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

/*+ create */
INSERT INTO databricks_account.provisioning.storage (
account_id,
data__storage_configuration_name,
data__root_bucket_info
)
SELECT
'{{ account_id }}',
'{{ storage_configuration_name }}',
'{{ root_bucket_info }}'
;

DELETE example

Deletes a storage resource.

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