:doc:`WorkMailMessageFlow <../../workmailmessageflow>` / Client / put_raw_message_content

***********************
put_raw_message_content
***********************



.. py:method:: WorkMailMessageFlow.Client.put_raw_message_content(**kwargs)

  

  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 <https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html>`__.

   

  .. note::

    

    Updates to an in-transit message only appear when you call ``PutRawMessageContent`` from an AWS Lambda function configured with a synchronous `Run Lambda <https://docs.aws.amazon.com/workmail/latest/adminguide/lambda.html#synchronous-rules>`__ rule. If you call ``PutRawMessageContent`` on a delivered or sent message, the message remains unchanged, even though `GetRawMessageContent <https://docs.aws.amazon.com/workmail/latest/APIReference/API_messageflow_GetRawMessageContent.html>`__ returns an updated message.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmailmessageflow-2019-05-01/PutRawMessageContent>`_  


  **Request Syntax**
  ::

    response = client.put_raw_message_content(
        messageId='string',
        content={
            's3Reference': {
                'bucket': 'string',
                'key': 'string',
                'objectVersion': 'string'
            }
        }
    )
    
  :type messageId: string
  :param messageId: **[REQUIRED]** 

    The identifier of the email message being updated.

    

  
  :type content: dict
  :param content: **[REQUIRED]** 

    Describes the raw message content of the updated email message.

    

  
    - **s3Reference** *(dict) --* **[REQUIRED]** 

      The S3 reference of an email message.

      

    
      - **bucket** *(string) --* **[REQUIRED]** 

        The S3 bucket name.

        

      
      - **key** *(string) --* **[REQUIRED]** 

        The S3 key object name.

        

      
      - **objectVersion** *(string) --* 

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

        

      
    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkMailMessageFlow.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`WorkMailMessageFlow.Client.exceptions.InvalidContentLocation`

  
  *   :py:class:`WorkMailMessageFlow.Client.exceptions.MessageRejected`

  
  *   :py:class:`WorkMailMessageFlow.Client.exceptions.MessageFrozen`

  