Share via


az iot ops ns asset custom event

Note

This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.67.0 or higher). The extension will automatically install the first time you run an az iot ops ns asset custom event command. Learn more about extensions.

Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage events for custom namespaced assets in an IoT Operations instance.

Commands

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

Add an event to a custom namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset custom event list

List events for a custom namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset custom event point

Manage event points for custom asset events in Device Registry namespaces.

Extension Preview
az iot ops ns asset custom event point add

Add an event data point to a custom asset event in a Device Registry namespace.

Extension Preview
az iot ops ns asset custom event point list

List event points for a custom asset event in a Device Registry namespace.

Extension Preview
az iot ops ns asset custom event point remove

Remove an event point from a custom asset event in a Device Registry namespace.

Extension Preview
az iot ops ns asset custom event remove

Remove an event from a custom namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset custom event show

Show details of an event for a custom namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset custom event update

Update an event for a custom namespaced asset in an IoT Operations instance.

Extension Preview

az iot ops ns asset custom event add

Preview

Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Add an event to a custom namespaced asset in an IoT Operations instance.

az iot ops ns asset custom event add --asset
                                     --en --event-notifier
                                     --instance
                                     --name
                                     --resource-group
                                     [--config]
                                     [--dest --destination]
                                     [--replace {false, true}]

Examples

Add a basic custom event

az iot ops ns asset custom event add --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name alarmEvent --event-notifier "alarm.critical"

Add a custom event with MQTT destination

az iot ops ns asset custom event add --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name statusEvent --event-notifier "status.change" --destination topic="factory/custom/events" retain=Never qos=Qos1 ttl=1800

Replace a custom event with same name

az iot ops ns asset custom event add --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name alarmEvent --event-notifier "alarm.updated" --replace

Required Parameters

--asset -a

Asset name.

--en --event-notifier

Event notifier.

--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.

--config

Custom event configuration as a JSON string or file path.

--dest --destination

Key=value pairs representing the destination for events. Allowed arguments include: key for BrokerStateStore; path for Storage; or topic, retain, qos, and ttl for MQTT. Allowed values for retain are Never and Keep and allowed values for qos are Qos0 and Qos1.

--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 custom event list

Preview

Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List events for a custom namespaced asset in an IoT Operations instance.

az iot ops ns asset custom event list --asset
                                      --instance
                                      --resource-group

Examples

List all events for a custom asset

az iot ops ns asset custom event list --asset mycustomasset --instance myInstance -g myInstanceResourceGroup

Required Parameters

--asset -a

Asset 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 custom event remove

Preview

Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Remove an event from a custom namespaced asset in an IoT Operations instance.

az iot ops ns asset custom event remove --asset
                                        --instance
                                        --name
                                        --resource-group

Examples

Remove an event from a custom asset

az iot ops ns asset custom event remove --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name alarmEvent

Required Parameters

--asset -a

Asset 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.

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 custom event show

Preview

Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show details of an event for a custom namespaced asset in an IoT Operations instance.

az iot ops ns asset custom event show --asset
                                      --instance
                                      --name
                                      --resource-group

Examples

Show event details

az iot ops ns asset custom event show --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name alarmEvent

Required Parameters

--asset -a

Asset 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.

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 custom event update

Preview

Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update an event for a custom namespaced asset in an IoT Operations instance.

az iot ops ns asset custom event update --asset
                                        --instance
                                        --name
                                        --resource-group
                                        [--config]
                                        [--dest --destination]
                                        [--en --event-notifier]

Examples

Update event notifier

az iot ops ns asset custom event update --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name alarmEvent --event-notifier "alarm.updated"

Update event destination

az iot ops ns asset custom event update --asset mycustomasset --instance myInstance -g myInstanceResourceGroup --name temperatureAlert --destination topic="factory/custom/alerts/updated" retain=Keep qos=Qos0 ttl=3600

Required Parameters

--asset -a

Asset 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.

--config

Custom event configuration as a JSON string or file path.

--dest --destination

Key=value pairs representing the destination for events. Allowed arguments include: key for BrokerStateStore; path for Storage; or topic, retain, qos, and ttl for MQTT. Allowed values for retain are Never and Keep and allowed values for qos are Qos0 and Qos1.

--en --event-notifier

Event notifier.

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