- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkMailClient, StartMailboxExportJobCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, StartMailboxExportJobCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // StartMailboxExportJobRequest
ClientToken: "STRING_VALUE", // required
OrganizationId: "STRING_VALUE", // required
EntityId: "STRING_VALUE", // required
Description: "STRING_VALUE",
RoleArn: "STRING_VALUE", // required
KmsKeyArn: "STRING_VALUE", // required
S3BucketName: "STRING_VALUE", // required
S3Prefix: "STRING_VALUE", // required
};
const command = new StartMailboxExportJobCommand(input);
const response = await client.send(command);
// { // StartMailboxExportJobResponse
// JobId: "STRING_VALUE",
// };
StartMailboxExportJobCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
EntityId Required | string | undefined | The identifier of the user or resource associated with the mailbox. The identifier can accept UserId or ResourceId, Username or Resourcename, or email. The following identity formats are available:
|
KmsKeyArn Required | string | undefined | The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content. |
OrganizationId Required | string | undefined | The identifier associated with the organization. |
RoleArn Required | string | undefined | The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the S3 bucket. |
S3BucketName Required | string | undefined | The name of the S3 bucket. |
S3Prefix Required | string | undefined | The S3 bucket prefix. |
ClientToken | string | undefined | The idempotency token for the client request. |
Description | string | undefined | The mailbox export job description. |
StartMailboxExportJobCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
JobId | string | undefined | The job ID. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | The identifier supplied for the user, group, or resource does not exist in your organization. |
InvalidParameterException | client | One or more of the input parameters don't match the service's restrictions. |
LimitExceededException | client | The request exceeds the limit of the resource. |
OrganizationNotFoundException | client | An operation received a valid organization identifier that either doesn't belong or exist in the system. |
OrganizationStateException | client | The organization must have a valid state to perform certain operations on the organization or its members. |
WorkMailServiceException | Base exception class for all service exceptions from WorkMail service. |