You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure IoT Edge模块孪生配置:能否基于设备孪生标签创建目标条件?

基于Device Twin标签筛选Azure IoT Edge模块的目标条件配置

可行,你可以通过引用父设备(Device Twin)的属性来实现这个需求,在目标条件的查询语句里用$parent关键字来访问Device Twin的标签。

具体写法示例:

  • 单标签筛选:
    from devices.modules where $parent.tags.environment = 'prod'
    
  • 多标签组合筛选:
    from devices.modules where $parent.tags.environment = 'prod' AND $parent.tags.location = 'westus'
    
  • 结合Module自身属性和Device Twin标签筛选:
    from devices.modules where moduleId = 'edgeModule01' AND $parent.tags.team = 'IoTTeam'
    

说明:

$parent关键字会指向当前模块所属的父设备的Device Twin,通过它就能直接引用Device Twin里的标签、属性等内容,让你可以基于设备层面的标签来筛选对应的模块。

内容的提问来源于stack exchange,提问作者MystCabe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 11:26:05