Skip to content

Asset Examples

Victoria Litvinova edited this page Dec 5, 2024 · 2 revisions

Examples of files for az iot ops asset create, az iot ops asset data-point import, and az iot ops asset event import. Note that the csv file should be accepted by the portal.

Data-point file examples:

The following excerpts will create the same two data-points.

csv:

NodeID,TagName,QueueSize,ObservabilityMode,Sampling Interval Milliseconds
NodeID1,myTagName1,2,counter,10
NodeID2,myTagName2,1,none,500

json:

[
  {
    "dataPointConfiguration": "{\"samplingInterval\": 10, \"queueSize\": 2}",
    "dataSource": "NodeID1",
    "name": "myTagName1",
    "observabilityMode": "counter"
  },
  {
    "dataPointConfiguration": "{}",
    "dataSource": "NodeID2",
    "name": "myTagName2",
    "observabilityMode": "none"
  }
]

yaml:

- dataPointConfiguration: '{"samplingInterval": 10, "queueSize": 2}'
  dataSource: NodeID1
  name: myTagName1
  observabilityMode: counter
- dataPointConfiguration: '{}'
  dataSource: NodeID2
  name: myTagName2
  observabilityMode: none

Event file examples:

The following excerpts will create the same two events.

csv

EventNotifier,EventName,QueueSize,ObservabilityMode
myEventID1,myEventName1,3,log
myEventId2,myEventName2,1,none

json

[
  {
    "eventConfiguration": "{\"queueSize\": 3}",
    "eventNotifier": "myEventID1",
    "name": "myEventName1",
    "observabilityMode": "log"
  },
  {
    "eventConfiguration": "{}",
    "eventNotifier": "myEventId2",
    "name": "myEventName2",
    "observabilityMode": "none"
  }
]

yaml

- eventConfiguration: '{"queueSize": 3}'
  eventNotifier: myEventID1
  name: myEventName1
  observabilityMode: log
- eventConfiguration: '{}'
  eventNotifier: myEventId2
  name: myEventName2
  observabilityMode: none

Clone this wiki locally