使用 IoT 中心 DM 设置设备孪生标记 API
Setting device twin tags using IoT hub DM API
如何在物联网中心设备管理中设置设备的标签API似乎没有具体的方法
SDK 中的 (C#) 示例展示了如何执行此操作。您必须选择正确的分支才能将其包含在内。
这是link:https://github.com/Azure/azure-iot-sdks/tree/dmpreview
它使用这个 JSON 反序列化一个设备对象:
{
"deviceId": "Device11-7ce4a850",
"serviceProperties":{
"properties":{
"CustomerId": "123456",
"ServiceBy": "Contoso",
"Weight": 1000,
"QoS": 10
},
"tags": ["milk", "cookies", "sausage", "bacon" ]
}
然后将其传递给注册管理器:
registryManager.AddDeviceAsync(设备);
如何在物联网中心设备管理中设置设备的标签API似乎没有具体的方法
SDK 中的 (C#) 示例展示了如何执行此操作。您必须选择正确的分支才能将其包含在内。
这是link:https://github.com/Azure/azure-iot-sdks/tree/dmpreview
它使用这个 JSON 反序列化一个设备对象: { "deviceId": "Device11-7ce4a850", "serviceProperties":{ "properties":{ "CustomerId": "123456", "ServiceBy": "Contoso", "Weight": 1000, "QoS": 10 }, "tags": ["milk", "cookies", "sausage", "bacon" ] }
然后将其传递给注册管理器:
registryManager.AddDeviceAsync(设备);