storage
Operations on a storage
resource.
Overview
Name | storage |
Type | Resource |
Id | databricks_account.provisioning.storage |
Fields
Name | Datatype |
---|---|
account_id | string |
creation_time | integer |
root_bucket_info | object |
storage_configuration_id | string |
storage_configuration_name | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | account_id, storage_configuration_id | Gets a Databricks storage configuration for an account, both specified by ID. |
list | SELECT | account_id | Gets a list of all Databricks storage configurations for your account, specified by ID. |
create | INSERT | account_id | Creates 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. |
delete | DELETE | account_id, storage_configuration_id | Deletes a Databricks storage configuration. You cannot delete a storage configuration that is associated with any workspace. |
SELECT
examples
- storage (list)
- storage (get)
SELECT
account_id,
creation_time,
root_bucket_info,
storage_configuration_id,
storage_configuration_name
FROM databricks_account.provisioning.storage
WHERE account_id = '{{ account_id }}';
SELECT
account_id,
creation_time,
root_bucket_info,
storage_configuration_id,
storage_configuration_name
FROM databricks_account.provisioning.storage
WHERE account_id = '{{ account_id }}' AND
storage_configuration_id = '{{ storage_configuration_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new storage
resource.
- storage
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: storage_configuration_name
value: storage_conf_1
- name: root_bucket_info
value:
bucket_name: string
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 }}';