Share via


az iot ops ns asset opcua event

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 opcua event command. Learn more about extensions.

Manage individual events for OPC UA asset event groups in Device Registry namespaces.

Commands

Name Description Type Status
az iot ops ns asset opcua event add

Add an event to an OPC UA asset event group in a Device Registry namespace.

Extension GA
az iot ops ns asset opcua event export

Export events to file.

Extension GA
az iot ops ns asset opcua event import

Import events from file.

Extension GA
az iot ops ns asset opcua event list

List events for an OPC UA asset event group in a Device Registry namespace.

Extension GA
az iot ops ns asset opcua event remove

Remove an event from an OPC UA asset event group in a Device Registry namespace.

Extension GA

az iot ops ns asset opcua event add

Add an event to an OPC UA asset event group in a Device Registry namespace.

az iot ops ns asset opcua event add --asset
                                    --eg --event-group
                                    --instance
                                    --name
                                    --resource-group
                                    [--acquire-policy-token]
                                    [--change-reference]
                                    [--data-source --ds]
                                    [--fc --filter-clause]
                                    [--filter-type --ft]
                                    [--qs --queue-size]
                                    [--replace {false, true}]
                                    [--sampling-interval --si]

Examples

Add a basic OPC UA event

az iot ops ns asset opcua event add --asset myopcuaasset --instance myInstance -g myInstanceResourceGroup --event-group alarmGroup --name severity --data-source "alarm.severity"

Add an OPC UA event with sampling interval and queue size

az iot ops ns asset opcua event add --asset myopcuaasset --instance myInstance -g myInstanceResourceGroup --event-group alarmGroup --name pressure --data-source "alarm.pressure" --sampling-int 500 --queue-size 5

Replace an OPC UA event with same name

az iot ops ns asset opcua event add --asset myopcuaasset --instance myInstance -g myInstanceResourceGroup --event-group alarmGroup --name severity --data-source "alarm.severity.updated" --replace

Add an OPC UA event with filter type and filter clauses

az iot ops ns asset opcua event add --asset myopcuaasset --instance myInstance -g myInstanceResourceGroup --event-group alarmGroup --name criticalAlarm --data-source "alarm.critical" --filter-type "ns=2;i=5001" --filter-clause path="/EventType" type="ns=2;i=5001"

Required Parameters

--asset -a

Asset name.

--eg --event-group

Event name.

--instance -i

The name of the Azure IoT Operations instance.

--name

Event name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--data-source --ds

Data source for the event.

--fc --filter-clause

Space-separated key=value pairs for event filter clauses. Allowed keys are path (required), type, and field. This parameter can be specified multiple times to add multiple clauses.

--filter-type --ft

Filter type definition ID for the event.

--qs --queue-size

Queue size.

--replace

Replace the event if another event with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
--sampling-interval --si

Sampling interval in milliseconds.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot ops ns asset opcua event export

Export events to file.

Export events from an event-group to JSON, YAML, or CSV format.

az iot ops ns asset opcua event export --asset
                                       --eg --event-group
                                       --instance
                                       --resource-group
                                       [--acquire-policy-token]
                                       [--change-reference]
                                       [--format {csv, json, yaml}]
                                       [--od --output-dir]
                                       [--replace {false, true}]

Required Parameters

--asset -a

Asset name.

--eg --event-group

Event-group name.

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--format -f

Export file format.

Property Value
Default value: json
Accepted values: csv, json, yaml
--od --output-dir

Output directory for export.

Property Value
Default value: .
--replace

Replace the event if another event with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot ops ns asset opcua event import

Import events from file.

Import events from JSON, YAML, or CSV file. Use --replace to merge with overwrite.

az iot ops ns asset opcua event import --asset
                                       --eg --event-group
                                       --if --input-file
                                       --instance
                                       --resource-group
                                       [--acquire-policy-token]
                                       [--change-reference]
                                       [--replace {false, true}]

Required Parameters

--asset -a

Asset name.

--eg --event-group

Event-group name.

--if --input-file

Path to import file (JSON, YAML, or CSV).

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--replace

Replace the event if another event with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot ops ns asset opcua event list

List events for an OPC UA asset event group in a Device Registry namespace.

az iot ops ns asset opcua event list --asset
                                     --eg --event-group
                                     --instance
                                     --resource-group

Examples

List all events for an event group

az iot ops ns asset opcua event list --asset myopcuaasset --instance myInstance -g myInstanceResourceGroup --event-group alarmGroup

Required Parameters

--asset -a

Asset name.

--eg --event-group

Event name.

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

The resource group of the Azure IoT Operations instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot ops ns asset opcua event remove

Remove an event from an OPC UA asset event group in a Device Registry namespace.

az iot ops ns asset opcua event remove --asset
                                       --eg --event-group
                                       --instance
                                       --name
                                       --resource-group
                                       [--acquire-policy-token]
                                       [--change-reference]

Examples

Remove an event from an event group

az iot ops ns asset opcua event remove --asset myopcuaasset --instance myInstance -g myInstanceResourceGroup --event-group alarmGroup --name severity

Required Parameters

--asset -a

Asset name.

--eg --event-group

Event name.

--instance -i

The name of the Azure IoT Operations instance.

--name

Event name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False