WorkMailClient

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:

  • Listing and describing organizations

  • Managing users

  • Managing groups

  • Managing resources

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.

Installation

NPM
npm install @aws-sdk/client-workmail
Yarn
yarn add @aws-sdk/client-workmail
pnpm
pnpm add @aws-sdk/client-workmail

WorkMailClient Operations

Command
Summary
AssociateDelegateToResourceCommand

Adds a member (user or group) to the resource's set of delegates.

AssociateMemberToGroupCommand

Adds a member (user or group) to the group's set.

AssumeImpersonationRoleCommand

Assumes an impersonation role for the given WorkMail organization. This method returns an authentication token you can use to make impersonated calls.

CancelMailboxExportJobCommand

Cancels a mailbox export job.

If the mailbox export job is near completion, it might not be possible to cancel it.

CreateAliasCommand

Adds an alias to the set of a given member (user or group) of WorkMail.

CreateAvailabilityConfigurationCommand

Creates an AvailabilityConfiguration for the given WorkMail organization and domain.

CreateGroupCommand

Creates a group that can be used in WorkMail by calling the RegisterToWorkMail operation.

CreateIdentityCenterApplicationCommand

Creates the WorkMail application in IAM Identity Center that can be used later in the WorkMail - IdC integration. For more information, see PutIdentityProviderConfiguration. This action does not affect the authentication settings for any WorkMail organizations.

CreateImpersonationRoleCommand

Creates an impersonation role for the given WorkMail organization.

Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries also complete successfully without performing any further actions.

CreateMobileDeviceAccessRuleCommand

Creates a new mobile device access rule for the specified WorkMail organization.

CreateOrganizationCommand

Creates a new 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 WorkMail directory for you. For more information, see Adding an organization  in the WorkMail Administrator Guide.

You can associate multiple email domains with an organization, then choose your default email domain from the 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 WorkMail Administrator Guide.

Optionally, you can use a customer managed key from AWS Key Management Service (AWS KMS) to encrypt email for your organization. If you don't associate an AWS KMS key, WorkMail creates a default, AWS managed key for you.

CreateResourceCommand

Creates a new WorkMail resource.

CreateUserCommand

Creates a user who can be used in WorkMail by calling the RegisterToWorkMail operation.

DeleteAccessControlRuleCommand

Deletes an access control rule for the specified WorkMail organization.

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.

DeleteAliasCommand

Remove one or more specified aliases from a set of aliases for a given user.

DeleteAvailabilityConfigurationCommand

Deletes the AvailabilityConfiguration for the given WorkMail organization and domain.

DeleteEmailMonitoringConfigurationCommand

Deletes the email monitoring configuration for a specified organization.

DeleteGroupCommand

Deletes a group from WorkMail.

DeleteIdentityCenterApplicationCommand

Deletes the IAM Identity Center application from WorkMail. This action does not affect the authentication settings for any WorkMail organizations.

DeleteIdentityProviderConfigurationCommand

Disables the integration between IdC and WorkMail. Authentication will continue with the directory as it was before the IdC integration. You might have to reset your directory passwords and reconfigure your desktop and mobile email clients.

DeleteImpersonationRoleCommand

Deletes an impersonation role for the given WorkMail organization.

DeleteMailboxPermissionsCommand

Deletes permissions granted to a member (user or group).

DeleteMobileDeviceAccessOverrideCommand

Deletes the mobile device access override for the given WorkMail organization, user, and device.

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.

DeleteMobileDeviceAccessRuleCommand

Deletes a mobile device access rule for the specified WorkMail organization.

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.

DeleteOrganizationCommand

Deletes an WorkMail organization and all underlying AWS resources managed by WorkMail as part of the organization. You can choose whether to delete the associated directory. For more information, see Removing an organization  in the WorkMail Administrator Guide.

DeletePersonalAccessTokenCommand

Deletes the Personal Access Token from the provided WorkMail Organization.

DeleteResourceCommand

Deletes the specified resource.

DeleteRetentionPolicyCommand

Deletes the specified retention policy from the specified organization.

DeleteUserCommand

Deletes a user from 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.

DeregisterFromWorkMailCommand

Mark a user, group, or resource as no longer used in 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.

DeregisterMailDomainCommand

Removes a domain from 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.

DescribeEmailMonitoringConfigurationCommand

Describes the current email monitoring configuration for a specified organization.

DescribeEntityCommand

Returns basic details about an entity in WorkMail.

DescribeGroupCommand

Returns the data available for the group.

DescribeIdentityProviderConfigurationCommand

Returns detailed information on the current IdC setup for the WorkMail organization.

DescribeInboundDmarcSettingsCommand

Lists the settings in a DMARC policy for a specified organization.

DescribeMailboxExportJobCommand

Describes the current status of a mailbox export job.

DescribeOrganizationCommand

Provides more information regarding a given organization based on its identifier.

DescribeResourceCommand

Returns the data available for the resource.

DescribeUserCommand

Provides information regarding the user.

DisassociateDelegateFromResourceCommand

Removes a member from the resource's set of delegates.

DisassociateMemberFromGroupCommand

Removes a member from a group.

GetAccessControlEffectCommand

Gets the effects of an organization's access control rules as they apply to a specified IPv4 address, access protocol action, and user ID or impersonation role ID. You must provide either the user ID or impersonation role ID. Impersonation role ID can only be used with Action EWS.

