### Example ARN for an incoming email message Source: https://docs.aws.amazon.com/workmail/latest/adminguide/lambda-content-access.md This example shows a specific ARN for an incoming email message, including example IDs for region, account, organization, and message. ```text arn:aws:workmailmessageflow:us-east-1:111122223333:message/m-n1pq2345678r901st2u3vx45x6789yza/incoming/d1234567-8e90-1f23-456g-hjk7lmnop8q9 ``` -------------------------------- ### Example Request and Response Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_messageflow_GetRawMessageContent.md This example demonstrates a sample HTTP request to the GetRawMessageContent API and its corresponding successful response, showing how to retrieve and interpret the raw MIME content of an email. ```APIDOC ## Example ### Sample Request ``` GET /messages/a1b2cd34-ef5g-6h7j-kl8m-npq9012345rs HTTP/1.1 Host: workmailmessageflow.us-east-1.amazonaws.com Accept-Encoding: identity User-Agent: aws-cli/1.16.273 Python/3.6.0 Windows/10 botocore/1.13.9 X-Amz-Date: 20191107T195012Z Authorization: AUTHPARAMS ``` ### Sample Response ``` HTTP/1.1 200 OK Cache-Control: no-cache Content-Type: application/json Date: Thu, 07 Nov 2019 19:50:12 GMT x-amzn-RequestId: ea71f214-79c5-4f89-9d4e-1ab4c43ae0df Content-Length: 1344 Connection: keep-alive Subject: Hello World From: =?UTF-8?Q?marymajor_marymajor?= To: =?UTF-8?Q?mateojackson=40example=2Enet?= Date: Thu, 7 Nov 2019 19:22:46 +0000 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_EXAMPLE+" References: X-Priority: 3 (Normal) X-Mailer: Amazon WorkMail Thread-Index: EXAMPLE Thread-Topic: Hello World Message-Id: This is a multi-part message in MIME format. Your mail reader does not understand MIME message format. --=_EXAMPLE+ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit hello world --=_EXAMPLE+ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable testing

hello world

