az iot ops ns asset event-group
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.70.0 or higher). The extension will automatically install the first time you run an az iot ops ns asset event-group command. Learn more about extensions.
Manage event-groups for namespaced assets in an IoT Operations instance.
The connector type is detected automatically from the existing asset. For connector-specific parameters use --event-group-config (inline JSON or file). Use --show-template to discover the supported configuration schema for the asset's connector type.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az iot ops ns asset event-group add |
Add an event-group to a namespaced asset in an IoT Operations instance. |
Extension | Preview |
| az iot ops ns asset event-group export |
Export event-groups to file. |
Extension | Preview |
| az iot ops ns asset event-group import |
Import event-groups from file. |
Extension | Preview |
| az iot ops ns asset event-group list |
List event-groups for a namespaced asset in an IoT Operations instance. |
Extension | Preview |
| az iot ops ns asset event-group remove |
Remove an event-group from a namespaced asset in an IoT Operations instance. |
Extension | Preview |
| az iot ops ns asset event-group show |
Show details of an event-group for a namespaced asset in an IoT Operations instance. |
Extension | Preview |
| az iot ops ns asset event-group update |
Update an event-group for a namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset event-group add
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add an event-group to a namespaced asset in an IoT Operations instance.
The connector type is detected from the asset's device endpoint. Connector-specific configuration can be supplied via --event-group-config. Use --show-template to discover the supported config schema. For non-OPC UA connectors, a connector template must exist in the instance.
az iot ops ns asset event-group add --asset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--data-source --ds]
[--egc --event-group-config]
[--replace {false, true}]
[--show-template {config, schema}]
[--tr --type-ref]
Examples
Add a basic event-group to any asset type
az iot ops ns asset event-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup
Show the event-group config template for the asset's connector type
az iot ops ns asset event-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --show-template config
Add an event-group with connector-specific configuration from inline JSON
az iot ops ns asset event-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --event-group-config '{"eventGroupConfiguration": {"queueSize": 5}}'
Add an event-group with configuration from a file
az iot ops ns asset event-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --event-group-config ./event_group_config.json
Add an event-group with a default MQTT destination
az iot ops ns asset event-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --event-group-config '{"destinations": [{"target": "Mqtt", "configuration": {"topic": "factory/alarms", "retain": "Keep", "qos": "Qos1", "ttl": 3600}}]}'
Replace an existing event-group
az iot ops ns asset event-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --replace
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Event-group name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Data source for the event-group.
Inline JSON string or path to a JSON/YAML file (.json, .yaml, .yml) containing connector-specific event-group configuration and/or default destinations. Accepted keys are 'eventGroupConfiguration' (connector-specific config object) and 'destinations' (list of destination objects). Use --show-template to discover the supported keys and schema for the asset's connector type. Cannot be combined with --show-template. For non-OPC UA connectors, a connector template must exist in the instance.
Replace the event-group if another event-group with the same name is already present.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Show a starter event-group configuration template for the asset's connector type and exit without modifying the event-group. The connector type is read from the existing asset. config: fields shown with their default values (null if no default); output is directly usable as --event-group-config input. schema: every field includes type, default, and constraints (min, max, enum, pattern). Draft-07 $ref pointers (#/definitions/...) are resolved inline in both modes.
| Property | Value |
|---|---|
| Accepted values: | config, schema |
Type definition ID or URI.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset event-group export
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Export event-groups to file.
az iot ops ns asset event-group export --asset
--instance
--resource-group
[--acquire-policy-token]
[--change-reference]
[--format {json, yaml}]
[--od --output-dir]
[--replace {false, true}]
Examples
Export event-groups to JSON
az iot ops ns asset event-group export --asset myasset --instance myInstance -g myInstanceResourceGroup
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Export file format (JSON or YAML).
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, yaml |
Output directory for export.
| Property | Value |
|---|---|
| Default value: | . |
Replace the local file if present.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset event-group import
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Import event-groups from file.
az iot ops ns asset event-group import --asset
--if --input-file
--instance
--resource-group
[--acquire-policy-token]
[--change-reference]
[--replace {false, true}]
Examples
Import event-groups from a JSON file
az iot ops ns asset event-group import --asset myasset --instance myInstance -g myInstanceResourceGroup --input-file ./event_groups.json
Required Parameters
Asset name.
Path to import file (JSON or YAML).
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Replace existing event-groups that share a name with an imported event-group.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset event-group list
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List event-groups for a namespaced asset in an IoT Operations instance.
az iot ops ns asset event-group list --asset
--instance
--resource-group
Examples
List all event-groups for an asset
az iot ops ns asset event-group list --asset myasset --instance myInstance -g myInstanceResourceGroup
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset event-group remove
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Remove an event-group from a namespaced asset in an IoT Operations instance.
az iot ops ns asset event-group remove --asset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
Examples
Remove an event-group from an asset
az iot ops ns asset event-group remove --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Event-group name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset event-group show
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show details of an event-group for a namespaced asset in an IoT Operations instance.
az iot ops ns asset event-group show --asset
--instance
--name
--resource-group
Examples
Show event-group details
az iot ops ns asset event-group show --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Event-group name.
The resource group of the Azure IoT Operations instance.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset event-group update
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update an event-group for a namespaced asset in an IoT Operations instance.
The connector type is detected from the asset's device endpoint. Use --event-group-config to supply connector-specific configuration. Use --show-template config to see current event-group values pre-filled in the full schema structure (ready to edit and pass back via --event-group-config). Use --show-template schema to see the full connector schema with types and constraints.
az iot ops ns asset event-group update --asset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--data-source --ds]
[--egc --event-group-config]
[--show-template {config, schema}]
[--tr --type-ref]
Examples
Show current event-group config pre-filled with existing values (for editing before update)
az iot ops ns asset event-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --show-template config
Show the event-group config schema with types and constraints
az iot ops ns asset event-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --show-template schema
Update event-group configuration from inline JSON
az iot ops ns asset event-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --event-group-config '{"eventGroupConfiguration": {"queueSize": 10}}'
Update event-group data source
az iot ops ns asset event-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name alarmGroup --data-source "alarm.updated"
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Event-group name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Data source for the event-group.
Inline JSON string or path to a JSON/YAML file (.json, .yaml, .yml) containing connector-specific event-group configuration and/or default destinations. Accepted keys are 'eventGroupConfiguration' (connector-specific config object) and 'destinations' (list of destination objects). Use --show-template to discover the supported keys and schema for the asset's connector type. Cannot be combined with --show-template. For non-OPC UA connectors, a connector template must exist in the instance.
Show a starter event-group configuration template for the asset's connector type and exit without modifying the event-group. The connector type is read from the existing asset. config: fields shown with their default values (null if no default); output is directly usable as --event-group-config input. schema: every field includes type, default, and constraints (min, max, enum, pattern). Draft-07 $ref pointers (#/definitions/...) are resolved inline in both modes.
| Property | Value |
|---|---|
| Accepted values: | config, schema |
Type definition ID or URI.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |