IoTAnalytics.Client.
batch_put_message
(**kwargs)¶Sends messages to a channel.
See also: AWS API Documentation
Request Syntax
response = client.batch_put_message(
channelName='string',
messages=[
{
'messageId': 'string',
'payload': b'bytes'
},
]
)
[REQUIRED]
The name of the channel where the messages are sent.
[REQUIRED]
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:
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.
Information about a message.
The ID you want to assign to the message. Each messageId
must be unique within each batch sent.
The payload of the message. This can be a JSON string or a base64-encoded string representing binary data, in which case you must decode it by means of a pipeline activity.
dict
Response Syntax
{
'batchPutMessageErrorEntries': [
{
'messageId': 'string',
'errorCode': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
(dict) --
batchPutMessageErrorEntries (list) --
A list of any errors encountered when sending the messages to the channel.
(dict) --
Contains informations about errors.
messageId (string) --
The ID of the message that caused the error. See the value corresponding to the messageId
key in the message object.
errorCode (string) --
The code associated with the error.
errorMessage (string) --
The message associated with the error.
Exceptions
IoTAnalytics.Client.exceptions.ResourceNotFoundException
IoTAnalytics.Client.exceptions.InvalidRequestException
IoTAnalytics.Client.exceptions.InternalFailureException
IoTAnalytics.Client.exceptions.ServiceUnavailableException
IoTAnalytics.Client.exceptions.ThrottlingException