Table of Contents
A low-level client representing Amazon WorkMail
Amazon WorkMail is a secure, managed business email and calendaring service with support for existing desktop and mobile email clients. You can access your email, contacts, and calendars using Microsoft Outlook, your browser, or other native iOS and Android email applications. You can integrate WorkMail with your existing corporate directory and control both the keys that encrypt your data and the location in which your data is stored.
The WorkMail API is designed for the following scenarios:
All WorkMail API operations are Amazon-authenticated and certificate-signed. They not only require the use of the AWS SDK, but also allow for the exclusive use of AWS Identity and Access Management users and roles to help facilitate access, trust, and permission policies. By creating a role and allowing an IAM user to access the WorkMail site, the IAM user gains full administrative visibility into the entire WorkMail organization (or as set in the IAM policy). This includes, but is not limited to, the ability to create, update, and delete users, groups, and resources. This allows developers to perform the scenarios listed above, as well as give users the ability to grant access on a selective basis using the IAM model.
import boto3
client = boto3.client('workmail')
These are the available methods:
Adds a member (user or group) to the resource's set of delegates.
See also: AWS API Documentation
Request Syntax
response = client.associate_delegate_to_resource(
OrganizationId='string',
ResourceId='string',
EntityId='string'
)
[REQUIRED]
The organization under which the resource exists.
[REQUIRED]
The resource for which members (users or groups) are associated.
[REQUIRED]
The member (user or group) to associate to the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
Adds a member (user or group) to the group's set.
See also: AWS API Documentation
Request Syntax
response = client.associate_member_to_group(
OrganizationId='string',
GroupId='string',
MemberId='string'
)
[REQUIRED]
The organization under which the group exists.
[REQUIRED]
The group to which the member (user or group) is associated.
[REQUIRED]
The member (user or group) to associate to the group.
dict
Response Syntax
{}
Response Structure
Exceptions
Check if an operation can be paginated.
Cancels a mailbox export job.
Note
If the mailbox export job is near completion, it might not be possible to cancel it.
See also: AWS API Documentation
Request Syntax
response = client.cancel_mailbox_export_job(
ClientToken='string',
JobId='string',
OrganizationId='string'
)
[REQUIRED]
The idempotency token for the client request.
This field is autopopulated if not provided.
[REQUIRED]
The job ID.
[REQUIRED]
The organization ID.
dict
Response Syntax
{}
Response Structure
Exceptions
Adds an alias to the set of a given member (user or group) of Amazon WorkMail.
See also: AWS API Documentation
Request Syntax
response = client.create_alias(
OrganizationId='string',
EntityId='string',
Alias='string'
)
[REQUIRED]
The organization under which the member (user or group) exists.
[REQUIRED]
The member (user or group) to which this alias is added.
[REQUIRED]
The alias to add to the member set.
dict
Response Syntax
{}
Response Structure
Exceptions
Creates a group that can be used in Amazon WorkMail by calling the RegisterToWorkMail operation.
See also: AWS API Documentation
Request Syntax
response = client.create_group(
OrganizationId='string',
Name='string'
)
[REQUIRED]
The organization under which the group is to be created.
[REQUIRED]
The name of the group.
dict
Response Syntax
{
'GroupId': 'string'
}
Response Structure
(dict) --
GroupId (string) --
The identifier of the group.
Exceptions
Creates a new mobile device access rule for the specified Amazon WorkMail organization.
See also: AWS API Documentation
Request Syntax
response = client.create_mobile_device_access_rule(
OrganizationId='string',
ClientToken='string',
Name='string',
Description='string',
Effect='ALLOW'|'DENY',
DeviceTypes=[
'string',
],
NotDeviceTypes=[
'string',
],
DeviceModels=[
'string',
],
NotDeviceModels=[
'string',
],
DeviceOperatingSystems=[
'string',
],
NotDeviceOperatingSystems=[
'string',
],
DeviceUserAgents=[
'string',
],
NotDeviceUserAgents=[
'string',
]
)
[REQUIRED]
The Amazon WorkMail organization under which the rule will be created.
The idempotency token for the client request.
This field is autopopulated if not provided.
[REQUIRED]
The rule name.
[REQUIRED]
The effect of the rule when it matches. Allowed values are ALLOW or DENY .
Device types that the rule will match.
Device types that the rule will not match. All other device types will match.
Device models that the rule will match.
Device models that the rule will not match. All other device models will match.
Device operating systems that the rule will match.
Device operating systems that the rule will not match. All other device operating systems will match.
Device user agents that the rule will match.
Device user agents that the rule will not match. All other device user agents will match.
dict
Response Syntax
{
'MobileDeviceAccessRuleId': 'string'
}
Response Structure
(dict) --
MobileDeviceAccessRuleId (string) --
The identifier for the newly created mobile device access rule.
Exceptions
Creates a new Amazon WorkMail organization. Optionally, you can choose to associate an existing AWS Directory Service directory with your organization. If an AWS Directory Service directory ID is specified, the organization alias must match the directory alias. If you choose not to associate an existing directory with your organization, then we create a new Amazon WorkMail directory for you. For more information, see Adding an organization in the Amazon WorkMail Administrator Guide .
You can associate multiple email domains with an organization, then set your default email domain from the Amazon WorkMail console. You can also associate a domain that is managed in an Amazon Route 53 public hosted zone. For more information, see Adding a domain and Choosing the default domain in the Amazon WorkMail Administrator Guide .
Optionally, you can use a customer managed master key from AWS Key Management Service (AWS KMS) to encrypt email for your organization. If you don't associate an AWS KMS key, Amazon WorkMail creates a default AWS managed master key for you.
See also: AWS API Documentation
Request Syntax
response = client.create_organization(
DirectoryId='string',
Alias='string',
ClientToken='string',
Domains=[
{
'DomainName': 'string',
'HostedZoneId': 'string'
},
],
KmsKeyArn='string',
EnableInteroperability=True|False
)
[REQUIRED]
The organization alias.
The idempotency token associated with the request.
This field is autopopulated if not provided.
The email domains to associate with the organization.
The domain to associate with an Amazon WorkMail organization.
When you configure a domain hosted in Amazon Route 53 (Route 53), all recommended DNS records are added to the organization when you create it. For more information, see Adding a domain in the Amazon WorkMail Administrator Guide .
The fully qualified domain name.
The hosted zone ID for a domain hosted in Route 53. Required when configuring a domain hosted in Route 53.
dict
Response Syntax
{
'OrganizationId': 'string'
}
Response Structure
(dict) --
OrganizationId (string) --
The organization ID.
Exceptions
Creates a new Amazon WorkMail resource.
See also: AWS API Documentation
Request Syntax
response = client.create_resource(
OrganizationId='string',
Name='string',
Type='ROOM'|'EQUIPMENT'
)
[REQUIRED]
The identifier associated with the organization for which the resource is created.
[REQUIRED]
The name of the new resource.
[REQUIRED]
The type of the new resource. The available types are equipment and room .
dict
Response Syntax
{
'ResourceId': 'string'
}
Response Structure
(dict) --
ResourceId (string) --
The identifier of the new resource.
Exceptions
Creates a user who can be used in Amazon WorkMail by calling the RegisterToWorkMail operation.
See also: AWS API Documentation
Request Syntax
response = client.create_user(
OrganizationId='string',
Name='string',
DisplayName='string',
Password='string'
)
[REQUIRED]
The identifier of the organization for which the user is created.
[REQUIRED]
The name for the new user. WorkMail directory user names have a maximum length of 64. All others have a maximum length of 20.
[REQUIRED]
The display name for the new user.
[REQUIRED]
The password for the new user.
dict
Response Syntax
{
'UserId': 'string'
}
Response Structure
(dict) --
UserId (string) --
The identifier for the new user.
Exceptions
Deletes an access control rule for the specified WorkMail organization.
Note
Deleting already deleted and non-existing rules does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.
See also: AWS API Documentation
Request Syntax
response = client.delete_access_control_rule(
OrganizationId='string',
Name='string'
)
[REQUIRED]
The identifier for the organization.
[REQUIRED]
The name of the access control rule.
dict
Response Syntax
{}
Response Structure
Exceptions
Remove one or more specified aliases from a set of aliases for a given user.
See also: AWS API Documentation
Request Syntax
response = client.delete_alias(
OrganizationId='string',
EntityId='string',
Alias='string'
)
[REQUIRED]
The identifier for the organization under which the user exists.
[REQUIRED]
The identifier for the member (user or group) from which to have the aliases removed.
[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
Exceptions
Deletes a group from Amazon WorkMail.
See also: AWS API Documentation
Request Syntax
response = client.delete_group(
OrganizationId='string',
GroupId='string'
)
[REQUIRED]
The organization that contains the group.
[REQUIRED]
The identifier of the group to be deleted.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes permissions granted to a member (user or group).
See also: AWS API Documentation
Request Syntax
response = client.delete_mailbox_permissions(
OrganizationId='string',
EntityId='string',
GranteeId='string'
)
[REQUIRED]
The identifier of the organization under which the member (user or group) exists.
[REQUIRED]
The identifier of the member (user or group) that owns the mailbox.
[REQUIRED]
The identifier of the member (user or group) for which to delete granted permissions.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes the mobile device access override for the given WorkMail organization, user, and device.
Note
Deleting already deleted and non-existing overrides does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.
See also: AWS API Documentation
Request Syntax
response = client.delete_mobile_device_access_override(
OrganizationId='string',
UserId='string',
DeviceId='string'
)
[REQUIRED]
The Amazon WorkMail organization for which the access override will be deleted.
[REQUIRED]
The WorkMail user for which you want to delete the override. Accepts the following types of user identities:
[REQUIRED]
The mobile device for which you delete the override. DeviceId is case insensitive.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes a mobile device access rule for the specified Amazon WorkMail organization.
Note
Deleting already deleted and non-existing rules does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.
See also: AWS API Documentation
Request Syntax
response = client.delete_mobile_device_access_rule(
OrganizationId='string',
MobileDeviceAccessRuleId='string'
)
[REQUIRED]
The Amazon WorkMail organization under which the rule will be deleted.
[REQUIRED]
The identifier of the rule to be deleted.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes an Amazon WorkMail organization and all underlying AWS resources managed by Amazon WorkMail as part of the organization. You can choose whether to delete the associated directory. For more information, see Removing an organization in the Amazon WorkMail Administrator Guide .
See also: AWS API Documentation
Request Syntax
response = client.delete_organization(
ClientToken='string',
OrganizationId='string',
DeleteDirectory=True|False
)
The idempotency token associated with the request.
This field is autopopulated if not provided.
[REQUIRED]
The organization ID.
[REQUIRED]
If true, deletes the AWS Directory Service directory associated with the organization.
dict
Response Syntax
{
'OrganizationId': 'string',
'State': 'string'
}
Response Structure
(dict) --
OrganizationId (string) --
The organization ID.
State (string) --
The state of the organization.
Exceptions
Deletes the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource(
OrganizationId='string',
ResourceId='string'
)
[REQUIRED]
The identifier associated with the organization from which the resource is deleted.
[REQUIRED]
The identifier of the resource to be deleted.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes the specified retention policy from the specified organization.
See also: AWS API Documentation
Request Syntax
response = client.delete_retention_policy(
OrganizationId='string',
Id='string'
)
[REQUIRED]
The organization ID.
[REQUIRED]
The retention policy ID.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes a user from Amazon WorkMail and all subsequent systems. Before you can delete a user, the user state must be DISABLED . Use the DescribeUser action to confirm the user state.
Deleting a user is permanent and cannot be undone. WorkMail archives user mailboxes for 30 days before they are permanently removed.
See also: AWS API Documentation
Request Syntax
response = client.delete_user(
OrganizationId='string',
UserId='string'
)
[REQUIRED]
The organization that contains the user to be deleted.
[REQUIRED]
The identifier of the user to be deleted.
dict
Response Syntax
{}
Response Structure
Exceptions
Mark a user, group, or resource as no longer used in Amazon WorkMail. This action disassociates the mailbox and schedules it for clean-up. 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
response = client.deregister_from_work_mail(
OrganizationId='string',
EntityId='string'
)
[REQUIRED]
The identifier for the organization under which the Amazon WorkMail entity exists.
[REQUIRED]
The identifier for the member (user or group) to be updated.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes a domain from Amazon WorkMail, stops email routing to WorkMail, and removes the authorization allowing WorkMail use. SES keeps the domain because other applications may use it. You must first remove any email address used by WorkMail entities before you remove the domain.
See also: AWS API Documentation
Request Syntax
response = client.deregister_mail_domain(
OrganizationId='string',
DomainName='string'
)
[REQUIRED]
The Amazon WorkMail organization for which the domain will be deregistered.
[REQUIRED]
The domain to deregister in WorkMail and SES.
dict
Response Syntax
{}
Response Structure
Exceptions
Returns the data available for the group.
See also: AWS API Documentation
Request Syntax
response = client.describe_group(
OrganizationId='string',
GroupId='string'
)
[REQUIRED]
The identifier for the organization under which the group exists.
[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 WorkMail).
EnabledDate (datetime) --
The date and time when a user was registered to WorkMail, in UNIX epoch time format.
DisabledDate (datetime) --
The date and time when a user was deregistered from WorkMail, in UNIX epoch time format.
Exceptions
Lists the settings in a DMARC policy for a specified organization.
See also: AWS API Documentation
Request Syntax
response = client.describe_inbound_dmarc_settings(
OrganizationId='string'
)
[REQUIRED]
Lists the ID of the given organization.
{
'Enforced': True|False
}
Response Structure
Lists the enforcement setting of the applied policy.
Exceptions
Describes the current status of a mailbox export job.
See also: AWS API Documentation
Request Syntax
response = client.describe_mailbox_export_job(
JobId='string',
OrganizationId='string'
)
[REQUIRED]
The mailbox export job ID.
[REQUIRED]
The organization ID.
dict
Response Syntax
{
'EntityId': 'string',
'Description': 'string',
'RoleArn': 'string',
'KmsKeyArn': 'string',
'S3BucketName': 'string',
'S3Prefix': 'string',
'S3Path': 'string',
'EstimatedProgress': 123,
'State': 'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
'ErrorInfo': 'string',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1)
}
Response Structure
(dict) --
EntityId (string) --
The identifier of the user or resource associated with the mailbox.
Description (string) --
The mailbox export job description.
RoleArn (string) --
The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the Amazon Simple Storage Service (Amazon S3) bucket.
KmsKeyArn (string) --
The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content.
S3BucketName (string) --
The name of the S3 bucket.
S3Prefix (string) --
The S3 bucket prefix.
S3Path (string) --
The path to the S3 bucket and file that the mailbox export job is exporting to.
EstimatedProgress (integer) --
The estimated progress of the mailbox export job, in percentage points.
State (string) --
The state of the mailbox export job.
ErrorInfo (string) --
Error information for failed mailbox export jobs.
StartTime (datetime) --
The mailbox export job start timestamp.
EndTime (datetime) --
The mailbox export job end timestamp.
Exceptions
Provides more information regarding a given organization based on its identifier.
See also: AWS API Documentation
Request Syntax
response = client.describe_organization(
OrganizationId='string'
)
[REQUIRED]
The identifier for the organization to be described.
{
'OrganizationId': 'string',
'Alias': 'string',
'State': 'string',
'DirectoryId': 'string',
'DirectoryType': 'string',
'DefaultMailDomain': 'string',
'CompletedDate': datetime(2015, 1, 1),
'ErrorMessage': 'string',
'ARN': 'string'
}
Response Structure
The identifier of an organization.
The alias for an organization.
The state of an organization.
The identifier for the directory associated with an Amazon WorkMail organization.
The type of directory associated with the WorkMail organization.
The default mail domain associated with the organization.
The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.
(Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.
The Amazon Resource Name (ARN) of the organization.
Exceptions
Returns the data available for the resource.
See also: AWS API Documentation
Request Syntax
response = client.describe_resource(
OrganizationId='string',
ResourceId='string'
)
[REQUIRED]
The identifier associated with the organization for which the resource is described.
[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), disabled (deregistered or never registered to WorkMail), or deleted.
EnabledDate (datetime) --
The date and time when a resource was enabled for WorkMail, in UNIX epoch time format.
DisabledDate (datetime) --
The date and time when a resource was disabled from WorkMail, in UNIX epoch time format.
Exceptions
Provides information regarding the user.
See also: AWS API Documentation
Request Syntax
response = client.describe_user(
OrganizationId='string',
UserId='string'
)
[REQUIRED]
The identifier for the organization under which the user exists.
[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 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 WorkMail organizations rely on different directory types, administrators can distinguish between an unregistered user (account is disabled and has a user role) and the directory administrators. 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.
Exceptions
Removes a member from the resource's set of delegates.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_delegate_from_resource(
OrganizationId='string',
ResourceId='string',
EntityId='string'
)
[REQUIRED]
The identifier for the organization under which the resource exists.
[REQUIRED]
The identifier of the resource from which delegates' set members are removed.
[REQUIRED]
The identifier for the member (user, group) to be removed from the resource's delegates.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes a member from a group.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_member_from_group(
OrganizationId='string',
GroupId='string',
MemberId='string'
)
[REQUIRED]
The identifier for the organization under which the group exists.
[REQUIRED]
The identifier for the group from which members are removed.
[REQUIRED]
The identifier for the member to be removed to the group.
dict
Response Syntax
{}
Response Structure
Exceptions
Gets the effects of an organization's access control rules as they apply to a specified IPv4 address, access protocol action, or user ID.
See also: AWS API Documentation
Request Syntax
response = client.get_access_control_effect(
OrganizationId='string',
IpAddress='string',
Action='string',
UserId='string'
)
[REQUIRED]
The identifier for the organization.
[REQUIRED]
The IPv4 address.
[REQUIRED]
The access protocol action. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .
[REQUIRED]
The user ID.
dict
Response Syntax
{
'Effect': 'ALLOW'|'DENY',
'MatchedRules': [
'string',
]
}
Response Structure
(dict) --
Effect (string) --
The rule effect.
MatchedRules (list) --
The rules that match the given parameters, resulting in an effect.
Exceptions
Gets the default retention policy details for the specified organization.
See also: AWS API Documentation
Request Syntax
response = client.get_default_retention_policy(
OrganizationId='string'
)
[REQUIRED]
The organization ID.
{
'Id': 'string',
'Name': 'string',
'Description': 'string',
'FolderConfigurations': [
{
'Name': 'INBOX'|'DELETED_ITEMS'|'SENT_ITEMS'|'DRAFTS'|'JUNK_EMAIL',
'Action': 'NONE'|'DELETE'|'PERMANENTLY_DELETE',
'Period': 123
},
]
}
Response Structure
The retention policy ID.
The retention policy name.
The retention policy description.
The retention policy folder configurations.
The configuration applied to an organization's folders by its retention policy.
The folder name.
The action to take on the folder contents at the end of the folder configuration period.
The number of days for which the folder-configuration action applies.
Exceptions
Gets details for a mail domain, including domain records required to configure your domain with recommended security.
See also: AWS API Documentation
Request Syntax
response = client.get_mail_domain(
OrganizationId='string',
DomainName='string'
)
[REQUIRED]
The Amazon WorkMail organization for which the domain is retrieved.
[REQUIRED]
The domain from which you want to retrieve details.
dict
Response Syntax
{
'Records': [
{
'Type': 'string',
'Hostname': 'string',
'Value': 'string'
},
],
'IsTestDomain': True|False,
'IsDefault': True|False,
'OwnershipVerificationStatus': 'PENDING'|'VERIFIED'|'FAILED',
'DkimVerificationStatus': 'PENDING'|'VERIFIED'|'FAILED'
}
Response Structure
(dict) --
Records (list) --
A list of the DNS records that Amazon WorkMail recommends adding in your DNS provider for the best user experience. The records configure your domain with DMARC, SPF, DKIM, and direct incoming email traffic to SES. See admin guide for more details.
(dict) --
A DNS record uploaded to your DNS provider.
Type (string) --
The RFC 1035 record type. Possible values: CNAME , A , MX .
Hostname (string) --
The DNS hostname.- For example, domain.example.com .
Value (string) --
The value returned by the DNS for a query to that hostname and record type.
IsTestDomain (boolean) --
Specifies whether the domain is a test domain provided by WorkMail, or a custom domain.
IsDefault (boolean) --
Specifies whether the domain is the default domain for your organization.
OwnershipVerificationStatus (string) --
Indicates the status of the domain ownership verification.
DkimVerificationStatus (string) --
Indicates the status of a DKIM verification.
Exceptions
Requests a user's mailbox details for a specified organization and user.
See also: AWS API Documentation
Request Syntax
response = client.get_mailbox_details(
OrganizationId='string',
UserId='string'
)
[REQUIRED]
The identifier for the organization that contains the user whose mailbox details are being requested.
[REQUIRED]
The identifier for the user whose mailbox details are being requested.
dict
Response Syntax
{
'MailboxQuota': 123,
'MailboxSize': 123.0
}
Response Structure
(dict) --
MailboxQuota (integer) --
The maximum allowed mailbox size, in MB, for the specified user.
MailboxSize (float) --
The current mailbox size, in MB, for the specified user.
Exceptions
Simulates the effect of the mobile device access rules for the given attributes of a sample access event. Use this method to test the effects of the current set of mobile device access rules for the Amazon WorkMail organization for a particular user's attributes.
See also: AWS API Documentation
Request Syntax
response = client.get_mobile_device_access_effect(
OrganizationId='string',
DeviceType='string',
DeviceModel='string',
DeviceOperatingSystem='string',
DeviceUserAgent='string'
)
[REQUIRED]
The Amazon WorkMail organization to simulate the access effect for.
dict
Response Syntax
{
'Effect': 'ALLOW'|'DENY',
'MatchedRules': [
{
'MobileDeviceAccessRuleId': 'string',
'Name': 'string'
},
]
}
Response Structure
(dict) --
Effect (string) --
The effect of the simulated access, ALLOW or DENY , after evaluating mobile device access rules in the Amazon WorkMail organization for the simulated user parameters.
MatchedRules (list) --
A list of the rules which matched the simulated user input and produced the effect.
(dict) --
The rule that a simulated user matches.
MobileDeviceAccessRuleId (string) --
Identifier of the rule that a simulated user matches.
Name (string) --
Name of a rule that a simulated user matches.
Exceptions
Gets the mobile device access override for the given WorkMail organization, user, and device.
See also: AWS API Documentation
Request Syntax
response = client.get_mobile_device_access_override(
OrganizationId='string',
UserId='string',
DeviceId='string'
)
[REQUIRED]
The Amazon WorkMail organization to which you want to apply the override.
[REQUIRED]
Identifies the WorkMail user for the override. Accepts the following types of user identities:
[REQUIRED]
The mobile device to which the override applies. DeviceId is case insensitive.
dict
Response Syntax
{
'UserId': 'string',
'DeviceId': 'string',
'Effect': 'ALLOW'|'DENY',
'Description': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateModified': datetime(2015, 1, 1)
}
Response Structure
(dict) --
UserId (string) --
The WorkMail user to which the access override applies.
DeviceId (string) --
The device to which the access override applies.
Effect (string) --
The effect of the override, ALLOW or DENY .
Description (string) --
A description of the override.
DateCreated (datetime) --
The date the override was first created.
DateModified (datetime) --
The date the description was last modified.
Exceptions
Create a paginator for an operation.
Returns an object that can wait for some condition.
Lists the access control rules for the specified organization.
See also: AWS API Documentation
Request Syntax
response = client.list_access_control_rules(
OrganizationId='string'
)
[REQUIRED]
The identifier for the organization.
{
'Rules': [
{
'Name': 'string',
'Effect': 'ALLOW'|'DENY',
'Description': 'string',
'IpRanges': [
'string',
],
'NotIpRanges': [
'string',
],
'Actions': [
'string',
],
'NotActions': [
'string',
],
'UserIds': [
'string',
],
'NotUserIds': [
'string',
],
'DateCreated': datetime(2015, 1, 1),
'DateModified': datetime(2015, 1, 1)
},
]
}
Response Structure
The access control rules.
A rule that controls access to an Amazon WorkMail organization.
The rule name.
The rule effect.
The rule description.
IPv4 CIDR ranges to include in the rule.
IPv4 CIDR ranges to exclude from the rule.
Access protocol actions to include in the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .
Access protocol actions to exclude from the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .
User IDs to include in the rule.
User IDs to exclude from the rule.
The date that the rule was created.
The date that the rule was modified.
Exceptions
Creates a paginated call to list the aliases associated with a given entity.
See also: AWS API Documentation
Request Syntax
response = client.list_aliases(
OrganizationId='string',
EntityId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier for the organization under which the entity exists.
[REQUIRED]
The identifier for the entity for which to list the aliases.
dict
Response Syntax
{
'Aliases': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
Aliases (list) --
The entity's paginated aliases.
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.
Exceptions
Returns an overview of the members of a group. Users and groups can be members of a group.
See also: AWS API Documentation
Request Syntax
response = client.list_group_members(
OrganizationId='string',
GroupId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier for the organization under which the group exists.
[REQUIRED]
The identifier for the group to which the members (users or groups) are associated.
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 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.
Exceptions
Returns summaries of the organization's groups.
See also: AWS API Documentation
Request Syntax
response = client.list_groups(
OrganizationId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier for the organization under which the groups exist.
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.
Exceptions
Lists the mail domains in a given Amazon WorkMail organization.
See also: AWS API Documentation
Request Syntax
response = client.list_mail_domains(
OrganizationId='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The Amazon WorkMail organization for which to list domains.
dict
Response Syntax
{
'MailDomains': [
{
'DomainName': 'string',
'DefaultDomain': True|False
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
MailDomains (list) --
The list of mail domain summaries, specifying domains that exist in the specified Amazon WorkMail organization, along with the information about whether the domain is or isn't the default.
(dict) --
The data for a given domain.
DomainName (string) --
The domain name.
DefaultDomain (boolean) --
Whether the domain is default or not.
NextToken (string) --
The token to use to retrieve the next page of results. The value becomes null when there are no more results to return.
Exceptions
Lists the mailbox export jobs started for the specified organization within the last seven days.
See also: AWS API Documentation
Request Syntax
response = client.list_mailbox_export_jobs(
OrganizationId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The organization ID.
dict
Response Syntax
{
'Jobs': [
{
'JobId': 'string',
'EntityId': 'string',
'Description': 'string',
'S3BucketName': 'string',
'S3Path': 'string',
'EstimatedProgress': 123,
'State': 'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Jobs (list) --
The mailbox export job details.
(dict) --
The details of a mailbox export job, including the user or resource ID associated with the mailbox and the S3 bucket that the mailbox contents are exported to.
JobId (string) --
The identifier of the mailbox export job.
EntityId (string) --
The identifier of the user or resource associated with the mailbox.
Description (string) --
The mailbox export job description.
S3BucketName (string) --
The name of the S3 bucket.
S3Path (string) --
The path to the S3 bucket and file that the mailbox export job exports to.
EstimatedProgress (integer) --
The estimated progress of the mailbox export job, in percentage points.
State (string) --
The state of the mailbox export job.
StartTime (datetime) --
The mailbox export job start timestamp.
EndTime (datetime) --
The mailbox export job end timestamp.
NextToken (string) --
The token to use to retrieve the next page of results.
Exceptions
Lists the mailbox permissions associated with a user, group, or resource mailbox.
See also: AWS API Documentation
Request Syntax
response = client.list_mailbox_permissions(
OrganizationId='string',
EntityId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier of the organization under which the user, group, or resource exists.
[REQUIRED]
The identifier of the user, group, or resource for which to list mailbox permissions.
dict
Response Syntax
{
'Permissions': [
{
'GranteeId': 'string',
'GranteeType': 'GROUP'|'USER',
'PermissionValues': [
'FULL_ACCESS'|'SEND_AS'|'SEND_ON_BEHALF',
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Permissions (list) --
One page of the user, group, or resource mailbox permissions.
(dict) --
Permission granted to a user, group, or resource to access a certain aspect of another user, group, or resource mailbox.
GranteeId (string) --
The identifier of the user, group, or resource to which the permissions are granted.
GranteeType (string) --
The type of user, group, or resource referred to in GranteeId.
PermissionValues (list) --
The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.
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.
Exceptions
Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.
See also: AWS API Documentation
Request Syntax
response = client.list_mobile_device_access_overrides(
OrganizationId='string',
UserId='string',
DeviceId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The Amazon WorkMail organization under which to list mobile device access overrides.
The WorkMail user under which you list the mobile device access overrides. Accepts the following types of user identities:
dict
Response Syntax
{
'Overrides': [
{
'UserId': 'string',
'DeviceId': 'string',
'Effect': 'ALLOW'|'DENY',
'Description': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateModified': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Overrides (list) --
The list of mobile device access overrides that exist for the specified Amazon WorkMail organization and user.
(dict) --
The override object.
UserId (string) --
The WorkMail user to which the access override applies.
DeviceId (string) --
The device to which the override applies.
Effect (string) --
The effect of the override, ALLOW or DENY .
Description (string) --
A description of the override.
DateCreated (datetime) --
The date the override was first created.
DateModified (datetime) --
The date the override was last modified.
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.
Exceptions
Lists the mobile device access rules for the specified Amazon WorkMail organization.
See also: AWS API Documentation
Request Syntax
response = client.list_mobile_device_access_rules(
OrganizationId='string'
)
[REQUIRED]
The Amazon WorkMail organization for which to list the rules.
{
'Rules': [
{
'MobileDeviceAccessRuleId': 'string',
'Name': 'string',
'Description': 'string',
'Effect': 'ALLOW'|'DENY',
'DeviceTypes': [
'string',
],
'NotDeviceTypes': [
'string',
],
'DeviceModels': [
'string',
],
'NotDeviceModels': [
'string',
],
'DeviceOperatingSystems': [
'string',
],
'NotDeviceOperatingSystems': [
'string',
],
'DeviceUserAgents': [
'string',
],
'NotDeviceUserAgents': [
'string',
],
'DateCreated': datetime(2015, 1, 1),
'DateModified': datetime(2015, 1, 1)
},
]
}
Response Structure
The list of mobile device access rules that exist under the specified Amazon WorkMail organization.
A rule that controls access to mobile devices for an Amazon WorkMail group.
The ID assigned to a mobile access rule.
The name of a mobile access rule.
The description of a mobile access rule.
The effect of the rule when it matches. Allowed values are ALLOW or DENY .
Device types that a rule will match.
Device types that a rule will not match. All other device types will match.
Device models that a rule will match.
Device models that a rule will not match. All other device models will match.
Device operating systems that a rule will match.
Device operating systems that a rule will not match. All other device types will match.
Device user agents that a rule will match.
Device user agents that a rule will not match. All other device user agents will match.
The date and time at which an access rule was created.
The date and time at which an access rule was modified.
Exceptions
Returns summaries of the customer's organizations.
See also: AWS API Documentation
Request Syntax
response = client.list_organizations(
NextToken='string',
MaxResults=123
)
dict
Response Syntax
{
'OrganizationSummaries': [
{
'OrganizationId': 'string',
'Alias': 'string',
'DefaultMailDomain': '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 representation of an organization.
OrganizationId (string) --
The identifier associated with the organization.
Alias (string) --
The alias associated with the organization.
DefaultMailDomain (string) --
The default email domain 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.
Exceptions
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
response = client.list_resource_delegates(
OrganizationId='string',
ResourceId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier for the organization that contains the resource for which delegates are listed.
[REQUIRED]
The identifier for the resource whose delegates are listed.
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 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.
Exceptions
Returns summaries of the organization's resources.
See also: AWS API Documentation
Request Syntax
response = client.list_resources(
OrganizationId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier for the organization under which the resources exist.
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 representation of a resource.
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.
Exceptions
Lists the tags applied to an Amazon WorkMail organization resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceARN='string'
)
[REQUIRED]
The resource ARN.
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
A list of tag key-value pairs.
Describes a tag applied to a resource.
The key of the tag.
The value of the tag.
Exceptions
Returns summaries of the organization's users.
See also: AWS API Documentation
Request Syntax
response = client.list_users(
OrganizationId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier for the organization under which the users exist.
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.
Exceptions
Adds a new access control rule for the specified organization. The rule allows or denies access to the organization for the specified IPv4 addresses, access protocol actions, and user IDs. Adding a new rule with the same name as an existing rule replaces the older rule.
See also: AWS API Documentation
Request Syntax
response = client.put_access_control_rule(
Name='string',
Effect='ALLOW'|'DENY',
Description='string',
IpRanges=[
'string',
],
NotIpRanges=[
'string',
],
Actions=[
'string',
],
NotActions=[
'string',
],
UserIds=[
'string',
],
NotUserIds=[
'string',
],
OrganizationId='string'
)
[REQUIRED]
The rule name.
[REQUIRED]
The rule effect.
[REQUIRED]
The rule description.
IPv4 CIDR ranges to include in the rule.
IPv4 CIDR ranges to exclude from the rule.
Access protocol actions to include in the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .
Access protocol actions to exclude from the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .
User IDs to include in the rule.
User IDs to exclude from the rule.
[REQUIRED]
The identifier of the organization.
dict
Response Syntax
{}
Response Structure
Exceptions
Enables or disables a DMARC policy for a given organization.
See also: AWS API Documentation
Request Syntax
response = client.put_inbound_dmarc_settings(
OrganizationId='string',
Enforced=True|False
)
[REQUIRED]
The ID of the organization that you are applying the DMARC policy to.
[REQUIRED]
Enforces or suspends a policy after it's applied.
dict
Response Syntax
{}
Response Structure
Exceptions
Sets permissions for a user, group, or resource. This replaces any pre-existing permissions.
See also: AWS API Documentation
Request Syntax
response = client.put_mailbox_permissions(
OrganizationId='string',
EntityId='string',
GranteeId='string',
PermissionValues=[
'FULL_ACCESS'|'SEND_AS'|'SEND_ON_BEHALF',
]
)
[REQUIRED]
The identifier of the organization under which the user, group, or resource exists.
[REQUIRED]
The identifier of the user, group, or resource for which to update mailbox permissions.
[REQUIRED]
The identifier of the user, group, or resource to which to grant the permissions.
[REQUIRED]
The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.
dict
Response Syntax
{}
Response Structure
Exceptions
Creates or updates a mobile device access override for the given WorkMail organization, user, and device.
See also: AWS API Documentation
Request Syntax
response = client.put_mobile_device_access_override(
OrganizationId='string',
UserId='string',
DeviceId='string',
Effect='ALLOW'|'DENY',
Description='string'
)
[REQUIRED]
Identifies the Amazon WorkMail organization for which you create the override.
[REQUIRED]
The WorkMail user for which you create the override. Accepts the following types of user identities:
[REQUIRED]
The mobile device for which you create the override. DeviceId is case insensitive.
[REQUIRED]
The effect of the override, ALLOW or DENY .
dict
Response Syntax
{}
Response Structure
Exceptions
Puts a retention policy to the specified organization.
See also: AWS API Documentation
Request Syntax
response = client.put_retention_policy(
OrganizationId='string',
Id='string',
Name='string',
Description='string',
FolderConfigurations=[
{
'Name': 'INBOX'|'DELETED_ITEMS'|'SENT_ITEMS'|'DRAFTS'|'JUNK_EMAIL',
'Action': 'NONE'|'DELETE'|'PERMANENTLY_DELETE',
'Period': 123
},
]
)
[REQUIRED]
The organization ID.
[REQUIRED]
The retention policy name.
[REQUIRED]
The retention policy folder configurations.
The configuration applied to an organization's folders by its retention policy.
The folder name.
The action to take on the folder contents at the end of the folder configuration period.
The number of days for which the folder-configuration action applies.
dict
Response Syntax
{}
Response Structure
Exceptions
Registers a new domain in Amazon WorkMail and SES, and configures it for use by WorkMail. Emails received by SES for this domain are routed to the specified WorkMail organization, and WorkMail has permanent permission to use the specified domain for sending your users' emails.
See also: AWS API Documentation
Request Syntax
response = client.register_mail_domain(
ClientToken='string',
OrganizationId='string',
DomainName='string'
)
Idempotency token used when retrying requests.
This field is autopopulated if not provided.
[REQUIRED]
The Amazon WorkMail organization under which you're creating the domain.
[REQUIRED]
The name of the mail domain to create in Amazon WorkMail and SES.
dict
Response Syntax
{}
Response Structure
Exceptions
Registers an existing and disabled user, group, or resource for Amazon WorkMail use by associating a mailbox and calendaring capabilities. It performs no change if the user, group, or resource is enabled and fails if the user, group, or resource 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 operation or they can be synchronized from your directory. For more information, see DeregisterFromWorkMail .
See also: AWS API Documentation
Request Syntax
response = client.register_to_work_mail(
OrganizationId='string',
EntityId='string',
Email='string'
)
[REQUIRED]
The identifier for the organization under which the user, group, or resource exists.
[REQUIRED]
The identifier for the user, group, or resource to be updated.
[REQUIRED]
The email for the user, group, or resource to be updated.
dict
Response Syntax
{}
Response Structure
Exceptions
Allows the administrator to reset the password for a user.
See also: AWS API Documentation
Request Syntax
response = client.reset_password(
OrganizationId='string',
UserId='string',
Password='string'
)
[REQUIRED]
The identifier of the organization that contains the user for which the password is reset.
[REQUIRED]
The identifier of the user for whom the password is reset.
[REQUIRED]
The new password for the user.
dict
Response Syntax
{}
Response Structure
Exceptions
Starts a mailbox export job to export MIME-format email messages and calendar items from the specified mailbox to the specified Amazon Simple Storage Service (Amazon S3) bucket. For more information, see Exporting mailbox content in the Amazon WorkMail Administrator Guide .
See also: AWS API Documentation
Request Syntax
response = client.start_mailbox_export_job(
ClientToken='string',
OrganizationId='string',
EntityId='string',
Description='string',
RoleArn='string',
KmsKeyArn='string',
S3BucketName='string',
S3Prefix='string'
)
[REQUIRED]
The idempotency token for the client request.
This field is autopopulated if not provided.
[REQUIRED]
The identifier associated with the organization.
[REQUIRED]
The identifier of the user or resource associated with the mailbox.
[REQUIRED]
The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the S3 bucket.
[REQUIRED]
The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content.
[REQUIRED]
The name of the S3 bucket.
[REQUIRED]
The S3 bucket prefix.
dict
Response Syntax
{
'JobId': 'string'
}
Response Structure
(dict) --
JobId (string) --
The job ID.
Exceptions
Applies the specified tags to the specified Amazon WorkMail organization resource.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceARN='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The resource ARN.
[REQUIRED]
The tag key-value pairs.
Describes a tag applied to a resource.
The key of the tag.
The value of the tag.
dict
Response Syntax
{}
Response Structure
Exceptions
Untags the specified tags from the specified Amazon WorkMail organization resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceARN='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The resource ARN.
[REQUIRED]
The tag keys.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates the default mail domain for an organization. The default mail domain is used by the WorkMail AWS Console to suggest an email address when enabling a mail user. You can only have one default domain.
See also: AWS API Documentation
Request Syntax
response = client.update_default_mail_domain(
OrganizationId='string',
DomainName='string'
)
[REQUIRED]
The Amazon WorkMail organization for which to list domains.
[REQUIRED]
The domain name that will become the default domain.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a user's current mailbox quota for a specified organization and user.
See also: AWS API Documentation
Request Syntax
response = client.update_mailbox_quota(
OrganizationId='string',
UserId='string',
MailboxQuota=123
)
[REQUIRED]
The identifier for the organization that contains the user for whom to update the mailbox quota.
[REQUIRED]
The identifer for the user for whom to update the mailbox quota.
[REQUIRED]
The updated mailbox quota, in MB, for the specified user.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a mobile device access rule for the specified Amazon WorkMail organization.
See also: AWS API Documentation
Request Syntax
response = client.update_mobile_device_access_rule(
OrganizationId='string',
MobileDeviceAccessRuleId='string',
Name='string',
Description='string',
Effect='ALLOW'|'DENY',
DeviceTypes=[
'string',
],
NotDeviceTypes=[
'string',
],
DeviceModels=[
'string',
],
NotDeviceModels=[
'string',
],
DeviceOperatingSystems=[
'string',
],
NotDeviceOperatingSystems=[
'string',
],
DeviceUserAgents=[
'string',
],
NotDeviceUserAgents=[
'string',
]
)
[REQUIRED]
The Amazon WorkMail organization under which the rule will be updated.
[REQUIRED]
The identifier of the rule to be updated.
[REQUIRED]
The updated rule name.
[REQUIRED]
The effect of the rule when it matches. Allowed values are ALLOW or DENY .
Device types that the updated rule will match.
Device types that the updated rule will not match. All other device types will match.
Device models that the updated rule will match.
Device models that the updated rule will not match. All other device models will match.
Device operating systems that the updated rule will match.
Device operating systems that the updated rule will not match. All other device operating systems will match.
User agents that the updated rule will match.
User agents that the updated rule will not match. All other user agents will match.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates the primary email for a user, group, or resource. 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
response = client.update_primary_email_address(
OrganizationId='string',
EntityId='string',
Email='string'
)
[REQUIRED]
The organization that contains the user, group, or resource to update.
[REQUIRED]
The user, group, or resource to update.
[REQUIRED]
The value of the email to be updated as primary.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates data for the resource. To have the latest information, it must be preceded by a DescribeResource call. The dataset in the request should be the one expected when performing another DescribeResource call.
See also: AWS API Documentation
Request Syntax
response = client.update_resource(
OrganizationId='string',
ResourceId='string',
Name='string',
BookingOptions={
'AutoAcceptRequests': True|False,
'AutoDeclineRecurringRequests': True|False,
'AutoDeclineConflictingRequests': True|False
}
)
[REQUIRED]
The identifier associated with the organization for which the resource is updated.
[REQUIRED]
The identifier of the resource to be updated.
The resource's booking options to be updated.
The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.
The resource's ability to automatically decline any recurring requests.
The resource's ability to automatically decline any conflicting requests.
dict
Response Syntax
{}
Response Structure
Exceptions
The available paginators are:
paginator = client.get_paginator('list_aliases')
Creates an iterator that will paginate through responses from WorkMail.Client.list_aliases().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
EntityId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier for the organization under which the entity exists.
[REQUIRED]
The identifier for the entity for which to list the aliases.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Aliases': [
'string',
],
}
Response Structure
(dict) --
Aliases (list) --
The entity's paginated aliases.
paginator = client.get_paginator('list_group_members')
Creates an iterator that will paginate through responses from WorkMail.Client.list_group_members().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
GroupId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier for the organization under which the group exists.
[REQUIRED]
The identifier for the group to which the members (users or groups) are associated.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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)
},
],
}
Response Structure
(dict) --
Members (list) --
The members associated to the group.
(dict) --
The representation of a 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.
paginator = client.get_paginator('list_groups')
Creates an iterator that will paginate through responses from WorkMail.Client.list_groups().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier for the organization under which the groups exist.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Groups': [
{
'Id': 'string',
'Email': 'string',
'Name': 'string',
'State': 'ENABLED'|'DISABLED'|'DELETED',
'EnabledDate': datetime(2015, 1, 1),
'DisabledDate': datetime(2015, 1, 1)
},
],
}
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.
paginator = client.get_paginator('list_mailbox_permissions')
Creates an iterator that will paginate through responses from WorkMail.Client.list_mailbox_permissions().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
EntityId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier of the organization under which the user, group, or resource exists.
[REQUIRED]
The identifier of the user, group, or resource for which to list mailbox permissions.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Permissions': [
{
'GranteeId': 'string',
'GranteeType': 'GROUP'|'USER',
'PermissionValues': [
'FULL_ACCESS'|'SEND_AS'|'SEND_ON_BEHALF',
]
},
],
}
Response Structure
(dict) --
Permissions (list) --
One page of the user, group, or resource mailbox permissions.
(dict) --
Permission granted to a user, group, or resource to access a certain aspect of another user, group, or resource mailbox.
GranteeId (string) --
The identifier of the user, group, or resource to which the permissions are granted.
GranteeType (string) --
The type of user, group, or resource referred to in GranteeId.
PermissionValues (list) --
The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.
paginator = client.get_paginator('list_organizations')
Creates an iterator that will paginate through responses from WorkMail.Client.list_organizations().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'OrganizationSummaries': [
{
'OrganizationId': 'string',
'Alias': 'string',
'DefaultMailDomain': 'string',
'ErrorMessage': 'string',
'State': 'string'
},
],
}
Response Structure
The overview of owned organizations presented as a list of organization summaries.
The representation of an organization.
The identifier associated with the organization.
The alias associated with the organization.
The default email domain associated with the organization.
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.
The state associated with the organization.
paginator = client.get_paginator('list_resource_delegates')
Creates an iterator that will paginate through responses from WorkMail.Client.list_resource_delegates().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
ResourceId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier for the organization that contains the resource for which delegates are listed.
[REQUIRED]
The identifier for the resource whose delegates are listed.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Delegates': [
{
'Id': 'string',
'Type': 'GROUP'|'USER'
},
],
}
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 associated as the resource's delegate.
Type (string) --
The type of the delegate: user or group.
paginator = client.get_paginator('list_resources')
Creates an iterator that will paginate through responses from WorkMail.Client.list_resources().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier for the organization under which the resources exist.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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)
},
],
}
Response Structure
(dict) --
Resources (list) --
One page of the organization's resource representation.
(dict) --
The representation of a resource.
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.
paginator = client.get_paginator('list_users')
Creates an iterator that will paginate through responses from WorkMail.Client.list_users().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
OrganizationId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The identifier for the organization under which the users exist.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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)
},
],
}
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.