Skip to content

Commit d08e470

Browse files
committed
Review DPS SDK samples paths and parameters
1 parent e1f4ce1 commit d08e470

9 files changed

+54
-42
lines changed

articles/iot-dps/how-to-legacy-device-symm-key.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ An enrollment group that uses [symmetric key attestation](concepts-symmetric-key
8484
8585
::: zone pivot="programming-language-ansi-c"
8686
87-
In this section, you'll prepare a development environment that's used to build the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c). The sample code attempts to provision the device during the device's boot sequence.
87+
In this section, you'll prepare a development environment that's used to build the [Azure IoT Device SDK for C](https://github.com/Azure/azure-iot-sdk-c). The sample code attempts to provision the device during the device's boot sequence.
8888
8989
1. Open a web browser, and go to the [Release page of the Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c/releases/latest).
9090
9191
1. Select the **Tags** tab at the top of the page.
9292
9393
1. Copy the tag name for the latest release of the Azure IoT C SDK.
9494
95-
1. In a Windows command prompt, run the following commands to clone the latest release of the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) GitHub repository (replace `<release-tag>` with the tag you copied in the previous step).
95+
1. In a Windows command prompt, run the following commands to clone the latest release of the [Azure IoT Device SDK for C](https://github.com/Azure/azure-iot-sdk-c) GitHub repository. Replace `<release-tag>` with the tag you copied in the previous step, for example: `lts_01_2023`.
9696
9797
```cmd
9898
git clone -b <release-tag> https://github.com/Azure/azure-iot-sdk-c.git
@@ -152,7 +152,7 @@ In this section, you'll prepare a development environment that's used to build t
152152
153153
1. Open a Git CMD or Git Bash command-line environment.
154154
155-
2. Clone the [Azure IoT SDK for Node.js](https://github.com/Azure/azure-iot-sdk-node.git) GitHub repository using the following command:
155+
2. Clone the [Azure IoT SDK for Node.js](https://github.com/Azure/azure-iot-sdk-node) GitHub repository using the following command:
156156
157157
```cmd
158158
git clone https://github.com/Azure/azure-iot-sdk-node.git --recursive
@@ -164,19 +164,22 @@ In this section, you'll prepare a development environment that's used to build t
164164
165165
1. Open a Git CMD or Git Bash command-line environment.
166166
167-
2. Clone the [Azure IoT SDK for Python](https://github.com/Azure/azure-iot-sdk-python.git) GitHub repository using the following command:
167+
2. Clone the [Azure IoT Device SDK for Python](https://github.com/Azure/azure-iot-sdk-python/tree/v2) GitHub repository using the following command:
168168
169169
```cmd
170-
git clone https://github.com/Azure/azure-iot-sdk-python.git --recursive
170+
git clone -b v2 https://github.com/Azure/azure-iot-sdk-python.git --recursive
171171
```
172172
173+
>[!NOTE]
174+
>The samples used in this tutorial are in the **v2** branch of the azure-iot-sdk-python repository. For information about updating V2 code to use a V3 release of the Python SDK, see [Azure IoT Device SDK for Python migration guide](https://github.com/Azure/azure-iot-sdk-python/blob/main/migration_guide_provisioning.md).
175+
173176
::: zone-end
174177
175178
::: zone pivot="programming-language-java"
176179
177180
1. Open a Git CMD or Git Bash command-line environment.
178181
179-
2. Clone the [Azure IoT SDK for Java](https://github.com/Azure/azure-iot-sdk-java.git) GitHub repository using the following command:
182+
2. Clone the [Azure IoT SDK for Java](https://github.com/Azure/azure-iot-sdk-java) GitHub repository using the following command:
180183
181184
```cmd
182185
git clone https://github.com/Azure/azure-iot-sdk-java.git --recursive
@@ -403,7 +406,7 @@ To update and run the provisioning sample with your device information:
403406
3. Open a command prompt and go to the *SymmetricKeySample* in the cloned sdk repository:
404407
405408
```cmd
406-
cd .\azure-iot-sdk-csharp\provisioning\device\samples\How To\SymmetricKeySample
409+
cd .\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\SymmetricKeySample
407410
```
408411
409412
4. In the *SymmetricKeySample* folder, open *Parameters.cs* in a text editor. This file shows the parameters that are supported by the sample. Only the first three required parameters will be used in this article when running the sample. Review the code in this file. No changes are needed.
@@ -431,7 +434,7 @@ To update and run the provisioning sample with your device information:
431434
7. You should see something similar to the following output. A "TestMessage" string is sent to the hub as a test message.
432435
433436
```output
434-
D:\azure-iot-sdk-csharp\provisioning\device\samples\How To\SymmetricKeySample>dotnet run --s 0ne00000A0A --i sn-007-888-abc-mac-a1-b2-c3-d4-e5-f6 --p sbDDeEzRuEuGKag+kQKV+T1QGakRtHpsERLP0yPjwR93TrpEgEh/Y07CXstfha6dhIPWvdD1nRxK5T0KGKA+nQ==
437+
D:\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\SymmetricKeySample>dotnet run --i 0ne00000A0A --r sn-007-888-abc-mac-a1-b2-c3-d4-e5-f6 --p sbDDeEzRuEuGKag+kQKV+T1QGakRtHpsERLP0yPjwR93TrpEgEh/Y07CXstfha6dhIPWvdD1nRxK5T0KGKA+nQ==
435438
436439
Initializing the device provisioning client...
437440
Initialized for registration Id sn-007-888-abc-mac-a1-b2-c3-d4-e5-f6.
@@ -684,7 +687,7 @@ To update and run the provisioning sample with your device information:
684687
5. Open a command prompt for building. Go to the provisioning sample project folder of the Java SDK repository.
685688
686689
```cmd
687-
cd azure-iot-sdk-java\provisioning\provisioning-samples\provisioning-symmetrickey-individual-sample
690+
cd azure-iot-sdk-java\provisioning\provisioning-device-client-samples\provisioning-symmetrickey-individual-sample
688691
```
689692
690693
6. Build the sample.

articles/iot-dps/how-to-provision-multitenant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ For each VM:
196196
197197
2. Find and copy the tag name for the [latest release](https://github.com/Azure/azure-iot-sdk-c/releases/latest) of the SDK.
198198
199-
3. Clone the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) on both VMs. Use the tag you found in the previous step as the value for the `-b` parameter:
199+
3. Clone the [Azure IoT Device SDK for C](https://github.com/Azure/azure-iot-sdk-c) on both VMs. Use the tag you found in the previous step as the value for the `-b` parameter, for example: `lts_01_2023`.
200200
201201
```bash
202202
git clone -b <release-tag> https://github.com/Azure/azure-iot-sdk-c.git

articles/iot-dps/quick-create-simulated-device-symm-key.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ In this section, you prepare a development environment that's used to build the
8484
8585
4. Copy the tag name for the latest release of the Azure IoT C SDK.
8686
87-
5. Open a command prompt or Git Bash shell. Run the following commands to clone the latest release of the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) GitHub repository(replace `<release-tag>` with the tag you copied in the previous step).
87+
5. Open a command prompt or Git Bash shell. Run the following commands to clone the latest release of the [Azure IoT Device SDK for C](https://github.com/Azure/azure-iot-sdk-c) GitHub repository. Replace `<release-tag>` with the tag you copied in the previous step, for example: `lts_01_2023`.
8888
8989
```cmd
9090
git clone -b <release-tag> https://github.com/Azure/azure-iot-sdk-c.git
@@ -144,7 +144,7 @@ In this section, you prepare a development environment that's used to build the
144144
145145
1. Open a Git CMD or Git Bash command-line environment.
146146
147-
2. Clone the [Azure IoT SDK for Node.js](https://github.com/Azure/azure-iot-sdk-node.git) GitHub repository using the following command:
147+
2. Clone the [Azure IoT SDK for Node.js](https://github.com/Azure/azure-iot-sdk-node) GitHub repository using the following command:
148148
149149
```cmd
150150
git clone https://github.com/Azure/azure-iot-sdk-node.git --recursive
@@ -156,19 +156,22 @@ In this section, you prepare a development environment that's used to build the
156156
157157
1. Open a Git CMD or Git Bash command-line environment.
158158
159-
2. Clone the [Azure IoT SDK for Python](https://github.com/Azure/azure-iot-sdk-python.git) GitHub repository using the following command:
159+
2. Clone the [Azure IoT SDK for Python](https://github.com/Azure/azure-iot-sdk-python/tree/v2) GitHub repository using the following command:
160160
161161
```cmd
162-
git clone https://github.com/Azure/azure-iot-sdk-python.git --recursive
162+
git clone -b v2 https://github.com/Azure/azure-iot-sdk-python.git --recursive
163163
```
164164
165+
>[!NOTE]
166+
>The samples used in this tutorial are in the **v2** branch of the azure-iot-sdk-python repository. For information about updating V2 code to use a V3 release of the Python SDK, see [Azure IoT Device SDK for Python migration guide](https://github.com/Azure/azure-iot-sdk-python/blob/main/migration_guide_provisioning.md).
167+
165168
::: zone-end
166169
167170
::: zone pivot="programming-language-java"
168171
169172
1. Open a Git CMD or Git Bash command-line environment.
170173
171-
2. Clone the [Azure IoT SDK for Java](https://github.com/Azure/azure-iot-sdk-java.git) GitHub repository using the following command:
174+
2. Clone the [Azure IoT SDK for Java](https://github.com/Azure/azure-iot-sdk-java) GitHub repository using the following command:
172175
173176
```cmd
174177
git clone https://github.com/Azure/azure-iot-sdk-java.git --recursive
@@ -321,7 +324,7 @@ To update and run the provisioning sample with your device information:
321324
3. Open a command prompt and go to the *SymmetricKeySample* in the cloned sdk repository:
322325
323326
```cmd
324-
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\How To\SymmetricKeySample\'
327+
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\SymmetricKeySample\'
325328
```
326329
327330
4. In the *SymmetricKeySample* folder, open *Parameters.cs* in a text editor. This file shows the parameters that are supported by the sample. Only the first three required parameters are used in this article when running the sample. Review the code in this file. No changes are needed.
@@ -349,7 +352,7 @@ To update and run the provisioning sample with your device information:
349352
7. You should now see something similar to the following output. A "TestMessage" string is sent to the hub as a test message.
350353
351354
```output
352-
D:\azure-iot-sdk-csharp\provisioning\device\samples\How To\SymmetricKeySample>dotnet run --i 0ne00000A0A --r symm-key-csharp-device-01 --p sbDDeEzRuEuGKag+kQKV+T1QGakRtHpsERLP0yPjwR93TrpEgEh/Y07CXstfha6dhIPWvdD1nRxK5T0KGKA+nQ==
355+
D:\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\SymmetricKeySample>dotnet run --i 0ne00000A0A --r symm-key-csharp-device-01 --p sbDDeEzRuEuGKag+kQKV+T1QGakRtHpsERLP0yPjwR93TrpEgEh/Y07CXstfha6dhIPWvdD1nRxK5T0KGKA+nQ==
353356
354357
Initializing the device provisioning client...
355358
Initialized for registration Id symm-key-csharp-device-01.
@@ -600,7 +603,7 @@ To update and run the provisioning sample with your device information:
600603
5. Open a command prompt for building. Go to the provisioning sample project folder of the Java SDK repository.
601604
602605
```cmd
603-
cd azure-iot-sdk-java\provisioning\provisioning-samples\provisioning-symmetrickey-individual-sample
606+
cd azure-iot-sdk-java\provisioning\provisioning-device-client-samples\provisioning-symmetrickey-individual-sample
604607
```
605608
606609
6. Build the sample.

articles/iot-dps/quick-create-simulated-device-tpm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ In this section, you'll prepare a development environment used to build the [Azu
9898

9999
4. Copy the tag name for the latest release of the Azure IoT C SDK.
100100

101-
5. Open a command prompt or Git Bash shell. Run the following commands to clone the latest release of the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) GitHub repository. (replace `<release-tag>` with the tag you copied in the previous step).
101+
5. Open a command prompt or Git Bash shell. Run the following commands to clone the latest release of the [Azure IoT Device SDK for C](https://github.com/Azure/azure-iot-sdk-c) GitHub repository. Replace `<release-tag>` with the tag you copied in the previous step, for example: `lts_01_2023`.
102102

103103
```cmd/sh
104104
git clone -b <release-tag> https://github.com/Azure/azure-iot-sdk-c.git
@@ -387,7 +387,7 @@ In this section, you'll build and execute a sample that reads the endorsement ke
387387
1. In a command prompt, change directories to the project directory for the TPM device provisioning sample.
388388
389389
```cmd
390-
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\How To\TpmSample\'
390+
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\TpmSample\'
391391
```
392392
393393
2. Type the following command to build and run the TPM device provisioning sample. Copy the endorsement key returned from your TPM 2.0 hardware security module to use later when enrolling your device.
@@ -500,7 +500,7 @@ In this section, you'll configure sample code to use the [Advanced Message Queui
500500
3. In a command prompt, change directories to the project directory for the TPM device provisioning sample.
501501
502502
```cmd
503-
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\How To\TpmSample\'
503+
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\TpmSample\'
504504
```
505505
506506
4. Run the following command to register your device. Replace `<IdScope>` with the value for the DPS you copied and `<RegistrationId>` with the value you used when creating the device enrollment.

articles/iot-dps/quick-create-simulated-device-x509.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In this section, you'll prepare a development environment that's used to build t
101101
102102
3. Copy the tag name for the latest release of the Azure IoT C SDK.
103103
104-
4. In your Windows command prompt, run the following commands to clone the latest release of the [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c) GitHub repository. Replace `<release-tag>` with the tag you copied in the previous step.
104+
4. In your Windows command prompt, run the following commands to clone the latest release of the [Azure IoT Device SDK for C](https://github.com/Azure/azure-iot-sdk-c) GitHub repository. Replace `<release-tag>` with the tag you copied in the previous step, for example: `lts_01_2023`.
105105
106106
```cmd
107107
git clone -b <release-tag> https://github.com/Azure/azure-iot-sdk-c.git
@@ -159,7 +159,7 @@ git clone https://github.com/Azure/azure-iot-sdk-csharp.git
159159

160160
::: zone pivot="programming-language-nodejs"
161161

162-
In your Windows command prompt, clone the [Azure IoT Samples for Node.js](https://github.com/Azure/azure-iot-sdk-node.git) GitHub repository using the following command:
162+
In your Windows command prompt, clone the [Azure IoT SDK for Node.js](https://github.com/Azure/azure-iot-sdk-node) GitHub repository using the following command:
163163

164164
```cmd
165165
git clone https://github.com/Azure/azure-iot-sdk-node.git
@@ -169,17 +169,20 @@ git clone https://github.com/Azure/azure-iot-sdk-node.git
169169

170170
::: zone pivot="programming-language-python"
171171

172-
In your Windows command prompt, clone the [Azure IoT Samples for Python](https://github.com/Azure/azure-iot-sdk-python.git) GitHub repository using the following command:
172+
In your Windows command prompt, clone the [Azure IoT Device SDK for Python](https://github.com/Azure/azure-iot-sdk-python/tree/v2) GitHub repository using the following command:
173173

174174
```cmd
175-
git clone https://github.com/Azure/azure-iot-sdk-python.git --recursive
175+
git clone -b v2 https://github.com/Azure/azure-iot-sdk-python.git --recursive
176176
```
177177

178+
>[!NOTE]
179+
>The samples used in this tutorial are in the **v2** branch of the azure-iot-sdk-python repository. For information about updating V2 code to use a V3 release of the Python SDK, see [Azure IoT Device SDK for Python migration guide](https://github.com/Azure/azure-iot-sdk-python/blob/main/migration_guide_provisioning.md).
180+
178181
::: zone-end
179182

180183
::: zone pivot="programming-language-java"
181184

182-
1. In your Windows command prompt, clone the [Azure IoT Samples for Java](https://github.com/Azure/azure-iot-sdk-java.git) GitHub repository using the following command:
185+
1. In your Windows command prompt, clone the [Azure IoT Samples for Java](https://github.com/Azure/azure-iot-sdk-java) GitHub repository using the following command:
183186

184187
```cmd
185188
git clone https://github.com/Azure/azure-iot-sdk-java.git --recursive
@@ -568,7 +571,7 @@ In this section, you'll use your Windows command prompt.
568571

569572
:::image type="content" source="./media/quick-create-simulated-device-x509/copy-id-scope.png" alt-text="Screenshot of the ID scope on Azure portal.":::
570573

571-
3. In your Windows command prompt, change to the X509Sample directory. This directory is located in the *.\azure-iot-sdk-csharp\provisioning\device\samples\Getting Started\X509Sample* directory off the directory where you cloned the samples on your computer.
574+
3. In your Windows command prompt, change to the X509Sample directory. This directory is located in the *.\azure-iot-sdk-csharp\provisioning\device\samples\getting started\X509Sample* directory off the directory where you cloned the samples on your computer.
572575

573576
4. Enter the following command to build and run the X.509 device provisioning sample (replace the `<IDScope>` value with the ID Scope that you copied in the previous section. The certificate file will default to *./certificate.pfx* and prompt for the .pfx password.
574577

@@ -769,12 +772,12 @@ In this section, you use both your Windows command prompt and your Git Bash prom
769772
1. In your Windows command prompt, navigate to the sample project folder. The path shown is relative to the location where you cloned the SDK
770773
771774
```cmd
772-
cd .\azure-iot-sdk-java\provisioning\provisioning-samples\provisioning-X509-sample
775+
cd .\azure-iot-sdk-java\provisioning\provisioning-device-client-samples\provisioning-X509-sample
773776
```
774777
775778
1. Enter the provisioning service and X.509 identity information in the sample code. This information is used during provisioning, for attestation of the simulated device, prior to device registration.
776779
777-
1. Open the file `.\src\main\java\samples\com/microsoft\azure\sdk\iot\ProvisioningX509Sample.java` in your favorite editor.
780+
1. Open the file `.\src\main\java\samples\com\microsoft\azure\sdk\iot\ProvisioningX509Sample.java` in your favorite editor.
778781
779782
1. Update the following values with the **ID Scope** and **Provisioning Service Global Endpoint** that you copied previously.
780783

articles/iot-dps/quick-enroll-device-tpm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ This section shows you how to create a .NET Core console app that adds an indivi
278278
1. Go to the sample folder:
279279
280280
```cmd
281-
cd azure-iot-sdk-java\provisioning\provisioning-samples\service-enrollment-sample
281+
cd azure-iot-sdk-java\provisioning\provisioning-service-client-samples\service-enrollment-sample
282282
```
283283
284284
1. Open the file *\src\main\java\samples\com\microsoft\azure\sdk\iot\ServiceEnrollmentSample.java* in an editor.
@@ -370,7 +370,7 @@ AToAAQALAAMAsgAgg3GXZ0SEs/gakMyNRqXXJP1S124GUgtk8qHaGzMUaaoABgCAAEMAEAgAAAAAAAEA
370370
371371
:::zone pivot="programming-language-java"
372372
373-
1. From the *azure-iot-sdk-java\provisioning\provisioning-samples\service-enrollment-sample* folder in your command prompt, run the following command to build the sample:
373+
1. From the *azure-iot-sdk-java\provisioning\provisioning-service-client-samples\service-enrollment-sample* folder in your command prompt, run the following command to build the sample:
374374
375375
```cmd\sh
376376
mvn install -DskipTests

articles/iot-dps/quick-enroll-device-x509.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ This section shows you how to create a Node.js script that adds an enrollment gr
289289
1. From the location where you downloaded the repo, go to the sample folder:
290290
291291
```cmd\sh
292-
cd azure-iot-sdk-java\provisioning\provisioning-samples\service-enrollment-group-sample
292+
cd azure-iot-sdk-java\provisioning\provisioning-service-client-samples\service-enrollment-group-sample
293293
```
294294
295295
1. Open the file *_/src/main/java/samples/com/microsoft/azure/sdk/iot/ServiceEnrollmentGroupSample.java_* in an editor of your choice.
@@ -369,7 +369,7 @@ This section shows you how to create a Node.js script that adds an enrollment gr
369369
370370
:::zone pivot="programming-language-java"
371371
372-
1. From the *azure-iot-sdk-java\provisioning\provisioning-samples\service-enrollment-group-sample* folder in your command prompt, run the following command to build the sample:
372+
1. From the *azure-iot-sdk-java\provisioning\provisioning-service-client-samples\service-enrollment-group-sample* folder in your command prompt, run the following command to build the sample:
373373
374374
```cmd\sh
375375
mvn install -DskipTests

0 commit comments

Comments
 (0)