credentials
Operations on a credentials
resource.
Overview
Name | credentials |
Type | Resource |
Id | databricks_account.provisioning.credentials |
Fields
Name | Datatype |
---|---|
account_id | string |
aws_credentials | object |
creation_time | integer |
credentials_id | string |
credentials_name | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | account_id, credentials_id | Gets a Databricks credential configuration object for an account, both specified by ID. |
list | SELECT | account_id | Gets all Databricks credential configurations associated with an account specified by ID. |
create | INSERT | account_id | Creates a Databricks credential configuration that represents cloud cross-account credentials for a specified account. Databricks uses this to set up network infrastructure properly to host Databricks clusters. For your AWS IAM role, you need to trust the External ID (the Databricks Account API account ID) in the returned credential object, and configure the required access policy. |
delete | DELETE | account_id, credentials_id | Deletes a Databricks credential configuration object for an account, both specified by ID. You cannot delete a credential that is associated with any workspace. |
SELECT
examples
- credentials (list)
- credentials (get)
SELECT
account_id,
aws_credentials,
creation_time,
credentials_id,
credentials_name
FROM databricks_account.provisioning.credentials
WHERE account_id = '{{ account_id }}';
SELECT
account_id,
aws_credentials,
creation_time,
credentials_id,
credentials_name
FROM databricks_account.provisioning.credentials
WHERE account_id = '{{ account_id }}' AND
credentials_id = '{{ credentials_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new credentials
resource.
- credentials
- Manifest
/*+ create */
INSERT INTO databricks_account.provisioning.credentials (
account_id,
data__credentials_name,
data__aws_credentials
)
SELECT
'{{ account_id }}',
'{{ credentials_name }}',
'{{ aws_credentials }}'
;
- name: your_resource_model_name
props:
- name: credentials_name
value: credential_1
- name: aws_credentials
value:
sts_role:
role_arn: arn-aws-iam::111110000000:role/test_role
DELETE
example
Deletes a credentials
resource.
/*+ delete */
DELETE FROM databricks_account.provisioning.credentials
WHERE account_id = '{{ account_id }}' AND
credentials_id = '{{ credentials_id }}';