direct_group_members
Creates, updates, deletes, gets or lists a direct_group_members resource.
Overview​
| Name | direct_group_members |
| Type | Resource |
| Id | databricks_account.iamv2.direct_group_members |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
external_id | string | The external ID of the principal in the customer's IdP. |
group_id | integer | The internal ID of the group this member belongs to. |
principal_id | integer | Internal ID of the principal in Databricks. |
display_name | string | Display name of the principal. |
membership_source | string | The source of group membership (internal or from identity provider). (IDENTITY_PROVIDER, INTERNAL) |
principal_type | string | The type of the principal (user/service principal/group). (GROUP, SERVICE_PRINCIPAL, USER) |
| Name | Datatype | Description |
|---|---|---|
external_id | string | The external ID of the principal in the customer's IdP. |
group_id | integer | The internal ID of the group this member belongs to. |
principal_id | integer | Internal ID of the principal in Databricks. |
display_name | string | Display name of the principal. |
membership_source | string | The source of group membership (internal or from identity provider). (IDENTITY_PROVIDER, INTERNAL) |
principal_type | string | The type of the principal (user/service principal/group). (GROUP, SERVICE_PRINCIPAL, USER) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, group_id, principal_id, account_host | Gets a provisioned direct member of a group. | |
list | select | account_id, group_id, account_host | page_size, page_token | Lists provisioned direct members of a group with their membership source (internal or from identity |
create | insert | account_id, group_id, account_host, principal_id | Creates a group membership (assigns a principal to a group). | |
delete | delete | account_id, group_id, principal_id, account_host | Deletes a group membership (unassigns a principal from a group). |
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_host | string | The Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}}) |
account_id | string | |
group_id | integer | Required. Internal ID of the group in Databricks. |
principal_id | integer | Required. Internal ID of the principal to be unassigned from the group. |
page_size | integer | The maximum number of members to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000. |
page_token | string | A page token, received from a previous ListDirectGroupMembers call. Provide this to retrieve the subsequent page. |
SELECT examples​
- get
- list
Gets a provisioned direct member of a group.
SELECT
external_id,
group_id,
principal_id,
display_name,
membership_source,
principal_type
FROM databricks_account.iamv2.direct_group_members
WHERE account_id = '{{ account_id }}' -- required
AND group_id = '{{ group_id }}' -- required
AND principal_id = '{{ principal_id }}' -- required
AND account_host = '{{ account_host }}' -- required
;
Lists provisioned direct members of a group with their membership source (internal or from identity
SELECT
external_id,
group_id,
principal_id,
display_name,
membership_source,
principal_type
FROM databricks_account.iamv2.direct_group_members
WHERE account_id = '{{ account_id }}' -- required
AND group_id = '{{ group_id }}' -- required
AND account_host = '{{ account_host }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples​
- create
- Manifest
Creates a group membership (assigns a principal to a group).
INSERT INTO databricks_account.iamv2.direct_group_members (
principal_id,
display_name,
external_id,
group_id,
membership_source,
principal_type,
account_id,
group_id,
account_host
)
SELECT
{{ principal_id }} /* required */,
'{{ display_name }}',
'{{ external_id }}',
{{ group_id }},
'{{ membership_source }}',
'{{ principal_type }}',
'{{ account_id }}',
{{ group_id }},
'{{ account_host }}'
RETURNING
external_id,
group_id,
principal_id,
display_name,
membership_source,
principal_type
;
# Description fields are for documentation purposes
- name: direct_group_members
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the direct_group_members resource.
- name: group_id
value: {{ group_id }}
description: Required parameter for the direct_group_members resource.
- name: account_host
value: "{{ account_host }}"
description: Required parameter for the direct_group_members resource.
- name: principal_id
value: {{ principal_id }}
description: |
Internal ID of the principal in Databricks.
- name: display_name
value: "{{ display_name }}"
description: |
Display name of the principal.
- name: external_id
value: "{{ external_id }}"
description: |
The external ID of the principal in the customer's IdP.
- name: group_id
value: {{ group_id }}
description: |
The internal ID of the group this member belongs to.
- name: membership_source
value: "{{ membership_source }}"
description: |
The source of group membership (internal or from identity provider).
- name: principal_type
value: "{{ principal_type }}"
description: |
The type of the principal (user/service principal/group).
DELETE examples​
- delete
Deletes a group membership (unassigns a principal from a group).
DELETE FROM databricks_account.iamv2.direct_group_members
WHERE account_id = '{{ account_id }}' --required
AND group_id = '{{ group_id }}' --required
AND principal_id = '{{ principal_id }}' --required
AND account_host = '{{ account_host }}' --required
;