Skip to main content

groups

Creates, updates, deletes, gets or lists a groups resource.

Overview

Namegroups
TypeResource
Idaws.workmail.groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
disabled_datestring (date-time)The date and time when a user was deregistered from WorkMail, in UNIX epoch time format.
emailstringThe email of the described group. (pattern: <code>[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+.[a-zA-Z-]{2,}</code>)
enabled_datestring (date-time)The date and time when a user was registered to WorkMail, in UNIX epoch time format.
group_idstringThe identifier of the described group.
hidden_from_global_address_listbooleanIf the value is set to true, the group is hidden from the address book.
namestringThe name of the described group. (pattern: <code>[\u0020-\u00FF]+</code>)
statestringThe state of the user: enabled (registered to WorkMail) or disabled (deregistered or never registered to WorkMail). (ENABLED, DISABLED, DELETED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_groupselectregionReturns the data available for the group.
list_groupsselectregionReturns summaries of the organization's groups.
create_groupinsertregion, OrganizationIdCreates a group that can be used in WorkMail by calling the RegisterToWorkMail operation.
associate_member_to_groupupdateregion, OrganizationId, GroupId, MemberIdAdds a member (user or group) to the group's set.
update_groupupdateregion, OrganizationId, GroupIdUpdates attributes in a group.
delete_groupdeleteregionDeletes a group from WorkMail.
disassociate_member_from_groupexecregion, OrganizationId, GroupId, MemberIdRemoves 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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;

DELETE examples

Deletes a group from WorkMail.

DELETE FROM aws.workmail.groups
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Removes a member from a group.

EXEC aws.workmail.groups.disassociate_member_from_group
@region='{{ region }}' --required
@@json=
'{
"OrganizationId": "{{ OrganizationId }}",
"GroupId": "{{ GroupId }}",
"MemberId": "{{ MemberId }}"
}'
;