groups
Creates, updates, deletes, gets or lists a groups resource.
Overview
| Name | groups |
| Type | Resource |
| Id | aws.workmail.groups |
Fields
The following fields are returned by SELECT queries:
- describe_group
- list_groups
| Name | Datatype | Description |
|---|---|---|
disabled_date | string (date-time) | The date and time when a user was deregistered from WorkMail, in UNIX epoch time format. |
email | string | The email of the described group. (pattern: <code>[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+.[a-zA-Z-]{2,}</code>) |
enabled_date | string (date-time) | The date and time when a user was registered to WorkMail, in UNIX epoch time format. |
group_id | string | The identifier of the described group. |
hidden_from_global_address_list | boolean | If the value is set to true, the group is hidden from the address book. |
name | string | The name of the described group. (pattern: <code>[\u0020-\u00FF]+</code>) |
state | string | The state of the user: enabled (registered to WorkMail) or disabled (deregistered or never registered to WorkMail). (ENABLED, DISABLED, DELETED) |
| Name | Datatype | Description |
|---|---|---|
disabled_date | string (date-time) | The date indicating when the group was disabled from WorkMail use. |
email | string | The email of the group. (pattern: <code>[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+.[a-zA-Z-]{2,}</code>) |
enabled_date | string (date-time) | The date indicating when the group was enabled for WorkMail use. |
id | string | The identifier of the group. |
name | string | The name of the group. (pattern: <code>[\u0020-\u00FF]+</code>) |
state | string | The state of the group, which can be ENABLED, DISABLED, or DELETED. (ENABLED, DISABLED, DELETED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_group | select | region | Returns the data available for the group. | |
list_groups | select | region | Returns summaries of the organization's groups. | |
create_group | insert | region, OrganizationId | Creates a group that can be used in WorkMail by calling the RegisterToWorkMail operation. | |
associate_member_to_group | update | region, OrganizationId, GroupId, MemberId | Adds a member (user or group) to the group's set. | |
update_group | update | region, OrganizationId, GroupId | Updates attributes in a group. | |
delete_group | delete | region | Deletes a group from WorkMail. | |
disassociate_member_from_group | exec | region, OrganizationId, GroupId, MemberId | Removes a member 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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_group
- list_groups
Returns the data available for the group.
SELECT
disabled_date,
email,
enabled_date,
group_id,
hidden_from_global_address_list,
name,
state
FROM aws.workmail.groups
WHERE region = '{{ region }}' -- required
;
Returns summaries of the organization's groups.
SELECT
disabled_date,
email,
enabled_date,
id,
name,
state
FROM aws.workmail.groups
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_group
- Manifest
Creates a group that can be used in WorkMail by calling the RegisterToWorkMail operation.
INSERT INTO aws.workmail.groups (
OrganizationId,
Name,
HiddenFromGlobalAddressList,
region
)
SELECT
'{{ OrganizationId }}' /* required */,
'{{ Name }}',
{{ HiddenFromGlobalAddressList }},
'{{ region }}'
RETURNING
group_id
;
# Description fields are for documentation purposes
- name: groups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the groups resource.
- name: OrganizationId
value: "{{ OrganizationId }}"
description: |
The organization under which the group is to be created.
- name: Name
value: "{{ Name }}"
description: |
The name of the group.
- name: HiddenFromGlobalAddressList
value: {{ HiddenFromGlobalAddressList }}
description: |
If this parameter is enabled, the group will be hidden from the address book.
UPDATE examples
- associate_member_to_group
- update_group
Adds a member (user or group) to the group's set.
UPDATE aws.workmail.groups
SET
OrganizationId = '{{ OrganizationId }}',
GroupId = '{{ GroupId }}',
MemberId = '{{ MemberId }}'
WHERE
region = '{{ region }}' --required
AND OrganizationId = '{{ OrganizationId }}' --required
AND GroupId = '{{ GroupId }}' --required
AND MemberId = '{{ MemberId }}' --required;
Updates attributes in a group.
UPDATE aws.workmail.groups
SET
OrganizationId = '{{ OrganizationId }}',
GroupId = '{{ GroupId }}',
HiddenFromGlobalAddressList = {{ HiddenFromGlobalAddressList }}
WHERE
region = '{{ region }}' --required
AND OrganizationId = '{{ OrganizationId }}' --required
AND GroupId = '{{ GroupId }}' --required;
DELETE examples
- delete_group
Deletes a group from WorkMail.
DELETE FROM aws.workmail.groups
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disassociate_member_from_group
Removes a member from a group.
EXEC aws.workmail.groups.disassociate_member_from_group
@region='{{ region }}' --required
@@json=
'{
"OrganizationId": "{{ OrganizationId }}",
"GroupId": "{{ GroupId }}",
"MemberId": "{{ MemberId }}"
}'
;