Skip to main content

encryption_keys

Creates, updates, deletes, gets or lists an encryption_keys resource.

Overview​

Nameencryption_keys
TypeResource
Iddatabricks_account.provisioning.encryption_keys

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstring
customer_managed_key_idstringID of the encryption key configuration object.
â–¶aws_key_infoobject
â–¶azure_key_infoobject
creation_timeintegerTime in epoch milliseconds when the customer key was created.
â–¶gcp_key_infoobject
use_casesarrayThe cases that the key can be used for.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
encryption_keys_getselectaccount_id, customer_managed_key_id, account_hostGets a customer-managed key configuration object for an account, specified by ID. This operation
encryption_keys_listselectaccount_id, account_hostLists Databricks customer-managed key configurations for an account.
encryption_keys_createinsertaccount_id, account_host, use_casesCreates a customer-managed key configuration object for an account, specified by ID. This operation
encryption_keys_deletedeleteaccount_id, customer_managed_key_id, account_hostDeletes a customer-managed key configuration object for an account. You cannot delete a configuration

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
customer_managed_key_idstringDatabricks encryption key configuration ID.

SELECT examples​

Gets a customer-managed key configuration object for an account, specified by ID. This operation

SELECT
account_id,
customer_managed_key_id,
aws_key_info,
azure_key_info,
creation_time,
gcp_key_info,
use_cases
FROM databricks_account.provisioning.encryption_keys
WHERE account_id = '{{ account_id }}' -- required
AND customer_managed_key_id = '{{ customer_managed_key_id }}' -- required
AND account_host = '{{ account_host }}' -- required
;

INSERT examples​

Creates a customer-managed key configuration object for an account, specified by ID. This operation

INSERT INTO databricks_account.provisioning.encryption_keys (
use_cases,
aws_key_info,
azure_key_info,
gcp_key_info,
account_id,
account_host
)
SELECT
'{{ use_cases }}' /* required */,
'{{ aws_key_info }}',
'{{ azure_key_info }}',
'{{ gcp_key_info }}',
'{{ account_id }}',
'{{ account_host }}'
RETURNING
account_id,
customer_managed_key_id,
aws_key_info,
azure_key_info,
creation_time,
gcp_key_info,
use_cases
;

DELETE examples​

Deletes a customer-managed key configuration object for an account. You cannot delete a configuration

DELETE FROM databricks_account.provisioning.encryption_keys
WHERE account_id = '{{ account_id }}' --required
AND customer_managed_key_id = '{{ customer_managed_key_id }}' --required
AND account_host = '{{ account_host }}' --required
;