@@ -8,6 +8,7 @@ param clusterName string
88param customLocationName string
99param aioExtensionName string
1010param aioInstanceName string
11+ param aioNamespaceName string
1112param resourceSuffix string = substring (uniqueString (subscription ().id , resourceGroup ().id , clusterName ), 0 , 10 )
1213param eventHubName string = 'aio-eh-${resourceSuffix }'
1314param defaultDataflowEndpointName string = 'default'
@@ -44,49 +45,71 @@ resource defaultDataflowProfile 'Microsoft.IoTOperations/instances/dataflowProfi
4445 parent : aioInstance
4546}
4647
48+ resource namespace 'Microsoft.DeviceRegistry/namespaces@2025-07-01-preview' existing = {
49+ name : aioNamespaceName
50+ }
51+
4752/*****************************************************************************/
4853/* Asset */
4954/*****************************************************************************/
5055
5156var assetName = 'oven'
57+ var opcUaEndpointName = 'opc-ua-connector-0'
5258
53- resource assetEndpoint 'Microsoft.DeviceRegistry/assetEndpointProfiles@2024-11-01' = {
54- name : 'opc-ua-connector-0'
59+ resource device 'Microsoft.DeviceRegistry/namespaces/devices@2025-07-01-preview' = {
60+ name : 'opc-ua-connector'
61+ parent : namespace
5562 location : resourceGroup ().location
5663 extendedLocation : {
5764 type : 'CustomLocation'
5865 name : customLocation .id
5966 }
6067 properties : {
61- targetAddress : 'opc.tcp://opcplc-000000:50000'
62- endpointProfileType : 'Microsoft.OpcUa'
63- authentication : {
64- method : 'Anonymous'
68+ endpoints : {
69+ outbound : {
70+ assigned : {}
71+ }
72+ inbound : {
73+ opcUaEndpointName : {
74+ endpointType : 'Microsoft.OpcUa'
75+ address : 'opc.tcp://opcplc-000000:50000'
76+ version : '1.0'
77+ authentication : {
78+ method : 'Anonymous'
79+ }
80+ }
81+ }
6582 }
6683 }
6784}
6885
69- resource asset 'Microsoft.DeviceRegistry/assets@2024-11 -01' = {
86+ resource asset 'Microsoft.DeviceRegistry/namespaces/ assets@2025-07 -01-preview ' = {
7087 name : assetName
88+ parent : namespace
7189 location : resourceGroup ().location
7290 extendedLocation : {
7391 type : 'CustomLocation'
7492 name : customLocation .id
7593 }
7694 properties : {
7795 displayName : assetName
78- assetEndpointProfileRef : assetEndpoint .name
96+ deviceRef : {
97+ deviceName : device .name
98+ endpointName : opcUaEndpointName
99+ }
79100 description : 'Multi-function large oven for baked goods.'
80101
81102 enabled : true
82- manufacturer : 'Contoso'
83- manufacturerUri : 'http://www.contoso.com/ovens'
84- model : 'Oven-003'
85- productCode : '12345C'
86- hardwareRevision : '2.3'
87- softwareRevision : '14.1'
88- serialNumber : '12345'
89- documentationUri : 'http://docs.contoso.com/ovens'
103+ attributes : {
104+ manufacturer : 'Contoso'
105+ manufacturerUri : 'http://www.contoso.com/ovens'
106+ model : 'Oven-003'
107+ productCode : '12345C'
108+ hardwareRevision : '2.3'
109+ softwareRevision : '14.1'
110+ serialNumber : '12345'
111+ documentationUri : 'http://docs.contoso.com/ovens'
112+ }
90113
91114 datasets : [
92115 {
@@ -96,25 +119,23 @@ resource asset 'Microsoft.DeviceRegistry/assets@2024-11-01' = {
96119 name : 'Temperature'
97120 dataSource : 'ns=3;s=SpikeData'
98121 dataPointConfiguration : '{"samplingInterval":500,"queueSize":1}'
99- observabilityMode : 'None'
100122 }
101123 {
102124 name : 'EnergyUse'
103125 dataSource : 'ns=3;s=FastUInt10'
104126 dataPointConfiguration : '{"samplingInterval":500,"queueSize":1}'
105- observabilityMode : 'None'
106127 }
107128 {
108129 name : 'Weight'
109130 dataSource : 'ns=3;s=FastUInt9'
110131 dataPointConfiguration : '{"samplingInterval":500,"queueSize":1}'
111- observabilityMode : 'None'
112132 }
113133 ]
114134 }
115135 ]
116136
117137 defaultDatasetsConfiguration : '{"publishingInterval":1000,"samplingInterval":500,"queueSize":1}'
138+ defaultEventsConfiguration : '{"publishingInterval":1000,"samplingInterval":500,"queueSize":1}'
118139 }
119140}
120141
0 commit comments