diff --git a/amazon_kclpy/messages.py b/amazon_kclpy/messages.py index c21722ed..2b0c9c1e 100644 --- a/amazon_kclpy/messages.py +++ b/amazon_kclpy/messages.py @@ -333,6 +333,7 @@ def __init__(self, json_dict): * subSequenceNumber The provided dictionary can optionally contain: + * action * error :param dict json_dict: @@ -340,6 +341,7 @@ def __init__(self, json_dict): self._sequence_number = json_dict["sequenceNumber"] self._sub_sequence_number = json_dict["subSequenceNumber"] self._error = json_dict.get("error", None) + self._action = json_dict.get("action", "checkpoint") @property def sequence_number(self): @@ -373,6 +375,16 @@ def error(self): """ return self._error + @property + def action(self): + """ + The action that spawned this message + + :return: the original action value + :rtype: str + """ + return self._action + class Record(object): """