az iot ops asset event

Note

This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.46.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.

Commands

Name Description Type Status
az iot ops asset event add

Add an event to 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

az iot ops asset event add

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
                           [--capability-id]
                           [--name]
                           [--observability-mode]
                           [--qs]
                           [--sampling-interval]

Examples

Add an event to an asset.

az iot ops asset event add --asset {asset} -g {resource_group} --event-notifier {event_notifier}

Add an event to an asset with capability id, event name, observability mode, custom queue size, and custom sampling interval.

az iot ops asset event add --asset {asset} -g {resource_group} --event-notifier {event_notifier} --name {name} --capability-id {capability_id} --observability-mode {observability_mode} --queue-size {queue_size} --sampling-interval {sampling_interval}

Add an event to an asset with the given pre-filled values.

az iot ops asset event add --asset MyAsset -g MyRG --event-notifier eventId --name eventName --capability-id tagId1 --observability-mode histogram --queue-size 2 --sampling-interval 500

Required Parameters

--asset -a

Asset name.

--en --event-notifier

Event notifier.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--capability-id --ci

Capability Id. If not provided, event name will be used.

--name -n

Event name.

--observability-mode --om

Observability mode.

--qs --queue-size

Custom queue size.

--sampling-interval --si

Custom sampling interval (in milliseconds).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops asset event list

Preview

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

Examples

List all events in an asset.

az iot ops asset event list --asset {asset} -g {resource_group}

Required Parameters

--asset -a

Asset name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops asset event remove

Preview

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
                              --resource-group
                              [--en]
                              [--name]

Examples

Remove an event from an asset via the event notifier.

az iot ops asset event remove --asset {asset} -g {resource_group} --event-notifier {event_notifier}

Remove an event from an asset via the event name.

az iot ops asset event remove --asset {asset} -g {resource_group} --name {name}

Required Parameters

--asset -a

Asset name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--en --event-notifier

Event notifier.

--name -n

Event name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.