:doc:`Message <index>` / Attribute / message_attributes

******************
message_attributes
******************



.. py:attribute:: SQS.Message.message_attributes

  

  - *(dict) --* 

    Each message attribute consists of a ``Name``, ``Type``, and ``Value``. For more information, see `Amazon SQS message attributes <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes>`__ in the *Amazon SQS Developer Guide*.

    
    

    - *(string) --* 
      

      - *(dict) --* 

        The user-specified message attribute value. For string data types, the ``Value`` attribute has the same restrictions on the content as the message body. For more information, see ``SendMessage.``

         

        ``Name``, ``type``, ``value`` and the message body must not be empty or null. All parts of the message attribute, including ``Name``, ``Type``, and ``Value``, are part of the message size restriction (1 MiB or 1,048,576 bytes).

        
        

        - **StringValue** *(string) --* 

          Strings are Unicode with UTF-8 binary encoding. For a list of code values, see `ASCII Printable Characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__.

          
        

        - **BinaryValue** *(bytes) --* 

          Binary type attributes can store any binary data, such as compressed data, encrypted data, or images.

          
        

        - **StringListValues** *(list) --* 

          Not implemented. Reserved for future use.

          
          

          - *(string) --* 
      
        

        - **BinaryListValues** *(list) --* 

          Not implemented. Reserved for future use.

          
          

          - *(bytes) --* 
      
        

        - **DataType** *(string) --* 

          Amazon SQS supports the following logical data types: ``String``, ``Number``, and ``Binary``. For the ``Number`` data type, you must use ``StringValue``.

           

          You can also append custom labels. For more information, see `Amazon SQS Message Attributes <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes>`__ in the *Amazon SQS Developer Guide*.

          
    

