Message Recording Management Tool Reference
message-recording <command> <options>
Available commands are:
- list
retrieve and display the list of message recordings of the specified type
- status
get the status of the specified message recording
- stage
stage a specified message recording (or all persisted recordings)
- persist
persist a specified message recording (or all staged recordings)
- delete
delete either a specified message recording or all message recordings of a specified type (staged or persisted)
- help
display usage information
- version
display version information.
list
Retrieves and displays the list of message recordings of the specified type. Options:
- -l location, --location location
The location of the message recording. The following values are supported: staged or persisted. Required, unless –all option is specified.
- --all
Indicates that both staged and persisted message recordings should be listed in the output. Optional.
- --provider
The name of an active persistence provider. Required when listing persisted message recordings. Optional.
- -d, --detailed
Indicates detailed output format. If this option is omitted, the brief format is used. Optional.
Examples
Command line:
message-recording list --location staged
Output:
Staged Recordings:
Rec Id Status
------ ------
2023-08-09T00-13-01 Stopped Elapsed Time
2023-08-25T17-54-48 Persisting
Command line:
message-recording list --location staged -d
Output:
Staged Recordings:
Rec Id Status Start Time Stop Time Name
------ ------ ---------- --------- ----
2023-08-09T00-13-01 Stopped Elapsed Time 2023-08-09T00:13:01 2023-08-09T01:10:01.123 My Azure IoT Hub Recording
2023-08-25T17-54-48 Persisting 2023-08-25T17:54:48 2023-08-25T18:24:15.345 Message Recording Stress Test
Command line:
message-recording list --location persisted
Output:
Persisted Recordings:
Rec Id Status
------ ------
2023-09-20T11-22-33 Persisted
Command line:
message-recording list --all --detailed
Output:
Staged Recordings:
Rec Id Status Start Time Stop Time Name
------ ------ ---------- --------- ----
2023-08-09T00-13-01 Stopped Elapsed Time 2023-08-09T00:13:01 2023-08-09T01:10:01.123 My Azure IoT Hub Recording
2023-08-25T17-54-48 Staged 2023-08-25T17:54:48 2023-08-25T18:24:15.345 Message Recording Stress Test
Persisted Recordings:
Rec Id Status Start Time Stop Time Name
------ ------ ---------- --------- ----
2023-09-20T11-22-33 Persisted 2023-09-20T11:22:33 2023-09-20T12:22:33.424 My Azure IoT Hub Recording
status
Gets the status of the specified message recording. Options:
- -r recId, --recid recordingId
A message recording Id. Required, unless –name option is used
- -n name, --name recordingName
A message recording name. Required, unless –recid option is used
Example
Command line:
message-recording status --recid 2023-08-25T17-54-48
Output:
Message Recording Status:
Rec Id Status Name Progress (%)
------ ------ ---- ------------
2023-08-25T17-54-48 Persisting Message Recording Stress Test 40
stage
Stages a specified message recording (or all persisted recordings). Options:
- -r recId, --recid recordingId
A message recording Id to be staged. Required, unless –name or –all option is used.
- -n name, --name recordingName
A message recording name to be staged. Required, unless –recid or –all option is used.
- --all
Indicates that all persisted message recordings should be staged. Optional.
Example
Command line:
message-recording stage --recid 2023-09-20T11-22-33
Output:
The Stage operation for the message recording 2023-09-20T11-22-33 has started successfully.
Run the 'message-recording status --recid 2023-09-20T11-22-33' command to check the progress.
persist
Persists a specified message recording (or all staged recordings). Options:
- -r recId, --recid recordingId
A message recording Id to be persisted. Required, unless –name or –all option is used.
- -n name, --name recordingName
A message recording name to be persisted. Required, unless –recid or –all option is used.
- --all
Indicates that all staged message recordings should be persisted. Optional.
Example
Command line:
message-recording persist --name “Message Recording Stress Test”
Output:
The Persist operation for the message recording “Message Recording Stress Test” has started successfully.
Run the 'message-recording status --name “Message Recording Stress Test”' command to check the progress.
delete
Deletes either a specified message recording or all message recordings of a specified type (staged or persisted). Options.
- -r recId, --recid recordingId
A message recording ID to be deleted. Required, unless –name or –all option is used.
- -n name, --name recordingName
A message recording name to be deleted. Required, unless –recid or –all option is used.
- -l location, --location location
The location of message recording. The following values are supported: staged or persisted. Required.
- --all
Indicates that all message recordings from the specified location should be deleted. Optional.
Examples
1. Delete a staged message recording 2023-08-25T17-54-48
Command line:
message-recording delete --recid 2023-08-25T17-54-48 --location staged
Output:
The Delete operation for staged message recording 2023-09-20T11-22-33 has started successfully.
Run the 'message-recording list --all -d' command to check the progress.
2. Delete all persisted message recordings
Command line:
message-recording delete --location persisted –all
Output:
The Delete operation for all persisted message recordings has started successfully.
Run the 'message-recording list --all -d' command to check the progress.
help
Displays usage information.
version
Displays version information about the message-recording tool.