batch_put_message
(**kwargs)¶Sends a set of messages to the IoT Events system. Each message payload is transformed into the input you specify ( "inputName"
) and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.
See also: AWS API Documentation
Request Syntax
response = client.batch_put_message(
messages=[
{
'messageId': 'string',
'inputName': 'string',
'payload': b'bytes',
'timestamp': {
'timeInMillis': 123
}
},
]
)
[REQUIRED]
The list of messages to send. Each message has the following format: '{ "messageId": "string", "inputName": "string", "payload": "string"}'
Information about a message.
The ID to assign to the message. Within each batch sent, each "messageId"
must be unique.
The name of the input into which the message payload is transformed.
The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).
The timestamp associated with the message.
The value of the timestamp, in the Unix epoch format.
{
'BatchPutMessageErrorEntries': [
{
'messageId': 'string',
'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
'errorMessage': 'string'
},
]
}
Response Structure
A list of any errors encountered when sending the messages.
Contains information about the errors encountered.
The ID of the message that caused the error. (See the value corresponding to the "messageId"
key in the "message"
object.)
The error code.
A message that describes the error.
Exceptions
IoTEventsData.Client.exceptions.InvalidRequestException
IoTEventsData.Client.exceptions.InternalFailureException
IoTEventsData.Client.exceptions.ServiceUnavailableException
IoTEventsData.Client.exceptions.ThrottlingException