az iot ops asset event
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.53.0 or higher). The extension will automatically install the first time you run an az iot ops asset event command. Learn more about extensions.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage events in an asset.
Name | Description | Type | Status |
---|---|---|---|
az iot ops asset event add |
Add an event to an asset. |
Extension | Preview |
az iot ops asset event export |
Export events in an asset. |
Extension | Preview |
az iot ops asset event import |
Import events in an asset. |
Extension | Preview |
az iot ops asset event list |
List events in an asset. |
Extension | Preview |
az iot ops asset event remove |
Remove an event in an asset. |
Extension | Preview |
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add an event to an asset.
az iot ops asset event add --asset
--en
--resource-group
[--name]
[--observability-mode]
[--qs]
[--replace {false, true}]
[--sampling-interval]
Add an event to an asset.
az iot ops asset event add --asset myasset -g myresourcegroup --event-notifier eventId --name eventName
Add an event to an asset with event name, observability mode, custom queue size, and custom sampling interval.
az iot ops asset event add --asset MyAsset -g MyRG --event-notifier eventId --name eventName --observability-mode log --queue-size 2 --sampling-interval 500
Asset name.
Event notifier.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Event name.
Observability mode. Must be none or log.
Custom queue size.
Replace the event if another event with the same name is already present.
Custom sampling interval (in milliseconds).
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Export events in an asset.
The file name will be {asset_name}_events.{file_type}.
az iot ops asset event export --asset
--resource-group
[--format {csv, json, yaml}]
[--od]
[--replace {false, true}]
Export all events in an asset in JSON format.
az iot ops asset event export --asset myasset -g myresourcegroup
Export all events in an asset in CSV format in a specific output directory that can be uploaded to the Digital Operations Experience.
az iot ops asset event export --asset myasset -g myresourcegroup --format csv --output-dir myAssetFiles
Export all events in an asset in YAML format. Replace the file if one is present already.
az iot ops asset event export --asset myasset -g myresourcegroup --format yaml --replace
Asset name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
File format.
Output directory for exported file.
Replace the local file if present.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Import events in an asset.
For examples of file formats, please see aka.ms/aziotops-assets.
az iot ops asset event import --asset
--if
--resource-group
[--replace {false, true}]
Import all events from a file. These events will be appended to the asset's current events. Events with duplicate names will be ignored.
az iot ops asset event import --asset myasset -g myresourcegroup --input-file myasset_events.yaml
Import all events from a file. These events will appended the asset's current events. Events with duplicate names will replace the current asset events.
az iot ops asset event import --asset myasset -g myresourcegroup --input-file myasset_events.csv --replace
Asset name.
File path for the file containing the events. The following file types are supported: json, csv, yaml.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Replace duplicate asset events with those from the file. If false, the file events will be ignored. Duplicate asset events will be determined by name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List events in an asset.
az iot ops asset event list --asset
--resource-group
List all events in an asset.
az iot ops asset event list --asset myasset -g myresourcegroup
Asset name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Remove an event in an asset.
az iot ops asset event remove --asset
--name
--resource-group
Remove an event from an asset via the event name.
az iot ops asset event remove --asset myasset -g myresourcegroup --name myevent
Asset name.
Event name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: