account_service_principals
Creates, updates, deletes, gets or lists an account_service_principals resource.
Overview
| Name | account_service_principals |
| Type | Resource |
| Id | databricks_account.iam.account_service_principals |
Fields
The following fields are returned by SELECT queries:
- account_service_principals_v2_get
- account_service_principals_v2_list
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks service principal ID. |
account_id | string | |
active | boolean | If this user is active |
applicationId | string | UUID relating to the service principal |
displayName | string | String that represents a concatenation of given and family names. |
externalId | string | |
roles | array | Indicates if the group has the admin role. |
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks service principal ID. |
account_id | string | |
active | boolean | If this user is active |
applicationId | string | UUID relating to the service principal |
displayName | string | String that represents a concatenation of given and family names. |
externalId | string | |
roles | array | Indicates if the group has the admin role. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
account_service_principals_v2_get | select | account_id, id | Gets the details for a single service principal define in the Databricks account. | |
account_service_principals_v2_list | select | account_id | attributes, count, excluded_attributes, filter, sort_by, sort_order, start_index | Gets the set of service principals associated with a Databricks account. |
account_service_principals_v2_create | insert | account_id | Creates a new service principal in the Databricks account. | |
account_service_principals_v2_patch | update | account_id, id | Partially updates the details of a single service principal in the Databricks account. | |
account_service_principals_v2_update | replace | account_id, id | Updates the details of a single service principal. | |
account_service_principals_v2_delete | delete | account_id, id | Delete a single service principal in the Databricks account. |
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 |
|---|---|---|
account_id | string | |
id | string | Unique ID for a service principal in the Databricks account. |
attributes | string | Comma-separated list of attributes to return in response. |
count | integer | Desired number of results per page. Default is 10000. |
excluded_attributes | string | Comma-separated list of attributes to exclude in response. |
filter | string | Query by which the results have to be filtered. Supported operators are equals(eq), contains(co), starts with(sw) and not equals(ne). Additionally, simple expressions can be formed using logical operators - and and or. The [SCIM RFC] has more details but we currently only support simple expressions. [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 |
sort_by | string | Attribute to sort the results. |
sort_order | string | The order to sort the results. |
start_index | integer | Specifies the index of the first result. First item is number 1. |
SELECT examples
- account_service_principals_v2_get
- account_service_principals_v2_list
Gets the details for a single service principal define in the Databricks account.
SELECT
id,
account_id,
active,
applicationId,
displayName,
externalId,
roles
FROM databricks_account.iam.account_service_principals
WHERE account_id = '{{ account_id }}' -- required
AND id = '{{ id }}' -- required
;
Gets the set of service principals associated with a Databricks account.
SELECT
id,
account_id,
active,
applicationId,
displayName,
externalId,
roles
FROM databricks_account.iam.account_service_principals
WHERE account_id = '{{ account_id }}' -- required
AND attributes = '{{ attributes }}'
AND count = '{{ count }}'
AND excluded_attributes = '{{ excluded_attributes }}'
AND filter = '{{ filter }}'
AND sort_by = '{{ sort_by }}'
AND sort_order = '{{ sort_order }}'
AND start_index = '{{ start_index }}'
;
INSERT examples
- account_service_principals_v2_create
- Manifest
Creates a new service principal in the Databricks account.
INSERT INTO databricks_account.iam.account_service_principals (
active,
applicationId,
displayName,
externalId,
id,
roles,
account_id
)
SELECT
{{ active }},
'{{ applicationId }}',
'{{ displayName }}',
'{{ externalId }}',
'{{ id }}',
'{{ roles }}',
'{{ account_id }}'
RETURNING
id,
account_id,
active,
applicationId,
displayName,
externalId,
roles
;
# Description fields are for documentation purposes
- name: account_service_principals
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the account_service_principals resource.
- name: active
value: {{ active }}
description: |
If this user is active
- name: applicationId
value: "{{ applicationId }}"
description: |
UUID relating to the service principal
- name: displayName
value: "{{ displayName }}"
description: |
String that represents a concatenation of given and family names.
- name: externalId
value: "{{ externalId }}"
- name: id
value: "{{ id }}"
description: |
Databricks service principal ID.
- name: roles
description: |
Indicates if the group has the admin role.
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
UPDATE examples
- account_service_principals_v2_patch
Partially updates the details of a single service principal in the Databricks account.
UPDATE databricks_account.iam.account_service_principals
SET
Operations = '{{ Operations }}',
schemas = '{{ schemas }}'
WHERE
account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required;
REPLACE examples
- account_service_principals_v2_update
Updates the details of a single service principal.
REPLACE databricks_account.iam.account_service_principals
SET
active = {{ active }},
applicationId = '{{ applicationId }}',
displayName = '{{ displayName }}',
externalId = '{{ externalId }}',
roles = '{{ roles }}'
WHERE
account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required;
DELETE examples
- account_service_principals_v2_delete
Delete a single service principal in the Databricks account.
DELETE FROM databricks_account.iam.account_service_principals
WHERE account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
;