{ "version":"2.0", "metadata":{ "apiVersion":"2019-05-01", "endpointPrefix":"workmailmessageflow", "jsonVersion":"1.1", "protocol":"rest-json", "serviceFullName":"Amazon WorkMail Message Flow", "serviceId":"WorkMailMessageFlow", "signatureVersion":"v4", "uid":"workmailmessageflow-2019-05-01" }, "operations":{ "GetRawMessageContent":{ "name":"GetRawMessageContent", "http":{ "method":"GET", "requestUri":"/messages/{messageId}" }, "input":{"shape":"GetRawMessageContentRequest"}, "output":{"shape":"GetRawMessageContentResponse"}, "errors":[ {"shape":"ResourceNotFoundException"} ], "documentation":"

Retrieves the raw content of an in-transit email message, in MIME format.

" }, "PutRawMessageContent":{ "name":"PutRawMessageContent", "http":{ "method":"POST", "requestUri":"/messages/{messageId}" }, "input":{"shape":"PutRawMessageContentRequest"}, "output":{"shape":"PutRawMessageContentResponse"}, "errors":[ {"shape":"ResourceNotFoundException"}, {"shape":"InvalidContentLocation"}, {"shape":"MessageRejected"}, {"shape":"MessageFrozen"} ], "documentation":"

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.

" } }, "shapes":{ "GetRawMessageContentRequest":{ "type":"structure", "required":["messageId"], "members":{ "messageId":{ "shape":"messageIdType", "documentation":"

The identifier of the email message to retrieve.

", "location":"uri", "locationName":"messageId" } } }, "GetRawMessageContentResponse":{ "type":"structure", "required":["messageContent"], "members":{ "messageContent":{ "shape":"messageContentBlob", "documentation":"

The raw content of the email message, in MIME format.

" } }, "payload":"messageContent" }, "InvalidContentLocation":{ "type":"structure", "members":{ "message":{"shape":"errorMessage"} }, "documentation":"

WorkMail could not access the updated email content. Possible reasons:

", "exception":true }, "MessageFrozen":{ "type":"structure", "members":{ "message":{"shape":"errorMessage"} }, "documentation":"

The requested email is not eligible for update. This is usually the case for a redirected email.

", "exception":true }, "MessageRejected":{ "type":"structure", "members":{ "message":{"shape":"errorMessage"} }, "documentation":"

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.

", "exception":true }, "PutRawMessageContentRequest":{ "type":"structure", "required":[ "messageId", "content" ], "members":{ "messageId":{ "shape":"messageIdType", "documentation":"

The identifier of the email message being updated.

", "location":"uri", "locationName":"messageId" }, "content":{ "shape":"RawMessageContent", "documentation":"

Describes the raw message content of the updated email message.

" } } }, "PutRawMessageContentResponse":{ "type":"structure", "members":{ } }, "RawMessageContent":{ "type":"structure", "required":["s3Reference"], "members":{ "s3Reference":{ "shape":"S3Reference", "documentation":"

The S3 reference of an email message.

" } }, "documentation":"

Provides the MIME content of the updated email message as an S3 object. All MIME content must meet the following criteria:

" }, "ResourceNotFoundException":{ "type":"structure", "members":{ "message":{"shape":"errorMessage"} }, "documentation":"

The requested email message is not found.

", "error":{"httpStatusCode":404}, "exception":true }, "S3Reference":{ "type":"structure", "required":[ "bucket", "key" ], "members":{ "bucket":{ "shape":"s3BucketIdType", "documentation":"

The S3 bucket name.

" }, "key":{ "shape":"s3KeyIdType", "documentation":"

The S3 key object name.

" }, "objectVersion":{ "shape":"s3VersionType", "documentation":"

If you enable versioning for the bucket, you can specify the object version.

" } }, "documentation":"

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.

" }, "errorMessage":{"type":"string"}, "messageContentBlob":{ "type":"blob", "streaming":true }, "messageIdType":{ "type":"string", "max":120, "min":1, "pattern":"[a-z0-9\\-]*" }, "s3BucketIdType":{ "type":"string", "max":63, "min":3, "pattern":"^[a-z0-9][a-z0-9\\-]*" }, "s3KeyIdType":{ "type":"string", "max":1024, "min":1, "pattern":"[a-zA-Z0-9\\-/]*" }, "s3VersionType":{ "type":"string", "max":1024, "min":1, "pattern":".+" } }, "documentation":"

The WorkMail Message Flow API provides access to email messages as they are being sent and received by a WorkMail organization.

" }