GetDefaultRetentionPolicyCommand

Gets the default retention policy details for the specified organization.

GetImpersonationRoleCommand

Gets the impersonation role details for the given WorkMail organization.

GetImpersonationRoleEffectCommand

Tests whether the given impersonation role can impersonate a target user.

GetMailDomainCommand

Gets details for a mail domain, including domain records required to configure your domain with recommended security.

GetMailboxDetailsCommand

Requests a user's mailbox details for a specified organization and user.

GetMobileDeviceAccessEffectCommand

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 WorkMail organization for a particular user's attributes.

GetMobileDeviceAccessOverrideCommand

Gets the mobile device access override for the given WorkMail organization, user, and device.

GetPersonalAccessTokenMetadataCommand

Requests details of a specific Personal Access Token within the WorkMail organization.

ListAccessControlRulesCommand

Lists the access control rules for the specified organization.

ListAliasesCommand

Creates a paginated call to list the aliases associated with a given entity.

ListAvailabilityConfigurationsCommand

List all the AvailabilityConfiguration's for the given WorkMail organization.

ListGroupMembersCommand

Returns an overview of the members of a group. Users and groups can be members of a group.

ListGroupsCommand

Returns summaries of the organization's groups.

ListGroupsForEntityCommand

Returns all the groups to which an entity belongs.

ListImpersonationRolesCommand

Lists all the impersonation roles for the given WorkMail organization.

ListMailDomainsCommand

Lists the mail domains in a given WorkMail organization.

ListMailboxExportJobsCommand

Lists the mailbox export jobs started for the specified organization within the last seven days.

ListMailboxPermissionsCommand

Lists the mailbox permissions associated with a user, group, or resource mailbox.

ListMobileDeviceAccessOverridesCommand

Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.

ListMobileDeviceAccessRulesCommand

Lists the mobile device access rules for the specified WorkMail organization.

ListOrganizationsCommand

Returns summaries of the customer's organizations.

ListPersonalAccessTokensCommand

Returns a summary of your Personal Access Tokens.

ListResourceDelegatesCommand

Lists the delegates associated with a resource. Users and groups can be resource delegates and answer requests on behalf of the resource.

ListResourcesCommand

Returns summaries of the organization's resources.

ListTagsForResourceCommand

Lists the tags applied to an WorkMail organization resource.

ListUsersCommand

Returns summaries of the organization's users.

PutAccessControlRuleCommand

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, user IDs and impersonation IDs. Adding a new rule with the same name as an existing rule replaces the older rule.

PutEmailMonitoringConfigurationCommand

Creates or updates the email monitoring configuration for a specified organization.

PutIdentityProviderConfigurationCommand

Enables integration between IAM Identity Center (IdC) and WorkMail to proxy authentication requests for mailbox users. You can connect your IdC directory or your external directory to WorkMail through IdC and manage access to WorkMail mailboxes in a single place. For enhanced protection, you could enable Multifactor Authentication (MFA) and Personal Access Tokens.

PutInboundDmarcSettingsCommand

Enables or disables a DMARC policy for a given organization.

PutMailboxPermissionsCommand

Sets permissions for a user, group, or resource. This replaces any pre-existing permissions.

PutMobileDeviceAccessOverrideCommand

Creates or updates a mobile device access override for the given WorkMail organization, user, and device.

PutRetentionPolicyCommand

Puts a retention policy to the specified organization.

RegisterMailDomainCommand

Registers a new domain in 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.

RegisterToWorkMailCommand

Registers an existing and disabled user, group, or resource for 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.

ResetPasswordCommand

Allows the administrator to reset the password for a user.

StartMailboxExportJobCommand

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 WorkMail Administrator Guide.

TagResourceCommand

Applies the specified tags to the specified WorkMailorganization resource.

TestAvailabilityConfigurationCommand

Performs a test on an availability provider to ensure that access is allowed. For EWS, it verifies the provided credentials can be used to successfully log in. For Lambda, it verifies that the Lambda function can be invoked and that the resource access policy was configured to deny anonymous access. An anonymous invocation is one done without providing either a SourceArn or SourceAccount header.

The request must contain either one provider definition (EwsProvider or LambdaProvider) or the DomainName parameter. If the DomainName parameter is provided, the configuration stored under the DomainName will be tested.

UntagResourceCommand

Untags the specified tags from the specified WorkMail organization resource.

UpdateAvailabilityConfigurationCommand

Updates an existing AvailabilityConfiguration for the given WorkMail organization and domain.

UpdateDefaultMailDomainCommand

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.

UpdateGroupCommand

Updates attributes in a group.

UpdateImpersonationRoleCommand

Updates an impersonation role for the given WorkMail organization.

UpdateMailboxQuotaCommand

Updates a user's current mailbox quota for a specified organization and user.

UpdateMobileDeviceAccessRuleCommand

Updates a mobile device access rule for the specified WorkMail organization.

UpdatePrimaryEmailAddressCommand

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.

UpdateResourceCommand

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.

UpdateUserCommand

Updates data for the user. To have the latest information, it must be preceded by a DescribeUser call. The dataset in the request should be the one expected when performing another DescribeUser call.

WorkMailClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: WorkMailClientConfig