Amazon WorkMail Message Flow 2019-05-01
- Client: Aws\WorkMailMessageFlow\WorkMailMessageFlowClient
- Service ID: workmailmessageflow
- Version: 2019-05-01
This page describes the parameters and results for the operations of the Amazon WorkMail Message Flow (2019-05-01), and shows how to use the Aws\WorkMailMessageFlow\WorkMailMessageFlowClient object to call the described operations. This documentation is specific to the 2019-05-01 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- GetRawMessageContent ( array $params = [] )
- Retrieves the raw content of an in-transit email message, in MIME format.
- PutRawMessageContent ( array $params = [] )
- Updates the raw content of an in-transit email message, in MIME format.
Operations
GetRawMessageContent
$result = $client->getRawMessageContent
([/* ... */]); $promise = $client->getRawMessageContentAsync
([/* ... */]);
Retrieves the raw content of an in-transit email message, in MIME format.
Parameter Syntax
$result = $client->getRawMessageContent([ 'messageId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- messageId
-
- Required: Yes
- Type: string
The identifier of the email message to retrieve.
Result Syntax
[ 'messageContent' => <string || resource || Psr\Http\Message\StreamInterface>, ]
Result Details
Members
- messageContent
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The raw content of the email message, in MIME format.
Errors
- ResourceNotFoundException:
The requested email message is not found.
PutRawMessageContent
$result = $client->putRawMessageContent
([/* ... */]); $promise = $client->putRawMessageContentAsync
([/* ... */]);
Updates the raw content of an in-transit email message, in MIME format.
This example describes how to update in-transit email message. For more information and examples for using this API, see Updating message content with AWS Lambda.
Updates to an in-transit message only appear when you call PutRawMessageContent
from an AWS Lambda function configured with a synchronous Run Lambda rule. If you call PutRawMessageContent
on a delivered or sent message, the message remains unchanged, even though GetRawMessageContent returns an updated message.
Parameter Syntax
$result = $client->putRawMessageContent([ 'content' => [ // REQUIRED 's3Reference' => [ // REQUIRED 'bucket' => '<string>', // REQUIRED 'key' => '<string>', // REQUIRED 'objectVersion' => '<string>', ], ], 'messageId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- content
-
- Required: Yes
- Type: RawMessageContent structure
Describes the raw message content of the updated email message.
- messageId
-
- Required: Yes
- Type: string
The identifier of the email message being updated.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested email message is not found.
- InvalidContentLocation:
WorkMail could not access the updated email content. Possible reasons:
-
You made the request in a region other than your S3 bucket region.
-
The S3 bucket owner is not the same as the calling AWS account.
-
You have an incomplete or missing S3 bucket policy. For more information about policies, see Updating message content with AWS Lambda in the WorkMail Administrator Guide.
-
- MessageRejected:
The requested email could not be updated due to an error in the MIME content. Check the error message for more information about what caused the error.
- MessageFrozen:
The requested email is not eligible for update. This is usually the case for a redirected email.
Shapes
InvalidContentLocation
Description
WorkMail could not access the updated email content. Possible reasons:
-
You made the request in a region other than your S3 bucket region.
-
The S3 bucket owner is not the same as the calling AWS account.
-
You have an incomplete or missing S3 bucket policy. For more information about policies, see Updating message content with AWS Lambda in the WorkMail Administrator Guide.
Members
- message
-
- Type: string
MessageFrozen
Description
The requested email is not eligible for update. This is usually the case for a redirected email.
Members
- message
-
- Type: string
MessageRejected
Description
The requested email could not be updated due to an error in the MIME content. Check the error message for more information about what caused the error.
Members
- message
-
- Type: string
RawMessageContent
Description
Provides the MIME content of the updated email message as an S3 object. All MIME content must meet the following criteria:
-
Each part of a multipart MIME message must be formatted properly.
-
Attachments must be of a content type that Amazon SES supports. For more information, see Unsupported Attachment Types.
-
If any of the MIME parts in a message contain content that is outside of the 7-bit ASCII character range, we recommend encoding that content.
-
Per RFC 5321, the maximum length of each line of text, including the <CRLF>, must not exceed 1,000 characters.
-
The message must contain all the required header fields. Check the returned error message for more information.
-
The value of immutable headers must remain unchanged. Check the returned error message for more information.
-
Certain unique headers can only appear once. Check the returned error message for more information.
Members
- s3Reference
-
- Required: Yes
- Type: S3Reference structure
The S3 reference of an email message.
ResourceNotFoundException
Description
The requested email message is not found.
Members
- message
-
- Type: string
S3Reference
Description
Amazon S3 object representing the updated message content, in MIME format.
The region for the S3 bucket containing the S3 object must match the region used for WorkMail operations. Also, for WorkMail to process an S3 object, it must have permission to access that object. For more information, see Updating message content with AWS Lambda.
Members
- bucket
-
- Required: Yes
- Type: string
The S3 bucket name.
- key
-
- Required: Yes
- Type: string
The S3 key object name.
- objectVersion
-
- Type: string
If you enable versioning for the bucket, you can specify the object version.