wiz.history¶
-
wiz.history.get(serialized=False)[source]¶ Return recorded history mapping.
Parameters: serialized – Indicate whether the returned history should be serialized as a JSON string. Default is False. Returns: History mapping - serialized or not - in the form of { "version": "3.0.0", "user": "john-doe", "hostname": "ws123", "timestamp": "2020-08-14T10:56:58.529201", "timezone": "PDT", "command": "wiz --record /tmp use foo --view", "actions": [ ... ] }
-
wiz.history.start_recording(command=None, minimal_actions=False)[source]¶ Start recording the execution history.
This command will add information about the execution context to the history mapping (username, hostname, time, timezone) and activate the recording of actions via
record_action().Parameters: - command – Indicate the command line which is being executed. Default is None.
- minimal_actions – Indicate whether actions should only include the
‘identifier’ keyword and discard all other elements passed to
record_action(). If False, the execution time will be longer when history is being recorded. Default is False.
-
wiz.history.record_action(identifier, **kwargs)[source]¶ Add an action to the history.
The action is identified by its unique identifier and every relevant arguments which will be serialized to provide an accurate snapshot of the execution context.
Parameters: identifier – Unique identifier of the action. Warning
This operation will be discarded if the history is not being
recorded.