Skip to main content

credentials

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

Overview

Namecredentials
TypeResource
Iddatabricks_workspace.postgres.credentials

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
expire_timestring (date-time)
tokenstringThe OAuth token that can be used as a password when connecting to a database.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
generateselectdeployment_nameGenerate OAuth credentials for a Postgres database.

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
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Generate OAuth credentials for a Postgres database.

SELECT
expire_time,
token
FROM databricks_workspace.postgres.credentials
WHERE deployment_name = '{{ deployment_name }}' -- required
;