| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.IoTAnalytics.BatchPutMessage
Description
Sends messages to a channel.
Synopsis
- data BatchPutMessage = BatchPutMessage' {
- channelName :: Text
- messages :: [Message]
- newBatchPutMessage :: Text -> BatchPutMessage
- batchPutMessage_channelName :: Lens' BatchPutMessage Text
- batchPutMessage_messages :: Lens' BatchPutMessage [Message]
- data BatchPutMessageResponse = BatchPutMessageResponse' {}
- newBatchPutMessageResponse :: Int -> BatchPutMessageResponse
- batchPutMessageResponse_batchPutMessageErrorEntries :: Lens' BatchPutMessageResponse (Maybe [BatchPutMessageErrorEntry])
- batchPutMessageResponse_httpStatus :: Lens' BatchPutMessageResponse Int
Creating a Request
data BatchPutMessage Source #
See: newBatchPutMessage smart constructor.
Constructors
| BatchPutMessage' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> BatchPutMessage |
Create a value of BatchPutMessage 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:
BatchPutMessage, batchPutMessage_channelName - The name of the channel where the messages are sent.
$sel:messages:BatchPutMessage', batchPutMessage_messages - The list of messages to be sent. Each message has the format: {
"messageId": "string", "payload": "string"}.
The field names of message payloads (data) that you send to IoT Analytics:
- Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.
- Must begin with an alphabetic character or single underscore (_).
- Cannot contain hyphens (-).
- In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".
- Cannot be more than 255 characters.
- Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)
For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.
Request Lenses
batchPutMessage_channelName :: Lens' BatchPutMessage Text Source #
The name of the channel where the messages are sent.
batchPutMessage_messages :: Lens' BatchPutMessage [Message] Source #
The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.
The field names of message payloads (data) that you send to IoT Analytics:
- Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.
- Must begin with an alphabetic character or single underscore (_).
- Cannot contain hyphens (-).
- In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".
- Cannot be more than 255 characters.
- Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)
For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.
Destructuring the Response
data BatchPutMessageResponse Source #
See: newBatchPutMessageResponse smart constructor.
Constructors
| BatchPutMessageResponse' | |
Fields
| |
Instances
newBatchPutMessageResponse Source #
Create a value of BatchPutMessageResponse 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:batchPutMessageErrorEntries:BatchPutMessageResponse', batchPutMessageResponse_batchPutMessageErrorEntries - A list of any errors encountered when sending the messages to the
channel.
$sel:httpStatus:BatchPutMessageResponse', batchPutMessageResponse_httpStatus - The response's http status code.
Response Lenses
batchPutMessageResponse_batchPutMessageErrorEntries :: Lens' BatchPutMessageResponse (Maybe [BatchPutMessageErrorEntry]) Source #
A list of any errors encountered when sending the messages to the channel.
batchPutMessageResponse_httpStatus :: Lens' BatchPutMessageResponse Int Source #
The response's http status code.