--=_EXAMPLE+-- ``` ``` -------------------------------- ### Example nslookup output for a verified TXT record Source: https://docs.aws.amazon.com/workmail/latest/adminguide/domain_verification.md This is an example of the expected output when the TXT record is correctly added and verified. The text string should match the TXT value for your domain in the Amazon WorkMail console. ```text 1. _amazonses.example.com text = "fmxqxT/icOYx4aA/bEUrDPMeax9/s3frblS+niixmqk=" ``` -------------------------------- ### StartMailboxExportJob Request Syntax Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_StartMailboxExportJob.md This JSON structure defines the parameters required to start a mailbox export job. Ensure all required fields like EntityId, OrganizationId, RoleArn, and S3BucketName are provided. ```json { "ClientToken": "string", "Description": "string", "EntityId": "string", "KmsKeyArn": "string", "OrganizationId": "string", "RoleArn": "string", "S3BucketName": "string", "S3Prefix": "string" } ``` -------------------------------- ### List name servers for a domain using nslookup Source: https://docs.aws.amazon.com/workmail/latest/adminguide/domain_verification.md Use this command to list all name servers serving your domain. Replace `example.com` with your actual domain name. ```bash 1. nslookup -type=NS example.com ``` -------------------------------- ### Get Raw Message Content Request Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_messageflow_GetRawMessageContent.md This example demonstrates how to make a GET request to retrieve the raw content of an email message. Ensure the Host header is correctly set for your region and the Authorization header contains a valid AWS Signature Version 4 signature. ```HTTP GET /messages/a1b2cd34-ef5g-6h7j-kl8m-npq9012345rs HTTP/1.1 Host: workmailmessageflow.us-east-1.amazonaws.com Accept-Encoding: identity User-Agent: aws-cli/1.16.273 Python/3.6.0 Windows/10 botocore/1.13.9 X-Amz-Date: 20191107T195012Z Authorization: AUTHPARAMS ``` -------------------------------- ### Example S3 Policy for WorkMail Source: https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.md This S3 bucket policy grants WorkMail permission to get objects. Ensure 'REGION', '111122223333', and 'WORKMAIL_ORGANIZATION_ID' are replaced with your specific values. ```json { "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "workmail.REGION.amazonaws.com" }, "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], "Resource": "arn:aws:s3:::My-Test-S3-Bucket/*", "Condition": { "StringEquals": { "aws:SourceAccount": "111122223333" }, "Bool": { "aws:SecureTransport": "true" }, "ArnLike": { "aws:SourceArn": "arn:aws:workmailmessageflow:us-east-1:111122223333:message/WORKMAIL_ORGANIZATION_ID/*" } } } ] } ``` -------------------------------- ### See Also: SDK References Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_PutIdentityProviderConfiguration.md This section provides links to the AWS SDKs and the AWS CLI for using the PutIdentityProviderConfiguration API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/PutIdentityProviderConfiguration) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/PutIdentityProviderConfiguration) ``` -------------------------------- ### CreateOrganization SDK References Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_CreateOrganization.md Links to the AWS SDKs and CLI for interacting with the CreateOrganization API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/CreateOrganization) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/CreateOrganization) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/CreateOrganization) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/CreateOrganization) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/CreateOrganization) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/CreateOrganization) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/CreateOrganization) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/CreateOrganization) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/CreateOrganization) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/CreateOrganization) ``` -------------------------------- ### CreateAvailabilityConfiguration SDK References Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_CreateAvailabilityConfiguration.md This section provides links to the AWS SDKs and the AWS Command Line Interface V2 for using the CreateAvailabilityConfiguration API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/CreateAvailabilityConfiguration) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/CreateAvailabilityConfiguration) ``` -------------------------------- ### Example Mailbox Export Output Log Source: https://docs.aws.amazon.com/workmail/latest/adminguide/mail-export.md This JSON object represents an example log output from a completed mailbox export job, detailing statistics about the exported items. ```json { "totalNonExportableItems" : "13", "totalMessages" : "76", "sha384Hash" : "4de93a***96a1dd", "totalBytes" : "161892", "totalFolders" : "15", "startTime" : "168***380", "endTime" : "168***384" } ``` -------------------------------- ### See Also: CreateImpersonationRole SDK References Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_CreateImpersonationRole.md Links to various AWS SDKs and the AWS CLI for using the CreateImpersonationRole API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/CreateImpersonationRole) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/CreateImpersonationRole) ``` -------------------------------- ### See Also Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_GetMobileDeviceAccessOverride.md Links to the AWS SDKs and CLI for using the GetMobileDeviceAccessOverride API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/GetMobileDeviceAccessOverride) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/GetMobileDeviceAccessOverride) ``` -------------------------------- ### See Also Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_DisassociateDelegateFromResource.md Links to SDKs and CLI for using the DisassociateDelegateFromResource API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/DisassociateDelegateFromResource) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/DisassociateDelegateFromResource) ``` -------------------------------- ### Amazon WorkMail Encryption Context Example Source: https://docs.aws.amazon.com/workmail/latest/adminguide/data-protection.md This example shows the key-value pair format for encryption context used by Amazon WorkMail in AWS KMS operations. The key 'aws:workmail:arn' identifies the organization's ARN. ```json "aws:workmail:arn":"arn:aws:workmail:region:account ID:organization/organization-ID" ``` ```json "aws:workmail:arn":"arn:aws:workmail:eu-west-1:111122223333:organization/m-a123b4c5de678fg9h0ij1k2lm234no56" ``` -------------------------------- ### See Also Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_PutAccessControlRule.md Links to various AWS SDKs and the AWS CLI for using the PutAccessControlRule API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/PutAccessControlRule) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/PutAccessControlRule) ``` -------------------------------- ### GetImpersonationRole Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_GetImpersonationRole.md Gets the impersonation role details for the given WorkMail organization. ```APIDOC ## GetImpersonationRole ### Description Gets the impersonation role details for the given WorkMail organization. ### Method POST ### Endpoint / ### Parameters #### Request Body - **ImpersonationRoleId** (string) - Required - The impersonation role ID to retrieve. - **OrganizationId** (string) - Required - The WorkMail organization from which to retrieve the impersonation role. ### Request Example ```json { "ImpersonationRoleId": "string", "OrganizationId": "string" } ``` ### Response #### Success Response (200) - **DateCreated** (timestamp) - The date when the impersonation role was created. - **DateModified** (timestamp) - The date when the impersonation role was last modified. - **Description** (string) - The impersonation role description. - **ImpersonationRoleId** (string) - The impersonation role ID. - **Name** (string) - The impersonation role name. - **Rules** (array) - The list of rules for the given impersonation role. - **Type** (string) - The impersonation role type. #### Response Example ```json { "DateCreated": number, "DateModified": number, "Description": "string", "ImpersonationRoleId": "string", "Name": "string", "Rules": [ { "Description": "string", "Effect": "string", "ImpersonationRuleId": "string", "Name": "string", "NotTargetUsers": [ "string" ], "TargetUsers": [ "string" ] } ], "Type": "string" } ``` ``` -------------------------------- ### GetDefaultRetentionPolicy Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_GetDefaultRetentionPolicy.md Gets the default retention policy details for the specified organization. ```APIDOC ## GetDefaultRetentionPolicy ### Description Gets the default retention policy details for the specified organization. ### Method POST ### Endpoint / ### Parameters #### Request Body - **OrganizationId** (string) - Required - The organization ID. ### Request Example ```json { "OrganizationId": "string" } ``` ### Response #### Success Response (200) - **Description** (string) - The retention policy description. - **FolderConfigurations** (Array of objects) - The retention policy folder configurations. - **Action** (string) - **Name** (string) - **Period** (number) - **Id** (string) - The retention policy ID. - **Name** (string) - The retention policy name. #### Response Example ```json { "Description": "string", "FolderConfigurations": [ { "Action": "string", "Name": "string", "Period": number } ], "Id": "string", "Name": "string" } ``` ### Errors - **EntityNotFoundException** (400) - **InvalidParameterException** (400) - **OrganizationNotFoundException** (400) - **OrganizationStateException** (400) ``` -------------------------------- ### GetMobileDeviceAccessOverride Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_GetMobileDeviceAccessOverride.md Gets the mobile device access override for the given WorkMail organization, user, and device. ```APIDOC ## GetMobileDeviceAccessOverride ### Description Gets the mobile device access override for the given WorkMail organization, user, and device. ### Method POST ### Endpoint / ### Parameters #### Request Body - **DeviceId** (string) - Required - The mobile device to which the override applies. `DeviceId` is case insensitive. - **OrganizationId** (string) - Required - The WorkMail organization to which you want to apply the override. - **UserId** (string) - Required - Identifies the WorkMail user for the override. Accepts user ID, email address, or username. ### Request Example ```json { "DeviceId": "string", "OrganizationId": "string", "UserId": "string" } ``` ### Response #### Success Response (200) - **DateCreated** (timestamp) - The date the override was first created. - **DateModified** (timestamp) - The date the description was last modified. - **Description** (string) - A description of the override. - **DeviceId** (string) - The device to which the access override applies. - **Effect** (string) - The effect of the override, `ALLOW` or `DENY`. - **UserId** (string) - The WorkMail user to which the access override applies. #### Response Example ```json { "DateCreated": 1234567890, "DateModified": 1234567890, "Description": "string", "DeviceId": "string", "Effect": "ALLOW | DENY", "UserId": "string" } ``` ``` -------------------------------- ### See Also Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_UpdateImpersonationRole.md Links to various AWS SDKs and the AWS CLI for using the UpdateImpersonationRole API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/UpdateImpersonationRole) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/UpdateImpersonationRole) ``` -------------------------------- ### ListMailboxExportJobs Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_ListMailboxExportJobs.md Lists the mailbox export jobs started for the specified organization within the last seven days. ```APIDOC ## ListMailboxExportJobs ### Description Lists the mailbox export jobs started for the specified organization within the last seven days. ### Method POST ### Endpoint / ### Parameters #### Request Body - **MaxResults** (integer) - Optional - The maximum number of results to return in a single call. Valid Range: Minimum value of 1. Maximum value of 100. - **NextToken** (string) - Optional - The token to use to retrieve the next page of results. Length Constraints: Minimum length of 1. Maximum length of 1024. Pattern: `[\S\s]*|[a-zA-Z0-9/+=]{1,1024}` - **OrganizationId** (string) - Required - The organization ID. Length Constraints: Fixed length of 34. Pattern: `^m-[0-9a-f]{32}$` ### Request Example ```json { "MaxResults": 100, "NextToken": "string", "OrganizationId": "string" } ``` ### Response #### Success Response (200) - **Jobs** (array of objects) - The mailbox export job details. - **NextToken** (string) - The token to use to retrieve the next page of results. Length Constraints: Minimum length of 1. Maximum length of 1024. Pattern: `[\S\s]*|[a-zA-Z0-9/+=]{1,1024}` #### Response Example ```json { "Jobs": [ { "Description": "string", "EndTime": number, "EntityId": "string", "EstimatedProgress": number, "JobId": "string", "S3BucketName": "string", "S3Path": "string", "StartTime": number, "State": "string" } ], "NextToken": "string" } ``` ### Errors - **InvalidParameterException** (400) - One or more of the input parameters don't match the service's restrictions. - **OrganizationNotFoundException** (400) - An operation received a valid organization identifier that either doesn't belong or exist in the system. - **OrganizationStateException** (400) - The organization must have a valid state to perform certain operations on the organization or its members. ``` -------------------------------- ### GetMailDomain API Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_GetMailDomain.md Gets details for a mail domain, including domain records required to configure your domain with recommended security. ```APIDOC ## GetMailDomain ### Description Gets details for a mail domain, including domain records required to configure your domain with recommended security. ### Method POST ### Endpoint / ### Parameters #### Request Body - **DomainName** (string) - Required - The domain from which you want to retrieve details. - **OrganizationId** (string) - Required - The WorkMail organization for which the domain is retrieved. ### Request Example ```json { "DomainName": "example.com", "OrganizationId": "m-1234567890abcdef1234567890abcdef" } ``` ### Response #### Success Response (200) - **DkimVerificationStatus** (string) - Indicates the status of a DKIM verification. Valid Values: `PENDING | VERIFIED | FAILED` - **IsDefault** (boolean) - Specifies whether the domain is the default domain for your organization. - **IsTestDomain** (boolean) - Specifies whether the domain is a test domain provided by WorkMail, or a custom domain. - **OwnershipVerificationStatus** (string) - Indicates the status of the domain ownership verification. Valid Values: `PENDING | VERIFIED | FAILED` - **Records** (Array of objects) - A list of the DNS records that WorkMail recommends adding in your DNS provider for the best user experience. Each object contains: - **Hostname** (string) - The hostname for the DNS record. - **Type** (string) - The type of the DNS record (e.g., TXT, CNAME). - **Value** (string) - The value of the DNS record. #### Response Example ```json { "DkimVerificationStatus": "VERIFIED", "IsDefault": false, "IsTestDomain": false, "OwnershipVerificationStatus": "VERIFIED", "Records": [ { "Hostname": "_amazonses.example.com", "Type": "TXT", "Value": "some_verification_string" }, { "Hostname": "selector1._domainkey.example.com", "Type": "CNAME", "Value": "selector1.dkim.amazonses.com" } ] } ``` ``` -------------------------------- ### Assume Impersonation Role and Configure EWS Account (Python) Source: https://docs.aws.amazon.com/workmail/latest/adminguide/using-impersonation-roles.md Illustrates obtaining an impersonation token using Boto3 and configuring the Exchangelib library to access a user's mailbox via impersonation. ```python import boto3 from requests.auth import AuthBase from exchangelib.transport import AUTH_TYPE_MAP from exchangelib import Configuration, Account, Version, IMPERSONATION from exchangelib.version import EXCHANGE_2010_SP2 work_mail_client = boto3.client("workmail") class ImpersonationRoleAuth(AuthBase): def __init__(self): self.token = work_mail_client.assume_impersonation_role( OrganizationId=WORKMAIL_ORGANIZATION_ID, ImpersonationRoleId=IMPERSONATION_ROLE_ID )["Token"] def __call__(self, r): r.headers["Authorization"] = "Bearer " + self.token return r AUTH_TYPE_MAP["ImpersonationRoleAuth"] = ImpersonationRoleAuth efs_config = Configuration( service_endpoint=WORKMAIL_EWS_URL, version=Version(build=EXCHANGE_2010_SP2), auth_type="ImpersonationRoleAuth" ) efs_account = Account( config=ews_config, primary_smtp_address=EMAIL_ADDRESS, access_type=IMPERSONATION ) ``` -------------------------------- ### Assume Impersonation Role and Configure EWS Service (.Net) Source: https://docs.aws.amazon.com/workmail/latest/adminguide/using-impersonation-roles.md Shows how to retrieve an impersonation token using the AWS SDK for .NET and set up the EWS Managed API client to impersonate a user. ```.net using Amazon.WorkMail; using Amazon.WorkMail.Model; using Microsoft.Exchange.WebServices.Data; // ... AssumeImpersonationRoleRequest request = new AssumeImpersonationRoleRequest(); request.OrganizationId = WORKMAIL_ORGANIZATION_ID; request.ImpersonationRoleId = IMPERSONATION_ROLE_ID; AssumeImpersonationRoleResponse response = workMailClient.AssumeImpersonationRole(request); ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2); service.Url = new Uri(WORKMAIL_EWS_URL); service.HttpHeaders.Add("Authorization", "Bearer " + response.Token); service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, EMAIL_ADDRESS); ``` -------------------------------- ### Specific Amazon WorkMail Organization ARN Source: https://docs.aws.amazon.com/workmail/latest/adminguide/security_iam_service-with-iam.md Example of specifying a particular Amazon WorkMail organization using its ARN in an IAM policy. ```json "Resource": "arn:aws:workmail:us-east-1:111122223333:organization/m-n1pq2345678r901st2u3vx45x6789yza" ``` -------------------------------- ### AssociateDelegateToResource SDK References Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_AssociateDelegateToResource.md This section provides links to the AssociateDelegateToResource API documentation within various AWS SDKs, including the AWS CLI, .NET, C++, Go, Java, JavaScript, Kotlin, PHP, Python, and Ruby SDKs. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/AssociateDelegateToResource) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/AssociateDelegateToResource) ``` -------------------------------- ### Example journaling email address format Source: https://docs.aws.amazon.com/workmail/latest/adminguide/journaling_overview.md This is the format of the email address from which all journal records are sent. Ensure this domain record is not deleted from Amazon SES. ```text amazonjournaling@yourorganization.awsapps.com ``` -------------------------------- ### PutRawMessageContent API Response Example Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_messageflow_PutRawMessageContent.md This snippet illustrates a successful HTTP 200 OK response from the PutRawMessageContent API. It indicates that the raw message content was updated. ```http HTTP/1.1 200 OK Cache-Control: no-cache Content-Type: application/json Date: Wed, 27 Jan 2021 15:11:30 GMT x-amzn-RequestId: ddd7de94-a4eb-4af8-8c3f-1d16cf98b458 Content-Length: 2 Connection: Close {} ``` -------------------------------- ### See Also Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_DeleteGroup.md Links to relevant AWS SDKs and the AWS CLI for interacting with the DeleteGroup API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/DeleteGroup) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/DeleteGroup) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/DeleteGroup) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/DeleteGroup) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/DeleteGroup) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/DeleteGroup) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/DeleteGroup) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/DeleteGroup) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/DeleteGroup) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/DeleteGroup) ``` -------------------------------- ### List Mobile Device Access Rules Source: https://docs.aws.amazon.com/workmail/latest/adminguide/manage-mobile-access.md Use this command to list all configured mobile device access rules for your organization. ```bash aws workmail list-mobile-device-access-rules --organization-id m-a123b4c5de678fg9h0ij1k2lm234no56 ``` -------------------------------- ### Granting All List Actions in Amazon WorkMail Source: https://docs.aws.amazon.com/workmail/latest/adminguide/security_iam_service-with-iam.md Use wildcards in the `Action` element of an IAM policy to grant permissions for all actions that start with a specific prefix, such as `List`. ```json "Action": "workmail:List*" ``` -------------------------------- ### Find Name Servers with nslookup Source: https://docs.aws.amazon.com/workmail/latest/adminguide/domain_verification.md Run this command to list all name servers for your domain. You will use one of these in the next step to query MX records. ```bash nslookup -type=NS example.com ``` -------------------------------- ### Get EWS URL using PowerShell Source: https://docs.aws.amazon.com/workmail/latest/adminguide/enable_interop_wm.md Use this PowerShell command to retrieve the EWS URL for your Exchange environment. This is necessary for configuring EWS-based availability in Amazon WorkMail. ```powershell Get-WebServicesVirtualDirectory |Select name, *url* | fl ``` -------------------------------- ### Get Amazon WorkMail Service Account Credentials Source: https://docs.aws.amazon.com/workmail/latest/adminguide/enable_interop_ms.md Use this PowerShell command to prompt for the Amazon WorkMail service account credentials. Ensure the username is formatted as domain\$1username. ```powershell $credentials = Get-Credential ``` -------------------------------- ### See Also: SDK References Source: https://docs.aws.amazon.com/workmail/latest/APIReference/API_DescribeGroup.md Links to AWS SDKs and the AWS CLI for using the DescribeGroup API. ```APIDOC ## See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: + [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/workmail-2017-10-01/DescribeGroup) + [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workmail-2017-10-01/DescribeGroup) + [AWS SDK for C++](https://docs.aws.amazon.com/goto/SdkForCpp/workmail-2017-10-01/DescribeGroup) + [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workmail-2017-10-01/DescribeGroup) + [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workmail-2017-10-01/DescribeGroup) + [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workmail-2017-10-01/DescribeGroup) + [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workmail-2017-10-01/DescribeGroup) + [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workmail-2017-10-01/DescribeGroup) + [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workmail-2017-10-01/DescribeGroup) + [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workmail-2017-10-01/DescribeGroup) ``` -------------------------------- ### Assume Impersonation Role and Configure EWS Service (Java) Source: https://docs.aws.amazon.com/workmail/latest/adminguide/using-impersonation-roles.md Demonstrates how to obtain an impersonation token using the AWS SDK for Java and configure the EWS Java API client to use this token for accessing a user's mailbox. ```java import software.amazon.awssdk.services.workmail.WorkMailClient; import software.amazon.awssdk.services.workmail.model.AssumeImpersonationRoleRequest; import software.amazon.awssdk.services.workmail.model.AssumeImpersonationRoleResponse; import microsoft.exchange.webservices.data.core.ExchangeService; import microsoft.exchange.webservices.data.core.enumeration.misc.ExchangeVersion; import microsoft.exchange.webservices.data.misc.ImpersonatedUserId; import microsoft.exchange.webservices.data.core.enumeration.misc.ConnectingIdType; // ... AssumeImpersonationRoleResponse response = workMailClient.assumeImpersonationRole( AssumeImpersonationRoleRequest.builder() .organizationId(WORKMAIL_ORGANIZATION_ID) .impersonationRoleId(IMPERSONATION_ROLE_ID) .build()); ExchangeService exchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP2); exchangeService.setUrl(URI.create(WORKMAIL_EWS_URL)); exchangeService.getHttpHeaders().put("Authorization", "Bearer " + response.token()); exchangeService.setImpersonatedUserId(new ImpersonatedUserId(ConnectingIdType.SmtpAddress, EMAIL_ADDRESS)); ```