service_principals
Creates, updates, deletes, gets or lists a service_principals
resource.
Overview
Name | service_principals |
Type | Resource |
Id | databricks_workspace.iam.service_principals |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Service principal information was returned successfully.
Name | Datatype | Description |
---|---|---|
id | string | |
active | boolean | |
applicationId | string | |
displayName | string | |
entitlements | array | |
externalId | string | |
groups | array | |
roles | array | |
schemas | array |
List service principals operation was succesful.
Name | Datatype | Description |
---|---|---|
id | string | |
active | boolean | |
applicationId | string | |
displayName | string | |
entitlements | array | |
externalId | string | |
groups | array | |
roles | array | |
schemas | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Gets the details for a single service principal define in the Databricks workspace. | |
list | select | deployment_name | Gets the set of service principals associated with a Databricks workspace. | |
create | insert | deployment_name | Creates a new service principal in the Databricks workspace. | |
update | update | deployment_name | Updates the details of a single service principal. | |
patch | update | deployment_name | Partially updates the details of a single service principal in the Databricks workspace. | |
delete | delete | deployment_name | Delete a single service principal in the Databricks workspace. |
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 details for a single service principal define in the Databricks workspace.
SELECT
id,
active,
applicationId,
displayName,
entitlements,
externalId,
groups,
roles,
schemas
FROM databricks_workspace.iam.service_principals
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets the set of service principals associated with a Databricks workspace.
SELECT
id,
active,
applicationId,
displayName,
entitlements,
externalId,
groups,
roles,
schemas
FROM databricks_workspace.iam.service_principals
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new service principal in the Databricks workspace.
INSERT INTO databricks_workspace.iam.service_principals (
data__schemas,
data__id,
data__applicationId,
data__displayName,
data__externalId,
data__active,
data__groups,
data__roles,
data__entitlements,
deployment_name
)
SELECT
'{{ schemas }}',
{{ id }},
'{{ applicationId }}',
'{{ displayName }}',
'{{ externalId }}',
{{ active }},
'{{ groups }}',
'{{ roles }}',
'{{ entitlements }}',
'{{ deployment_name }}'
;
# Description fields are for documentation purposes
- name: service_principals
props:
- name: deployment_name
value: string
description: Required parameter for the service_principals resource.
- name: schemas
value: Array of string
- name: id
value: integer
- name: applicationId
value: uuid
- name: displayName
value: string
- name: externalId
value: string
- name: active
value: boolean
- name: groups
value: Array of object
- name: roles
value: Array of object
- name: entitlements
value: Array of object
UPDATE
examples
- update
- patch
Updates the details of a single service principal.
UPDATE databricks_workspace.iam.service_principals
SET
data__schemas = '{{ schemas }}',
data__id = {{ id }},
data__applicationId = '{{ applicationId }}',
data__displayName = '{{ displayName }}',
data__externalId = '{{ externalId }}',
data__active = {{ active }},
data__groups = '{{ groups }}',
data__roles = '{{ roles }}',
data__entitlements = '{{ entitlements }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
Partially updates the details of a single service principal in the Databricks workspace.
UPDATE databricks_workspace.iam.service_principals
SET
data__schemas = '{{ schemas }}',
data__Operations = '{{ Operations }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
DELETE
examples
- delete
Delete a single service principal in the Databricks workspace.
DELETE FROM databricks_workspace.iam.service_principals
WHERE deployment_name = '{{ deployment_name }}' --required;