groups
Creates, updates, deletes, gets or lists a groups resource.
Overview
| Name | groups |
| Type | Resource |
| Id | aws.ds_data.groups |
Fields
The following fields are returned by SELECT queries:
- search_groups
- describe_group
- list_groups
| Name | Datatype | Description |
|---|---|---|
distinguished_name | string | The distinguished name of the object. |
group_scope | string | The scope of the AD group. For details, see Active Directory security groups (DomainLocal, Global, Universal, BuiltinLocal) |
group_type | string | The AD group type. For details, see Active Directory security group type. (Distribution, Security) |
other_attributes | object | An expression of one or more attributes, data types, and the values of a group. |
sam_account_name | string | The name of the group. (pattern: <code>^[^:;|=+"*?<>/\,[]@]+$</code>) |
sid | string | The unique security identifier (SID) of the group. |
| Name | Datatype | Description |
|---|---|---|
directory_id | string | The identifier (ID) of the directory that's associated with the group. (pattern: <code>^d-[0-9a-f]{10}$</code>) |
distinguished_name | string | The distinguished name of the object. |
group_scope | string | The scope of the AD group. For details, see Active Directory security groups. (DomainLocal, Global, Universal, BuiltinLocal) |
group_type | string | The AD group type. For details, see Active Directory security group type. (Distribution, Security) |
other_attributes | object | The attribute values that are returned for the attribute names that are included in the request. |
realm | string | The domain name that's associated with the group. (pattern: <code>^([a-zA-Z0-9]+[\.-])+([a-zA-Z0-9])+[.]?$</code>) |
sam_account_name | string | The name of the group. (pattern: <code>^[^:;|=+"*?<>/\,[]@]+$</code>) |
sid | string | The unique security identifier (SID) of the group. |
| Name | Datatype | Description |
|---|---|---|
group_scope | string | The scope of the AD group. For details, see Active Directory security groups. (DomainLocal, Global, Universal, BuiltinLocal) |
group_type | string | The AD group type. For details, see Active Directory security group type. (Distribution, Security) |
sam_account_name | string | The name of the group. (pattern: <code>^[^:;|=+"*?<>/\,[]@]+$</code>) |
sid | string | The unique security identifier (SID) of the group. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_groups | select | DirectoryId, region | Searches the specified directory for a group. You can find groups that match the SearchString parameter with the value of their attributes included in the SearchString parameter. This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the SearchGroups.NextToken member contains a token that you pass in the next call to SearchGroups. This retrieves the next set of items. You can also specify a maximum number of return results with the MaxResults parameter. | |
describe_group | select | DirectoryId, region | Returns information about a specific group. | |
list_groups | select | DirectoryId, region | Returns group information for the specified directory. This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the ListGroups.NextToken member contains a token that you pass in the next call to ListGroups. This retrieves the next set of items. You can also specify a maximum number of return results with the MaxResults parameter. | |
create_group | insert | DirectoryId, region, SAMAccountName | Creates a new group. | |
update_group | update | DirectoryId, region, SAMAccountName | Updates group information. | |
delete_group | delete | DirectoryId, region | Deletes 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 |
|---|---|---|
DirectoryId | string | The identifier (ID) of the directory that's associated with the group. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- search_groups
- describe_group
- list_groups
Searches the specified directory for a group. You can find groups that match the SearchString parameter with the value of their attributes included in the SearchString parameter. This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the SearchGroups.NextToken member contains a token that you pass in the next call to SearchGroups. This retrieves the next set of items. You can also specify a maximum number of return results with the MaxResults parameter.
SELECT
distinguished_name,
group_scope,
group_type,
other_attributes,
sam_account_name,
sid
FROM aws.ds_data.groups
WHERE DirectoryId = '{{ DirectoryId }}' -- required
AND region = '{{ region }}' -- required
;
Returns information about a specific group.
SELECT
directory_id,
distinguished_name,
group_scope,
group_type,
other_attributes,
realm,
sam_account_name,
sid
FROM aws.ds_data.groups
WHERE DirectoryId = '{{ DirectoryId }}' -- required
AND region = '{{ region }}' -- required
;
Returns group information for the specified directory. This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the ListGroups.NextToken member contains a token that you pass in the next call to ListGroups. This retrieves the next set of items. You can also specify a maximum number of return results with the MaxResults parameter.
SELECT
group_scope,
group_type,
sam_account_name,
sid
FROM aws.ds_data.groups
WHERE DirectoryId = '{{ DirectoryId }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_group
- Manifest
Creates a new group.
INSERT INTO aws.ds_data.groups (
ClientToken,
GroupScope,
GroupType,
OtherAttributes,
SAMAccountName,
DirectoryId,
region
)
SELECT
'{{ ClientToken }}',
'{{ GroupScope }}',
'{{ GroupType }}',
'{{ OtherAttributes }}',
'{{ SAMAccountName }}' /* required */,
'{{ DirectoryId }}',
'{{ region }}'
RETURNING
directory_id,
sam_account_name,
sid
;
# Description fields are for documentation purposes
- name: groups
props:
- name: DirectoryId
value: "{{ DirectoryId }}"
description: Required parameter for the groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the groups resource.
- name: ClientToken
value: "{{ ClientToken }}"
- name: GroupScope
value: "{{ GroupScope }}"
valid_values: ['DomainLocal', 'Global', 'Universal', 'BuiltinLocal']
- name: GroupType
value: "{{ GroupType }}"
valid_values: ['Distribution', 'Security']
- name: OtherAttributes
value: "{{ OtherAttributes }}"
- name: SAMAccountName
value: "{{ SAMAccountName }}"
UPDATE examples
- update_group
Updates group information.
UPDATE aws.ds_data.groups
SET
ClientToken = '{{ ClientToken }}',
GroupScope = '{{ GroupScope }}',
GroupType = '{{ GroupType }}',
OtherAttributes = '{{ OtherAttributes }}',
SAMAccountName = '{{ SAMAccountName }}',
UpdateType = '{{ UpdateType }}'
WHERE
DirectoryId = '{{ DirectoryId }}' --required
AND region = '{{ region }}' --required
AND SAMAccountName = '{{ SAMAccountName }}' --required;
DELETE examples
- delete_group
Deletes a group.
DELETE FROM aws.ds_data.groups
WHERE DirectoryId = '{{ DirectoryId }}' --required
AND region = '{{ region }}' --required
;