2017/12/12 - Amazon WorkMail - 28 new api methods
Changes Today, Amazon WorkMail released an administrative SDK and enabled AWS CloudTrail integration. With the administrative SDK, you can natively integrate WorkMail with your existing services. The SDK enables programmatic user, resource, and group management through API calls. This means your existing IT tools and workflows can now automate WorkMail management, and third party applications can streamline WorkMail migrations and account actions.
Mark a user, group, or resource as no longer used in Amazon WorkMail. This action disassociates the mailbox and schedules it for clean-up. Amazon WorkMail keeps mailboxes for 30 days before they are permanently removed. The functionality in the console is Disable .
See also: AWS API Documentation
Request Syntax
client.deregister_from_work_mail( OrganizationId='string', EntityId='string' )
string
[REQUIRED]
The identifier for the organization under which the Amazon WorkMail entity exists.
string
[REQUIRED]
The identifier for the entity to be updated.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a group that can be used in Amazon WorkMail by calling the RegisterToWorkMail operation.
See also: AWS API Documentation
Request Syntax
client.create_group( OrganizationId='string', Name='string' )
string
[REQUIRED]
The organization under which the group is to be created.
string
[REQUIRED]
The name of the group.
dict
Response Syntax
{ 'GroupId': 'string' }
Response Structure
(dict) --
GroupId (string) --
The ID of the group.
Removes a member from a group.
See also: AWS API Documentation
Request Syntax
client.disassociate_member_from_group( OrganizationId='string', GroupId='string', MemberId='string' )
string
[REQUIRED]
The identifier for the organization under which the group exists.
string
[REQUIRED]
The identifier for the group from which members are removed.
string
[REQUIRED]
The identifier for the member to be removed to the group.
dict
Response Syntax
{}
Response Structure
(dict) --
Adds a member to the group's set.
See also: AWS API Documentation
Request Syntax
client.associate_member_to_group( OrganizationId='string', GroupId='string', MemberId='string' )
string
[REQUIRED]
The organization under which the group exists.
string
[REQUIRED]
The group for which the member is associated.
string
[REQUIRED]
The member to associate to the group.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes a group from Amazon WorkMail.
See also: AWS API Documentation
Request Syntax
client.delete_group( OrganizationId='string', GroupId='string' )
string
[REQUIRED]
The organization that contains the group.
string
[REQUIRED]
The identifier of the group to be deleted.
dict
Response Syntax
{}
Response Structure
(dict) --
Updates the primary email for an entity. The current email is moved into the list of aliases (or swapped between an existing alias and the current primary email) and the email provided in the input is promoted as the primary.
See also: AWS API Documentation
Request Syntax
client.update_primary_email_address( OrganizationId='string', EntityId='string', Email='string' )
string
[REQUIRED]
The organization that contains the entity to update.
string
[REQUIRED]
The entity to update (user, group, or resource).
string
[REQUIRED]
The value of the email to be updated as primary.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns summaries of the organization's users.
See also: AWS API Documentation
Request Syntax
client.list_users( OrganizationId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier for the organization under which the users exist.
string
TBD
integer
The maximum number of results to return in a single call.
dict
Response Syntax
{ 'Users': [ { 'Id': 'string', 'Email': 'string', 'Name': 'string', 'DisplayName': 'string', 'State': 'ENABLED'|'DISABLED'|'DELETED', 'UserRole': 'USER'|'RESOURCE'|'SYSTEM_USER', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Users (list) --
The overview of users for an organization.
(dict) --
The representation of an Amazon WorkMail user.
Id (string) --
The identifier of the user.
Email (string) --
The email of the user.
Name (string) --
The name of the user.
DisplayName (string) --
The display name of the user.
State (string) --
The state of the user, which can be ENABLED, DISABLED, or DELETED.
UserRole (string) --
The role of the user.
EnabledDate (datetime) --
The date indicating when the user was enabled for Amazon WorkMail use.
DisabledDate (datetime) --
The date indicating when the user was disabled from Amazon WorkMail use.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
Deletes a user from Amazon WorkMail and all subsequent systems. The action can't be undone. The mailbox is kept as-is for a minimum of 30 days, without any means to restore it.
See also: AWS API Documentation
Request Syntax
client.delete_user( OrganizationId='string', UserId='string' )
string
[REQUIRED]
The organization that contains the user.
string
[REQUIRED]
The identifier of the user to be deleted.
dict
Response Syntax
{}
Response Structure
(dict) --
Remove the alias from a set of aliases for a given user.
See also: AWS API Documentation
Request Syntax
client.delete_alias( OrganizationId='string', EntityId='string', Alias='string' )
string
[REQUIRED]
The identifier for the organization under which the user exists.
string
[REQUIRED]
The identifier for the Amazon WorkMail entity to have the aliases removed.
string
[REQUIRED]
The aliases to be removed from the user's set of aliases. Duplicate entries in the list are collapsed into single entries (the list is transformed into a set).
dict
Response Syntax
{}
Response Structure
(dict) --
Returns the data available for the group.
See also: AWS API Documentation
Request Syntax
client.describe_group( OrganizationId='string', GroupId='string' )
string
[REQUIRED]
The identifier for the organization under which the group exists.
string
[REQUIRED]
The identifier for the group to be described.
dict
Response Syntax
{ 'GroupId': 'string', 'Name': 'string', 'Email': 'string', 'State': 'ENABLED'|'DISABLED'|'DELETED', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
GroupId (string) --
The identifier of the described group.
Name (string) --
The name of the described group.
Email (string) --
The email of the described group.
State (string) --
The state of the user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).
EnabledDate (datetime) --
The date and time when a user was registered to Amazon WorkMail, in UNIX epoch time format.
DisabledDate (datetime) --
The date and time when a user was deregistered from Amazon WorkMail, in UNIX epoch time format.
Adds a member to the resource's set of delegates.
See also: AWS API Documentation
Request Syntax
client.associate_delegate_to_resource( OrganizationId='string', ResourceId='string', EntityId='string' )
string
[REQUIRED]
The organization under which the resource exists.
string
[REQUIRED]
The resource for which members are associated.
string
[REQUIRED]
The member (user or group) to associate to the resource.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a new Amazon WorkMail resource. The available types are equipment and room.
See also: AWS API Documentation
Request Syntax
client.create_resource( OrganizationId='string', Name='string', Type='ROOM'|'EQUIPMENT' )
string
[REQUIRED]
The identifier associated with the organization for which the resource is created.
string
[REQUIRED]
The name of the created resource.
string
[REQUIRED]
The type of the created resource.
dict
Response Syntax
{ 'ResourceId': 'string' }
Response Structure
(dict) --
ResourceId (string) --
The identifier of the created resource.
Removes a member from the resource's set of delegates.
See also: AWS API Documentation
Request Syntax
client.disassociate_delegate_from_resource( OrganizationId='string', ResourceId='string', EntityId='string' )
string
[REQUIRED]
The identifier for the organization under which the resource exists.
string
[REQUIRED]
The identifier of the resource from which delegates' set members are removed.
string
[REQUIRED]
The identifier for the member (user, group) to be removed from the resource's delegates.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns summaries of the organization's resources.
See also: AWS API Documentation
Request Syntax
client.list_resources( OrganizationId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier for the organization under which the resources exist.
string
The token to use to retrieve the next page of results. The first call does not contain any tokens.
integer
The maximum number of results to return in a single call.
dict
Response Syntax
{ 'Resources': [ { 'Id': 'string', 'Email': 'string', 'Name': 'string', 'Type': 'ROOM'|'EQUIPMENT', 'State': 'ENABLED'|'DISABLED'|'DELETED', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Resources (list) --
One page of the organization's resource representation.
(dict) --
The overview for a resource containing relevant data regarding it.
Id (string) --
The identifier of the resource.
Email (string) --
The email of the resource.
Name (string) --
The name of the resource.
Type (string) --
The type of the resource: equipment or room.
State (string) --
The state of the resource, which can be ENABLED, DISABLED, or DELETED.
EnabledDate (datetime) --
The date indicating when the resource was enabled for Amazon WorkMail use.
DisabledDate (datetime) --
The date indicating when the resource was disabled from Amazon WorkMail use.
NextToken (string) --
The token used to paginate through all the organization's resources. While results are still available, it has an associated value. When the last page is reached, the token is empty.
Returns the data available for the resource.
See also: AWS API Documentation
Request Syntax
client.describe_resource( OrganizationId='string', ResourceId='string' )
string
[REQUIRED]
The identifier associated with the organization for which the resource is described.
string
[REQUIRED]
The identifier of the resource to be described.
dict
Response Syntax
{ 'ResourceId': 'string', 'Email': 'string', 'Name': 'string', 'Type': 'ROOM'|'EQUIPMENT', 'BookingOptions': { 'AutoAcceptRequests': True|False, 'AutoDeclineRecurringRequests': True|False, 'AutoDeclineConflictingRequests': True|False }, 'State': 'ENABLED'|'DISABLED'|'DELETED', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
ResourceId (string) --
The identifier of the described resource.
Email (string) --
The email of the described resource.
Name (string) --
The name of the described resource.
Type (string) --
The type of the described resource.
BookingOptions (dict) --
The booking options for the described resource.
AutoAcceptRequests (boolean) --
The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.
AutoDeclineRecurringRequests (boolean) --
The resource's ability to automatically decline any recurring requests.
AutoDeclineConflictingRequests (boolean) --
The resource's ability to automatically decline any conflicting requests.
State (string) --
The state of the resource: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).
EnabledDate (datetime) --
The date and time when a resource was registered to Amazon WorkMail, in UNIX epoch time format.
DisabledDate (datetime) --
The date and time when a resource was registered from Amazon WorkMail, in UNIX epoch time format.
Returns summaries of the customer's non-deleted organizations.
See also: AWS API Documentation
Request Syntax
client.list_organizations( NextToken='string', MaxResults=123 )
string
The token to use to retrieve the next page of results. The first call does not contain any tokens.
integer
The maximum number of results to return in a single call.
dict
Response Syntax
{ 'OrganizationSummaries': [ { 'OrganizationId': 'string', 'Alias': 'string', 'ErrorMessage': 'string', 'State': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
OrganizationSummaries (list) --
The overview of owned organizations presented as a list of organization summaries.
(dict) --
The brief overview associated with an organization.
OrganizationId (string) --
The identifier associated with the organization.
Alias (string) --
The alias associated with the organization.
ErrorMessage (string) --
The error message associated with the organization. It is only present if unexpected behavior has occurred with regards to the organization. It provides insight or solutions regarding unexpected behavior.
State (string) --
The state associated with the organization.
NextToken (string) --
The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.
Allows the administrator to reset the password for a user.
See also: AWS API Documentation
Request Syntax
client.reset_password( OrganizationId='string', UserId='string', Password='string' )
string
[REQUIRED]
The identifier of the organization that contains the user for which the password is reset.
string
[REQUIRED]
The identifier of the user for whom the password is reset.
string
[REQUIRED]
The new password for the user.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns an overview of the members of a group.
See also: AWS API Documentation
Request Syntax
client.list_group_members( OrganizationId='string', GroupId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier for the organization under which the group exists.
string
[REQUIRED]
The identifier for the group to which the members are associated.
string
The token to use to retrieve the next page of results. The first call does not contain any tokens.
integer
The maximum number of results to return in a single call.
dict
Response Syntax
{ 'Members': [ { 'Id': 'string', 'Name': 'string', 'Type': 'GROUP'|'USER', 'State': 'ENABLED'|'DISABLED'|'DELETED', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Members (list) --
The members associated to the group.
(dict) --
The representation of a group member (user or group).
Id (string) --
The identifier of the member.
Name (string) --
The name of the member.
Type (string) --
A member can be a user or group.
State (string) --
The state of the member, which can be ENABLED, DISABLED, or DELETED.
EnabledDate (datetime) --
The date indicating when the member was enabled for Amazon WorkMail use.
DisabledDate (datetime) --
The date indicating when the member was disabled from Amazon WorkMail use.
NextToken (string) --
The token to use to retrieve the next page of results. The first call does not contain any tokens.
Creates a paginated call to list the aliases associated with a given entity.
See also: AWS API Documentation
Request Syntax
client.list_aliases( OrganizationId='string', EntityId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier for the organization under which the entity exists.
string
[REQUIRED]
The identifier for the entity for which to list the aliases.
string
The token to use to retrieve the next page of results. The first call does not contain any tokens.
integer
The maximum number of results to return in a single call.
dict
Response Syntax
{ 'Aliases': [ 'string', ], 'NextToken': 'string' }
Response Structure
(dict) --
Aliases (list) --
The entity's paginated aliases.
(string) --
NextToken (string) --
The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.
Registers an existing and disabled user, group, or resource/entity for Amazon WorkMail use by associating a mailbox and calendaring capabilities. It performs no change if the entity is enabled and fails if the entity is deleted. This operation results in the accumulation of costs. For more information, see Pricing . The equivalent console functionality for this operation is Enable . Users can either be created by calling the CreateUser API or they can be synchronized from your directory. For more information, see DeregisterFromWorkMail.
See also: AWS API Documentation
Request Syntax
client.register_to_work_mail( OrganizationId='string', EntityId='string', Email='string' )
string
[REQUIRED]
The identifier for the organization under which the Amazon WorkMail entity exists.
string
[REQUIRED]
The identifier for the entity to be updated.
string
[REQUIRED]
The email for the entity to be updated.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a user who can be used in Amazon WorkMail by calling the RegisterToWorkMail operation.
See also: AWS API Documentation
Request Syntax
client.create_user( OrganizationId='string', Name='string', DisplayName='string', Password='string' )
string
[REQUIRED]
The identifier of the organization for which the user is created.
string
[REQUIRED]
The name for the user to be created.
string
[REQUIRED]
The display name for the user to be created.
string
[REQUIRED]
The password for the user to be created.
dict
Response Syntax
{ 'UserId': 'string' }
Response Structure
(dict) --
UserId (string) --
The information regarding the newly created user.
Updates data for the resource. It must be preceded by a describe call in order to have the latest information. The dataset in the request should be the one expected when performing another describe call.
See also: AWS API Documentation
Request Syntax
client.update_resource( OrganizationId='string', ResourceId='string', Name='string', BookingOptions={ 'AutoAcceptRequests': True|False, 'AutoDeclineRecurringRequests': True|False, 'AutoDeclineConflictingRequests': True|False } )
string
[REQUIRED]
The identifier associated with the organization for which the resource is updated.
string
[REQUIRED]
The identifier of the resource to be updated.
string
The name of the resource to be updated.
dict
The resource's booking options to be updated.
AutoAcceptRequests (boolean) --
The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.
AutoDeclineRecurringRequests (boolean) --
The resource's ability to automatically decline any recurring requests.
AutoDeclineConflictingRequests (boolean) --
The resource's ability to automatically decline any conflicting requests.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns summaries of the organization's groups.
See also: AWS API Documentation
Request Syntax
client.list_groups( OrganizationId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier for the organization under which the groups exist.
string
The token to use to retrieve the next page of results. The first call does not contain any tokens.
integer
The maximum number of results to return in a single call.
dict
Response Syntax
{ 'Groups': [ { 'Id': 'string', 'Email': 'string', 'Name': 'string', 'State': 'ENABLED'|'DISABLED'|'DELETED', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Groups (list) --
The overview of groups for an organization.
(dict) --
The representation of an Amazon WorkMail group.
Id (string) --
The identifier of the group.
Email (string) --
The email of the group.
Name (string) --
The name of the group.
State (string) --
The state of the group, which can be ENABLED, DISABLED, or DELETED.
EnabledDate (datetime) --
The date indicating when the group was enabled for Amazon WorkMail use.
DisabledDate (datetime) --
The date indicating when the group was disabled from Amazon WorkMail use.
NextToken (string) --
The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.
Lists the delegates associated with a resource. Users and groups can be resource delegates and answer requests on behalf of the resource.
See also: AWS API Documentation
Request Syntax
client.list_resource_delegates( OrganizationId='string', ResourceId='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier for the organization that contains the resource for which delegates are listed.
string
[REQUIRED]
The identifier for the resource whose delegates are listed.
string
The token used to paginate through the delegates associated with a resource.
integer
The number of maximum results in a page.
dict
Response Syntax
{ 'Delegates': [ { 'Id': 'string', 'Type': 'GROUP'|'USER' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Delegates (list) --
One page of the resource's delegates.
(dict) --
The name of the attribute, which is one of the values defined in the UserAttribute enumeration.
Id (string) --
The identifier for the user or group is associated as the resource's delegate.
Type (string) --
The type of the delegate: user or group.
NextToken (string) --
The token used to paginate through the delegates associated with a resource. While results are still available, it has an associated value. When the last page is reached, the token is empty.
Adds an alias to the set of a given member of Amazon WorkMail.
See also: AWS API Documentation
Request Syntax
client.create_alias( OrganizationId='string', EntityId='string', Alias='string' )
string
[REQUIRED]
The organization under which the member exists.
string
[REQUIRED]
The alias is added to this Amazon WorkMail entity.
string
[REQUIRED]
The alias to add to the user.
dict
Response Syntax
{}
Response Structure
(dict) --
Provides more information regarding a given organization based on its identifier.
See also: AWS API Documentation
Request Syntax
client.describe_organization( OrganizationId='string' )
string
[REQUIRED]
The identifier for the organization to be described.
dict
Response Syntax
{ 'OrganizationId': 'string', 'Alias': 'string', 'State': 'string', 'DirectoryId': 'string', 'DirectoryType': 'string', 'DefaultMailDomain': 'string', 'CompletedDate': datetime(2015, 1, 1), 'ErrorMessage': 'string' }
Response Structure
(dict) --
OrganizationId (string) --
The identifier of an organization.
Alias (string) --
The alias for an organization.
State (string) --
The state of an organization.
DirectoryId (string) --
The identifier for the directory associated with an Amazon WorkMail organization.
DirectoryType (string) --
The type of directory associated with the Amazon WorkMail organization.
DefaultMailDomain (string) --
The default mail domain associated with the organization.
CompletedDate (datetime) --
The date at which the organization became usable in the Amazon WorkMail context, in UNIX epoch time format.
ErrorMessage (string) --
The (optional) error message indicating if unexpected behavior was encountered with regards to the organization.
Provides information regarding the user.
See also: AWS API Documentation
Request Syntax
client.describe_user( OrganizationId='string', UserId='string' )
string
[REQUIRED]
The identifier for the organization under which the user exists.
string
[REQUIRED]
The identifier for the user to be described.
dict
Response Syntax
{ 'UserId': 'string', 'Name': 'string', 'Email': 'string', 'DisplayName': 'string', 'State': 'ENABLED'|'DISABLED'|'DELETED', 'UserRole': 'USER'|'RESOURCE'|'SYSTEM_USER', 'EnabledDate': datetime(2015, 1, 1), 'DisabledDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
UserId (string) --
The identifier for the described user.
Name (string) --
The name for the user.
Email (string) --
The email of the user.
DisplayName (string) --
The display name of the user.
State (string) --
The state of a user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).
UserRole (string) --
In certain cases other entities are modeled as users. If interoperability is enabled, resources are imported into Amazon WorkMail as users. Because different Amazon WorkMail organizations rely on different directory types, administrators can distinguish between a user that is not registered to Amazon WorkMail (is disabled and has a user role) and the administrative users of the directory. The values are USER, RESOURCE, and SYSTEM_USER.
EnabledDate (datetime) --
The date and time at which the user was enabled for Amazon WorkMail usage, in UNIX epoch time format.
DisabledDate (datetime) --
The date and time at which the user was disabled for Amazon WorkMail usage, in UNIX epoch time format.
Deletes the specified resource.
See also: AWS API Documentation
Request Syntax
client.delete_resource( OrganizationId='string', ResourceId='string' )
string
[REQUIRED]
The identifier associated with the organization for which the resource is deleted.
string
[REQUIRED]
The identifier of the resource to be deleted.
dict
Response Syntax
{}
Response Structure
(dict) --