putRawMessageContent method

Future<void> putRawMessageContent({
  1. required RawMessageContent content,
  2. required String messageId,
})

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.

May throw InvalidContentLocation. May throw MessageFrozen. May throw MessageRejected. May throw ResourceNotFoundException.

Parameter content : Describes the raw message content of the updated email message.

Parameter messageId : The identifier of the email message being updated.

Implementation

Future<void> putRawMessageContent({
  required RawMessageContent content,
  required String messageId,
}) async {
  final $payload = <String, dynamic>{
    'content': content,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/messages/${Uri.encodeComponent(messageId)}',
    exceptionFnMap: _exceptionFns,
  );
}