storage_credentials
Operations on a storage_credentials
resource.
Overview
Name | storage_credentials |
Type | Resource |
Id | databricks_account.unity_catalog.storage_credentials |
Fields
Name | Datatype |
---|---|
id | string |
name | string |
aws_iam_role | object |
comment | string |
created_at | integer |
created_by | string |
full_name | string |
isolation_mode | string |
metastore_id | string |
owner | string |
read_only | boolean |
updated_at | integer |
updated_by | string |
used_for_managed_storage | boolean |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | account_id, metastore_id, storage_credential_name | Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the storage credential, or have a level of privilege on the storage credential. |
list | SELECT | account_id, metastore_id | Gets a list of all storage credentials that have been assigned to given metastore. |
create | INSERT | account_id, metastore_id | Creates a new storage credential. The request object is specific to the cloud: |
delete | DELETE | account_id, metastore_id, storage_credential_name | Deletes a storage credential from the metastore. The caller must be an owner of the storage credential. |
update | REPLACE | account_id, metastore_id, storage_credential_name | Updates a storage credential on the metastore. The caller must be the owner of the storage credential. If the caller is a metastore admin, only the |
SELECT
examples
- storage_credentials (list)
- storage_credentials (get)
SELECT
id,
name,
aws_iam_role,
comment,
created_at,
created_by,
full_name,
isolation_mode,
metastore_id,
owner,
read_only,
updated_at,
updated_by,
used_for_managed_storage
FROM databricks_account.unity_catalog.storage_credentials
WHERE account_id = '{{ account_id }}' AND
metastore_id = '{{ metastore_id }}';
SELECT
id,
name,
aws_iam_role,
comment,
created_at,
created_by,
full_name,
isolation_mode,
metastore_id,
owner,
read_only,
updated_at,
updated_by,
used_for_managed_storage
FROM databricks_account.unity_catalog.storage_credentials
WHERE account_id = '{{ account_id }}' AND
metastore_id = '{{ metastore_id }}' AND
storage_credential_name = '{{ storage_credential_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new storage_credentials
resource.
- storage_credentials
- Manifest
/*+ create */
INSERT INTO databricks_account.unity_catalog.storage_credentials (
account_id,
metastore_id,
data__credential_info
)
SELECT
'{{ account_id }}',
'{{ metastore_id }}',
'{{ credential_info }}'
;
- name: your_resource_model_name
props:
- name: credential_info
value:
name: string
comment: string
read_only: true
aws_iam_role:
role_arn: string
skip_validation: false
REPLACE
example
Replaces a storage_credentials
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_account.unity_catalog.storage_credentials
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE account_id = '{{ account_id }}' AND
metastore_id = '{{ metastore_id }}' AND
storage_credential_name = '{{ storage_credential_name }}';
DELETE
example
Deletes a storage_credentials
resource.
/*+ delete */
DELETE FROM databricks_account.unity_catalog.storage_credentials
WHERE account_id = '{{ account_id }}' AND
metastore_id = '{{ metastore_id }}' AND
storage_credential_name = '{{ storage_credential_name }}';