Skip to main content

credentials

Creates, updates, deletes, gets or lists a credentials resource.

Overview​

Namecredentials
TypeResource
Iddatabricks_account.provisioning.credentials

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstring
credentials_idstringDatabricks credential configuration ID.
credentials_namestringThe human-readable name of the credential configuration object.
â–¶aws_credentialsobject
creation_timeintegerTime in epoch milliseconds when the credential was created.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
credentials_getselectaccount_id, credentials_id, account_hostGets a Databricks credential configuration object for an account, both specified by ID.
credentials_listselectaccount_id, account_hostList Databricks credential configuration objects for an account, specified by ID.
credentials_createinsertaccount_id, account_host, credentials_name, aws_credentialsCreates a Databricks credential configuration that represents cloud cross-account credentials for a
credentials_deletedeleteaccount_id, credentials_id, account_hostDeletes a Databricks credential configuration object for an account, both specified by ID. You cannot

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
credentials_idstringDatabricks Account API credential configuration ID

SELECT examples​

Gets a Databricks credential configuration object for an account, both specified by ID.

SELECT
account_id,
credentials_id,
credentials_name,
aws_credentials,
creation_time
FROM databricks_account.provisioning.credentials
WHERE account_id = '{{ account_id }}' -- required
AND credentials_id = '{{ credentials_id }}' -- required
AND account_host = '{{ account_host }}' -- required
;

INSERT examples​

Creates a Databricks credential configuration that represents cloud cross-account credentials for a

INSERT INTO databricks_account.provisioning.credentials (
credentials_name,
aws_credentials,
account_id,
account_host
)
SELECT
'{{ credentials_name }}' /* required */,
'{{ aws_credentials }}' /* required */,
'{{ account_id }}',
'{{ account_host }}'
RETURNING
account_id,
credentials_id,
credentials_name,
aws_credentials,
creation_time
;

DELETE examples​

Deletes a Databricks credential configuration object for an account, both specified by ID. You cannot

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