v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1474530.7 KB

Gets the details of a single retained message for the specified topic.

This action returns the message payload of the retained message, which can incur messaging costs. To list only the topic names of the retained messages, call ListRetainedMessages.

Requires permission to access the GetRetainedMessage action.

For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.

get/retainedMessage/{topic}

Path parameters

topicstring required

The topic name of the retained message to retrieve.

Response

Success

topicstring

The topic name to which the retained message was published.

payloadstring

The Base64-encoded message payload of the retained message body.

qosinteger

The quality of service (QoS) level used to publish the retained message.

lastModifiedTimeinteger

The Epoch date and time, in milliseconds, when the retained message was stored by IoT.

userPropertiesstring
<p>A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't include any user properties.</p> <p>The following example <code>userProperties</code> parameter is a JSON string that represents two user properties. Note that it will be base64-encoded:</p> <p> <code>[{"deviceName": "alpha"}, {"deviceCnt": "45"}]</code> </p>