Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 IoT Core pricing - Messaging.
Synopsis
- data GetRetainedMessage = GetRetainedMessage' {}
- newGetRetainedMessage :: Text -> GetRetainedMessage
- getRetainedMessage_topic :: Lens' GetRetainedMessage Text
- data GetRetainedMessageResponse = GetRetainedMessageResponse' {}
- newGetRetainedMessageResponse :: Int -> GetRetainedMessageResponse
- getRetainedMessageResponse_lastModifiedTime :: Lens' GetRetainedMessageResponse (Maybe Integer)
- getRetainedMessageResponse_payload :: Lens' GetRetainedMessageResponse (Maybe ByteString)
- getRetainedMessageResponse_topic :: Lens' GetRetainedMessageResponse (Maybe Text)
- getRetainedMessageResponse_qos :: Lens' GetRetainedMessageResponse (Maybe Natural)
- getRetainedMessageResponse_httpStatus :: Lens' GetRetainedMessageResponse Int
Creating a Request
data GetRetainedMessage Source #
The input for the GetRetainedMessage operation.
See: newGetRetainedMessage
smart constructor.
Instances
newGetRetainedMessage Source #
Create a value of GetRetainedMessage
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:topic:GetRetainedMessage'
, getRetainedMessage_topic
- The topic name of the retained message to retrieve.
Request Lenses
getRetainedMessage_topic :: Lens' GetRetainedMessage Text Source #
The topic name of the retained message to retrieve.
Destructuring the Response
data GetRetainedMessageResponse Source #
The output from the GetRetainedMessage operation.
See: newGetRetainedMessageResponse
smart constructor.
GetRetainedMessageResponse' | |
|
Instances
newGetRetainedMessageResponse Source #
Create a value of GetRetainedMessageResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:lastModifiedTime:GetRetainedMessageResponse'
, getRetainedMessageResponse_lastModifiedTime
- The Epoch date and time, in milliseconds, when the retained message was
stored by IoT.
$sel:payload:GetRetainedMessageResponse'
, getRetainedMessageResponse_payload
- The Base64-encoded message payload of the retained message body.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
$sel:topic:GetRetainedMessage'
, getRetainedMessageResponse_topic
- The topic name to which the retained message was published.
$sel:qos:GetRetainedMessageResponse'
, getRetainedMessageResponse_qos
- The quality of service (QoS) level used to publish the retained message.
$sel:httpStatus:GetRetainedMessageResponse'
, getRetainedMessageResponse_httpStatus
- The response's http status code.
Response Lenses
getRetainedMessageResponse_lastModifiedTime :: Lens' GetRetainedMessageResponse (Maybe Integer) Source #
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
getRetainedMessageResponse_payload :: Lens' GetRetainedMessageResponse (Maybe ByteString) Source #
The Base64-encoded message payload of the retained message body.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
getRetainedMessageResponse_topic :: Lens' GetRetainedMessageResponse (Maybe Text) Source #
The topic name to which the retained message was published.
getRetainedMessageResponse_qos :: Lens' GetRetainedMessageResponse (Maybe Natural) Source #
The quality of service (QoS) level used to publish the retained message.
getRetainedMessageResponse_httpStatus :: Lens' GetRetainedMessageResponse Int Source #
The response's http status code.