Skip to content

Commit 441d977

Browse files
authored
Merge pull request #230930 from kgremban/mar15-metarefresh-twins
Metadata and filename refresh -- twins
2 parents 4395dc6 + 7176721 commit 441d977

File tree

60 files changed

+183
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+183
-121
lines changed

articles/iot-hub/.openpublishing.redirection.iot-hub.json

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,61 @@
631631
"redirect_url": "/azure/iot-hub/iot-hub-intel-edison-kit-node-get-started",
632632
"redirect_document_id": false
633633
},
634+
{
635+
"source_path_from_root": "/articles/iot-hub/twin-get-started-cli.md",
636+
"redirect_url": "/azure/iot-hub/device-twins-cli",
637+
"redirect_document_id": true
638+
},
639+
{
640+
"source_path_from_root": "/articles/iot-hub/iot-hub-csharp-csharp-twin-getstarted.md",
641+
"redirect_url": "/azure/iot-hub/device-twins-dotnet",
642+
"redirect_document_id": true
643+
},
644+
{
645+
"source_path_from_root": "/articles/iot-hub/iot-hub-java-java-twin-getstarted.md",
646+
"redirect_url": "/azure/iot-hub/device-twins-java",
647+
"redirect_document_id": true
648+
},
649+
{
650+
"source_path_from_root": "/articles/iot-hub/iot-hub-node-node-twin-getstarted.md",
651+
"redirect_url": "/azure/iot-hub/device-twins-node",
652+
"redirect_document_id": true
653+
},
654+
{
655+
"source_path_from_root": "/articles/iot-hub/iot-hub-python-twin-getstarted.md",
656+
"redirect_url": "/azure/iot-hub/device-twins-python",
657+
"redirect_document_id": true
658+
},
659+
{
660+
"source_path_from_root": "/articles/iot-hub/iot-hub-node-node-module-twin-getstarted.md",
661+
"redirect_url": "/azure/iot-hub/module-twins-node",
662+
"redirect_document_id": true
663+
},
664+
{
665+
"source_path_from_root": "/articles/iot-hub/iot-hub-c-c-module-twin-getstarted.md",
666+
"redirect_url": "/azure/iot-hub/module-twins-c",
667+
"redirect_document_id": true
668+
},
669+
{
670+
"source_path_from_root": "/articles/iot-hub/iot-hub-csharp-csharp-module-twin-getstarted.md",
671+
"redirect_url": "/azure/iot-hub/module-twins-dotnet",
672+
"redirect_document_id": true
673+
},
674+
{
675+
"source_path_from_root": "/articles/iot-hub/iot-hub-python-python-module-twin-getstarted.md",
676+
"redirect_url": "/azure/iot-hub/module-twins-python",
677+
"redirect_document_id": true
678+
},
679+
{
680+
"source_path_from_root": "/articles/iot-hub/iot-hub-portal-csharp-module-twin-getstarted.md",
681+
"redirect_url": "/azure/iot-hub/module-twins-portal-dotnet",
682+
"redirect_document_id": true
683+
},
684+
{
685+
"source_path_from_root": "/articles/iot-hub/module-twin-getstarted-cli.md",
686+
"redirect_url": "/azure/iot-hub/module-twins-cli",
687+
"redirect_document_id": true
688+
},
634689
{
635690
"source_path_from_root": "/articles/iot-hub/iot-hub-gateway-sdk-physical-device.md",
636691
"redirect_url": "/azure/iot-hub/iot-hub-iot-edge-physical-device",
@@ -658,7 +713,7 @@
658713
},
659714
{
660715
"source_path_from_root": "/articles/iot-hub/iot-hub-csharp-node-twin-getstarted.md",
661-
"redirect_url": "/azure/iot-hub/iot-hub-node-node-twin-getstarted",
716+
"redirect_url": "/azure/iot-hub/device-twins-node",
662717
"redirect_document_id": false
663718
},
664719
{

articles/iot-hub/TOC.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -342,39 +342,39 @@
342342
items:
343343
- name: CLI
344344
displayName: device twins
345-
href: twin-get-started-cli.md
345+
href: device-twins-cli.md
346346
- name: .NET
347347
displayName: device twins
348-
href: iot-hub-csharp-csharp-twin-getstarted.md
348+
href: device-twins-dotnet.md
349349
- name: Python
350350
displayName: device twins
351-
href: iot-hub-python-twin-getstarted.md
351+
href: device-twins-python.md
352352
- name: Node.js
353353
displayName: device twins
354-
href: iot-hub-node-node-twin-getstarted.md
354+
href: device-twins-node.md
355355
- name: Java
356356
displayName: device twins
357-
href: iot-hub-java-java-twin-getstarted.md
357+
href: device-twins-java.md
358358
- name: Get started with module twins
359359
items:
360360
- name: Portal
361361
displayName: module twins, module identity
362-
href: iot-hub-portal-csharp-module-twin-getstarted.md
362+
href: module-twins-portal-dotnet.md
363363
- name: CLI
364364
displayName: module twins, module identity
365-
href: module-twin-getstarted-cli.md
365+
href: module-twins-cli.md
366366
- name: .NET
367367
displayName: module twins, module identity
368-
href: iot-hub-csharp-csharp-module-twin-getstarted.md
368+
href: module-twins-dotnet.md
369369
- name: Python
370370
displayName: module twins, module identity
371-
href: iot-hub-python-python-module-twin-getstarted.md
371+
href: module-twins-python.md
372372
- name: Node.js
373373
displayName: module twins, module identity
374-
href: iot-hub-node-node-module-twin-getstarted.md
374+
href: module-twins-node.md
375375
- name: C
376376
displayName: module twins, module identity
377-
href: iot-hub-c-c-module-twin-getstarted.md
377+
href: module-twins-c.md
378378
- name: Get started with device management
379379
items:
380380
- name: CLI

articles/iot-hub/twin-get-started-cli.md renamed to articles/iot-hub/device-twins-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: Get started with Azure IoT Hub device twins (Azure CLI)
3+
titleSuffix: Azure IoT Hub
34
description: How to use Azure IoT Hub device twins and the Azure CLI to create and simulate devices, add tags to device twins, and execute IoT Hub queries.
45
author: kgremban
56

7+
ms.author: kgremban
68
ms.service: iot-hub
7-
services: iot-hub
89
ms.devlang: azurecli
9-
ms.topic: conceptual
10+
ms.topic: how-to
1011
ms.date: 02/17/2023
11-
ms.author: kgremban
1212
ms.custom: "mqtt, devx-track-azurecli"
1313
---
1414

articles/iot-hub/iot-hub-csharp-csharp-twin-getstarted.md renamed to articles/iot-hub/device-twins-dotnet.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: Get started with Azure IoT Hub device twins (.NET/.NET) | Microsoft Docs
3-
description: How to use Azure IoT Hub device twins to add tags and then use an IoT Hub query. You use the Azure IoT device SDK for .NET to implement the simulated device app and the Azure IoT service SDK for .NET to implement a service app that adds the tags and runs the IoT Hub query.
2+
title: Get started with Azure IoT Hub device twins (.NET)
3+
titleSuffix: Azure IoT Hub
4+
description: How to use Azure IoT Hub device twins and the Azure IoT SDKs for .NET to create and simulate devices, add tags to device twins, and execute IoT Hub queries.
45
author: kgremban
56

7+
ms.author: kgremban
68
ms.service: iot-hub
7-
services: iot-hub
89
ms.devlang: csharp
9-
ms.topic: conceptual
10+
ms.topic: how-to
1011
ms.date: 02/17/2023
11-
ms.author: kgremban
1212
ms.custom: "mqtt, devx-track-csharp"
1313
---
1414

@@ -152,13 +152,13 @@ In this section, you create a .NET console app that connects to your hub as **my
152152

153153
1. Run this app by right-clicking the **ReportConnectivity** project and selecting **Debug**, then **Start new instance**. You should see the app getting the twin information, and then sending connectivity as a ***reported property***.
154154

155-
![Run device app to report connectivity](./media/iot-hub-csharp-csharp-twin-getstarted/rundeviceapp.png)
155+
![Run device app to report connectivity](./media/device-twins-dotnet/rundeviceapp.png)
156156

157157
After the device reported its connectivity information, it should appear in both queries.
158158

159159
1. Right-click the **AddTagsAndQuery** project and select **Debug** > **Start new instance** to run the queries again. This time, **myDeviceId** should appear in both query results.
160160

161-
![Device connectivity reported successfully](./media/iot-hub-csharp-csharp-twin-getstarted/tagappsuccess.png)
161+
![Device connectivity reported successfully](./media/device-twins-dotnet/tagappsuccess.png)
162162

163163
## Create a service app that updates desired properties and queries twins
164164

@@ -168,15 +168,15 @@ In this section, you create a .NET console app, using C#, that adds location met
168168

169169
1. In **Configure your new project**, name the project **AddTagsAndQuery**, the select **Next**.
170170

171-
:::image type="content" source="./media/iot-hub-csharp-csharp-twin-getstarted/config-addtagsandquery-app.png" alt-text="Screenshot of how to create a new Visual Studio project." lightbox="./media/iot-hub-csharp-csharp-twin-getstarted/config-addtagsandquery-app.png":::
171+
:::image type="content" source="./media/device-twins-dotnet/config-addtagsandquery-app.png" alt-text="Screenshot of how to create a new Visual Studio project." lightbox="./media/device-twins-dotnet/config-addtagsandquery-app.png":::
172172

173173
1. Accept the default version of the .NET Framework, then select **Create** to create the project.
174174

175175
1. In Solution Explorer, right-click the **AddTagsAndQuery** project, and then select **Manage NuGet Packages**.
176176

177177
1. Select **Browse** and search for and select **Microsoft.Azure.Devices**. Select **Install**.
178178

179-
![NuGet Package Manager window](./media/iot-hub-csharp-csharp-twin-getstarted/nuget-package-addtagsandquery-app.png)
179+
![NuGet Package Manager window](./media/device-twins-dotnet/nuget-package-addtagsandquery-app.png)
180180

181181
This step downloads, installs, and adds a reference to the [Azure IoT service SDK](https://www.nuget.org/packages/Microsoft.Azure.Devices/) NuGet package and its dependencies.
182182

@@ -240,7 +240,7 @@ In this section, you create a .NET console app, using C#, that adds location met
240240

241241
1. Run this application by right-clicking on the **AddTagsAndQuery** project and selecting **Debug**, followed by **Start new instance**. You should see one device in the results for the query asking for all devices located in **Redmond43** and none for the query that restricts the results to devices that use a cellular network.
242242

243-
![Query results in window](./media/iot-hub-csharp-csharp-twin-getstarted/addtagapp.png)
243+
![Query results in window](./media/device-twins-dotnet/addtagapp.png)
244244

245245
In this article, you:
246246

articles/iot-hub/iot-hub-java-java-twin-getstarted.md renamed to articles/iot-hub/device-twins-java.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Get started with Azure IoT Hub device twins (Java) | Microsoft Docs
3-
description: How to use Azure IoT Hub device twins to add tags and then use an IoT Hub query. You use the Azure IoT device SDK for Java to implement the device app and the Azure IoT service SDK for Java to implement a service app that adds the tags and runs the IoT Hub query.
2+
title: Get started with Azure IoT Hub device twins (Java)
3+
titleSuffix: Azure IoT Hub
4+
description: How to use Azure IoT Hub device twins and the Azure IoT SDKs for Java to create and simulate devices, add tags to device twins, and execute IoT Hub queries.
45
author: kgremban
56

67
ms.author: kgremban
78
ms.service: iot-hub
8-
services: iot-hub
99
ms.devlang: java
10-
ms.topic: conceptual
10+
ms.topic: how-to
1111
ms.date: 02/17/2023
1212
ms.custom: mqtt, devx-track-java
1313
---
@@ -375,7 +375,7 @@ You are now ready to run the console apps.
375375
mvn exec:java -Dexec.mainClass="com.mycompany.app.App"
376376
```
377377
378-
![Screenshot that shows the output from the command to run the add tags query service app.](./media/iot-hub-java-java-twin-getstarted/service-app-1.png)
378+
![Screenshot that shows the output from the command to run the add tags query service app.](./media/device-twins-java/service-app-1.png)
379379
380380
You can see the **plant** and **region** tags added to the device twin. The first query returns your device, but the second does not.
381381
@@ -385,15 +385,15 @@ You are now ready to run the console apps.
385385
mvn exec:java -Dexec.mainClass="com.mycompany.app.App"
386386
```
387387
388-
![The device client adds the connectivity Type reported property](./media/iot-hub-java-java-twin-getstarted/device-app-1.png)
388+
![The device client adds the connectivity Type reported property](./media/device-twins-java/device-app-1.png)
389389
390390
3. At a command prompt in the **add-tags-query** folder, run the following command to run the **add-tags-query** service app a second time:
391391
392392
```cmd/sh
393393
mvn exec:java -Dexec.mainClass="com.mycompany.app.App"
394394
```
395395
396-
![Java IoT Hub service app to update tag values and run device queries](./media/iot-hub-java-java-twin-getstarted/service-app-2.png)
396+
![Java IoT Hub service app to update tag values and run device queries](./media/device-twins-java/service-app-2.png)
397397
398398
Now that your device has sent the **connectivityType** property to IoT Hub, the second query returns your device.
399399

articles/iot-hub/iot-hub-node-node-twin-getstarted.md renamed to articles/iot-hub/device-twins-node.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
title: Get started with Azure IoT Hub device twins (Node) | Microsoft Docs
3-
description: How to use Azure IoT Hub device twins to add tags and then use an IoT Hub query. You use the Azure IoT SDKs for Node.js to implement the simulated device app and a service app that adds the tags and runs the IoT Hub query.
2+
title: Get started with Azure IoT Hub device twins (Node.js)
3+
titleSuffix: Azure IoT Hub
4+
description: How to use Azure IoT Hub device twins and the Azure IoT SDKs for Node.js to create and simulate devices, add tags to device twins, and execute IoT Hub queries.
45
author: kgremban
6+
7+
ms.author: kgremban
58
ms.service: iot-hub
6-
services: iot-hub
7-
ms.devlang: javascript
8-
ms.topic: conceptual
9+
ms.devlang: nodejs
10+
ms.topic: how-to
911
ms.date: 02/17/2023
10-
ms.author: kgremban
1112
ms.custom: mqtt, devx-track-js
1213
---
1314

@@ -124,7 +125,7 @@ In this section, you create a Node.js console app that connects to your hub as *
124125
125126
This time **myDeviceId** should appear in both query results.
126127
127-
![Show myDeviceId in both query results](media/iot-hub-node-node-twin-getstarted/service2.png)
128+
![Show myDeviceId in both query results](media/device-twins-node/service2.png)
128129
129130
## Create a service app that updates desired properties and queries twins
130131
@@ -217,7 +218,7 @@ In this section, you create a Node.js console app that adds location metadata to
217218
218219
You should see one device in the results for the query asking for all devices located in **Redmond43** and none for the query that restricts the results to devices that use a cellular network.
219220
220-
![See the one device in the query results](media/iot-hub-node-node-twin-getstarted/service1.png)
221+
![See the one device in the query results](media/device-twins-node/service1.png)
221222
222223
In this article, you:
223224

articles/iot-hub/iot-hub-python-twin-getstarted.md renamed to articles/iot-hub/device-twins-python.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
title: Get started with Azure IoT Hub device twins (Python) | Microsoft Docs
3-
description: How to use Azure IoT Hub device twins to add tags and then use an IoT Hub query. You use the Azure IoT SDKs for Python to implement the simulated device app and a service app that adds the tags and runs the IoT Hub query.
2+
title: Get started with Azure IoT Hub device twins (Python)
3+
titleSuffix: Azure IoT Hub
4+
description: How to use Azure IoT Hub device twins and the Azure IoT SDKs for Python to create and simulate devices, add tags to device twins, and execute IoT Hub queries.
45
author: kgremban
6+
7+
ms.author: kgremban
58
ms.service: iot-hub
6-
services: iot-hub
79
ms.devlang: python
8-
ms.topic: conceptual
10+
ms.topic: how-to
911
ms.date: 02/17/2023
10-
ms.author: kgremban
1112
ms.custom: mqtt, devx-track-python, py-fresh-zinc
1213
---
1314

@@ -134,7 +135,7 @@ In this section, you create a Python console app that adds location metadata to
134135

135136
You should see one device in the results for the query asking for all devices located in **Redmond43** and none for the query that restricts the results to devices that use a cellular network. In the next section, you'll create a device app that will use a cellular network and you'll rerun this query to see how it changes.
136137

137-
![Screenshot of the first query showing all devices in Redmond.](./media/iot-hub-python-twin-getstarted/service-1.png)
138+
![Screenshot of the first query showing all devices in Redmond.](./media/device-twins-python/service-1.png)
138139

139140
## Create a device app that updates reported properties
140141

@@ -220,7 +221,7 @@ In this section, you create a Python console app that connects to your hub as yo
220221

221222
You should see confirmation the device twin reported properties were updated.
222223

223-
![update reported properties from device app](./media/iot-hub-python-twin-getstarted/device-1.png)
224+
![update reported properties from device app](./media/device-twins-python/device-1.png)
224225

225226
8. Now that the device reported its connectivity information, it should appear in both queries. Go back and run the queries again:
226227

@@ -230,11 +231,11 @@ In this section, you create a Python console app that connects to your hub as yo
230231

231232
This time your **{Device ID}** should appear in both query results.
232233

233-
![second query on service app](./media/iot-hub-python-twin-getstarted/service-2.png)
234+
![second query on service app](./media/device-twins-python/service-2.png)
234235

235236
In your device app, you'll see confirmation that the desired properties twin patch sent by the service app was received.
236237

237-
![receive desired properties on device app](./media/iot-hub-python-twin-getstarted/device-2.png)
238+
![receive desired properties on device app](./media/device-twins-python/device-2.png)
238239

239240
In this article, you:
240241

articles/iot-hub/iot-hub-devguide-device-twins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,6 @@ Now you have learned about device twins, you may be interested in the following
365365

366366
To try out some of the concepts described in this article, see the following IoT Hub tutorials:
367367

368-
* [How to use the device twin](iot-hub-node-node-twin-getstarted.md)
368+
* [How to use the device twin](device-twins-node.md)
369369
* [How to use device twin properties](tutorial-device-twins.md)
370370
* [Device management with Azure IoT Tools for VS Code](iot-hub-device-management-iot-toolkit.md)

articles/iot-hub/iot-hub-devguide-module-twins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,4 +327,4 @@ The module app can ignore all notifications with `$version` less or equal than t
327327

328328
To try out some of the concepts described in this article, see the following IoT Hub tutorials:
329329

330-
* [Get started with IoT Hub module identity and module twin using .NET back end and .NET device](iot-hub-csharp-csharp-module-twin-getstarted.md)
330+
* [Get started with IoT Hub module identity and module twin using .NET back end and .NET device](module-twins-dotnet.md)

articles/iot-hub/iot-hub-device-management-iot-extension-azure-cli-2-0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In this article, you learn how to use the IoT extension for Azure CLI with vario
2727

2828
For more detailed explanation on the differences and guidance on using these options, see [Device-to-cloud communication guidance](iot-hub-devguide-d2c-guidance.md) and [Cloud-to-device communication guidance](iot-hub-devguide-c2d-guidance.md).
2929

30-
Device twins are JSON documents that store device state information (metadata, configurations, and conditions). IoT Hub persists a device twin for each device that connects to it. For more information about device twins, see [Get started with device twins](iot-hub-node-node-twin-getstarted.md).
30+
Device twins are JSON documents that store device state information (metadata, configurations, and conditions). IoT Hub persists a device twin for each device that connects to it. For more information about device twins, see [Get started with device twins](device-twins-node.md).
3131

3232
[!INCLUDE [iot-hub-get-started-note](../../includes/iot-hub-get-started-note.md)]
3333

0 commit comments

Comments
 (0)