service_principal_secrets
Operations on a service_principal_secrets
resource.
Overview
Name | service_principal_secrets |
Type | Resource |
Id | databricks_account.oauth.service_principal_secrets |
Fields
Name | Datatype |
---|---|
id | string |
create_time | string |
secret_hash | string |
status | string |
update_time | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | account_id, service_principal_id | List all secrets associated with the given service principal. This operation only returns information about the secrets themselves and does not include the secret values. |
create | INSERT | account_id, service_principal_id | Create a secret for the given service principal. |
delete | DELETE | account_id, secret_id, service_principal_id | Delete a secret from the given service principal. |
SELECT
examples
SELECT
id,
create_time,
secret_hash,
status,
update_time
FROM databricks_account.oauth.service_principal_secrets
WHERE account_id = '{{ account_id }}' AND
service_principal_id = '{{ service_principal_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new service_principal_secrets
resource.
- service_principal_secrets
- Manifest
/*+ create */
INSERT INTO databricks_account.oauth.service_principal_secrets (
account_id,
service_principal_id
)
SELECT
'{{ account_id }}',
'{{ service_principal_id }}'
;
- name: your_resource_model_name
props: [] # No request body parameters required
DELETE
example
Deletes a service_principal_secrets
resource.
/*+ delete */
DELETE FROM databricks_account.oauth.service_principal_secrets
WHERE account_id = '{{ account_id }}' AND
secret_id = '{{ secret_id }}' AND
service_principal_id = '{{ service_principal_id }}';