git_credentials
Creates, updates, deletes, gets or lists a git_credentials
resource.
Overview
Name | git_credentials |
Type | Resource |
Id | databricks_workspace.repos.git_credentials |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Request completed successfully.
Name | Datatype | Description |
---|---|---|
credential_id | string | |
git_provider | string | |
git_username | string |
Request completed successfully.
Name | Datatype | Description |
---|---|---|
credential_id | string | |
git_provider | string | |
git_username | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Gets the Git credential with the specified credential ID. | |
list | select | deployment_name | Lists the calling user's Git credentials. One credential per user is supported. | |
create | insert | deployment_name | Creates a Git credential entry for the user. Only one Git credential per user is supported, so any attempts to create credentials if an entry already exists will fail. Use the PATCH endpoint to update existing credentials, or the DELETE endpoint to delete existing credentials. | |
update | update | deployment_name | Updates the specified Git credential. | |
delete | delete | deployment_name | Deletes the specified Git credential. |
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.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- get
- list
Gets the Git credential with the specified credential ID.
SELECT
credential_id,
git_provider,
git_username
FROM databricks_workspace.repos.git_credentials
WHERE deployment_name = '{{ deployment_name }}' -- required;
Lists the calling user's Git credentials. One credential per user is supported.
SELECT
credential_id,
git_provider,
git_username
FROM databricks_workspace.repos.git_credentials
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a Git credential entry for the user. Only one Git credential per user is supported, so any attempts to create credentials if an entry already exists will fail. Use the PATCH endpoint to update existing credentials, or the DELETE endpoint to delete existing credentials.
INSERT INTO databricks_workspace.repos.git_credentials (
data__git_provider,
data__git_username,
data__personal_access_token,
deployment_name
)
SELECT
'{{ git_provider }}',
'{{ git_username }}',
'{{ personal_access_token }}',
'{{ deployment_name }}'
RETURNING
credential_id,
git_provider,
git_username
;
# Description fields are for documentation purposes
- name: git_credentials
props:
- name: deployment_name
value: string
description: Required parameter for the git_credentials resource.
- name: git_provider
value: required
- name: git_username
value: string
- name: personal_access_token
value: string
UPDATE
examples
- update
Updates the specified Git credential.
UPDATE databricks_workspace.repos.git_credentials
SET
data__personal_access_token = '{{ personal_access_token }}',
data__git_provider = '{{ git_provider }}',
data__git_username = '{{ git_username }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
DELETE
examples
- delete
Deletes the specified Git credential.
DELETE FROM databricks_workspace.repos.git_credentials
WHERE deployment_name = '{{ deployment_name }}' --required;