get_retained_message
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.get_retained_message(
topic='string'
)
[REQUIRED]
The topic name of the retained message to retrieve.
{
'topic': 'string',
'payload': b'bytes',
'qos': 123,
'lastModifiedTime': 123
}
Response Structure
The output from the GetRetainedMessage operation.
The topic name to which the retained message was published.
The Base64-encoded message payload of the retained message body.
The quality of service (QoS) level used to publish the retained message.
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
Exceptions
IoTDataPlane.Client.exceptions.InvalidRequestException
IoTDataPlane.Client.exceptions.ResourceNotFoundException
IoTDataPlane.Client.exceptions.ThrottlingException
IoTDataPlane.Client.exceptions.UnauthorizedException
IoTDataPlane.Client.exceptions.ServiceUnavailableException
IoTDataPlane.Client.exceptions.InternalFailureException
IoTDataPlane.Client.exceptions.MethodNotAllowedException