You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article shows you how to use the [Azure IoT Tools for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) to create an Azure IoT hub. You can create one without an existing IoT project or create one from an existing IoT project.
16
+
This article shows you how to use the [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) to create an Azure IoT hub.
-[Visual Studio Code](https://code.visualstudio.com/)
23
23
24
-
-[Azure IoT Tools](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) installed for Visual Studio Code
24
+
-[Azure IoT Hub extension](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit) installed for Visual Studio Code
25
+
26
+
- An Azure subscription: [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin
25
27
26
28
- An Azure resource group: [create a resource group](../azure-resource-manager/management/manage-resource-groups-portal.md#create-resource-groups) in the Azure portal
27
29
28
-
## Create an IoT hub without an IoT Project
30
+
## Create an IoT hub
29
31
30
-
The following steps show how to create an IoT Hub without an IoT Project in Visual Studio Code (VS Code).
32
+
The following steps show how to create an IoT hub in Visual Studio Code (VS Code):
31
33
32
34
1. In VS Code, open the **Explorer** view.
33
35
@@ -39,72 +41,29 @@ The following steps show how to create an IoT Hub without an IoT Project in Visu
39
41
40
42
:::image type="content" source="./media/iot-hub-create-use-iot-toolkit/create-iot-hub.png" alt-text="A screenshot that shows the location of the Create IoT Hub list item in Visual Studio Code." lightbox="./media/iot-hub-create-use-iot-toolkit/create-iot-hub.png":::
41
43
42
-
4.A pop-up shows in the bottom-right corner to let you sign in to Azure for the first time, if you're not signed in already.
44
+
4.If you're not signed into Azure, a pop-up notification is shown in the bottomright corner to let you sign in to Azure. Select **Sign In** and follow the instructions to sign into Azure.
43
45
44
46
5. From the command palette at the top of VS Code, select your Azure subscription.
45
47
46
48
6. Select your resource group.
47
49
48
-
7. Select a location.
50
+
7. Select a region.
49
51
50
52
8. Select a pricing tier.
51
53
52
-
9. Enter a globally unique name for your IoT hub, then press **Enter**.
53
-
54
-
10. Wait a few minutes until the IoT hub is created. You'll see a confirmation in the output console.
55
-
56
-
## Create an IoT hub and device in an existing IoT project
57
-
58
-
The following steps show how to create an IoT Hub and register a device to the hub within an existing IoT project in Visual Studio (VS) Code.
59
-
60
-
This method allows you to provision in Visual Studio Code without leaving your development environment.
61
-
62
-
1. In the new opened project window, press `F1` to open the command palette, type and select **Azure IoT Device Workbench: Provision Azure Services...**.
63
-
64
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/provision.png" alt-text="A screenshot that shows how to open the command palette in VS Code." lightbox="media/iot-hub-create-use-iot-toolkit/provision.png":::
65
-
66
-
> [!NOTE]
67
-
> If you have not signed in Azure. Follow the pop-up notification for signing in.
68
-
69
-
1. Select the subscription you want to use.
70
-
71
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-subscription.png" alt-text="A screenshot that shows how to choose your Azure subscription in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-subscription.png":::
72
-
73
-
1. Select an existing resource group or create a new [resource group](../azure-resource-manager/management/overview.md#terminology).
74
-
75
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-resource-group.png" alt-text="A screenshot that shows how to choose a resource group or create a new one in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-resource-group.png":::
76
-
77
-
1. In the resource group you specified, follow the prompts to select an existing IoT Hub or create a new Azure IoT Hub.
78
-
79
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-hub-provision.png" alt-text="A screenshot that shows the first prompt in choosing an existing IoT Hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-hub-provision.png":::
80
-
81
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-iot-hub.png" alt-text="A screenshot that shows the second prompt in choosing an existing IoT Hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-iot-hub.png":::
82
-
83
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-hub-selected.png" alt-text="A screenshot that shows the third prompt in choosing an existing IoT Hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-hub-selected.png":::
84
-
85
-
1. In the output window, you see the Azure IoT Hub provisioned.
86
-
87
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-hub-provisioned.png" alt-text="A screenshot that shows the output window in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-hub-provisioned.png":::
88
-
89
-
1. Select or create a new IoT Hub Device in the Azure IoT Hub you provisioned.
90
-
91
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/iot-device-provision.png" alt-text="A screenshot that shows the fourth prompt in choosing an existing IoT Hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/iot-device-provision.png":::
92
-
93
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/select-iot-device.png" alt-text="A screenshot that shows an example of an existing IoT Hub in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/select-iot-device.png":::
94
-
95
-
1. Now you have an Azure IoT Hub provisioned and a device created in it. The device connection string is saved in VS Code.
54
+
9. Enter a globally unique name for your IoT hub, and then select the Enter key.
96
55
97
-
:::image type="content" source="media/iot-hub-create-use-iot-toolkit/provision-done.png" alt-text="A screenshot that shows IoT Hub details in the output window in Visual Studio Code." lightbox="media/iot-hub-create-use-iot-toolkit/provision-done.png":::
56
+
10. Wait a few minutes until the IoT hub is created and confirmation is displayed in the **Output** panel.
98
57
99
58
> [!TIP]
100
-
> To delete a device from your IoT hub, use the `Azure IoT Hub: Delete Device` option from the Command Palette. There is no option to delete your IoT hub in Visual Studio Code, however you can [delete your hub in the Azure portal](iot-hub-create-through-portal.md#delete-an-iot-hub).
59
+
> There is no option to delete your IoT hub in Visual Studio Code, however you can [delete your hub in the Azure portal](iot-hub-create-through-portal.md#delete-an-iot-hub).
101
60
102
61
## Next steps
103
62
104
-
Now that you've deployed an IoT hub using the Azure IoT Tools for Visual Studio Code, explore these articles:
63
+
Now that you've deployed an IoT hub using the Azure IoT Hub extension for Visual Studio Code, explore these articles:
105
64
106
-
-[Use the Azure IoT Tools for Visual Studio Code to send and receive messages between your device and an IoT Hub](iot-hub-vscode-iot-toolkit-cloud-device-messaging.md).
65
+
-[Use the Azure IoT Hub extension for Visual Studio Code to send and receive messages between your device and an IoT hub](iot-hub-vscode-iot-toolkit-cloud-device-messaging.md).
107
66
108
-
-[Use the Azure IoT Tools for Visual Studio Code for Azure IoT Hub device management](iot-hub-device-management-iot-toolkit.md)
67
+
-[Use the Azure IoT Hub extension for Visual Studio Code for Azure IoT Hub device management](iot-hub-device-management-iot-toolkit.md)
109
68
110
-
-[See the Azure IoT Hub for Visual Studio Code wiki page](https://github.com/microsoft/vscode-azure-iot-toolkit/wiki).
69
+
-[See the Azure IoT Hub extension for Visual Studio Code wiki page](https://github.com/microsoft/vscode-azure-iot-toolkit/wiki).
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-dev-guide-sas.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,7 +222,7 @@ HTTPS implements authentication by including a valid token in the **Authorizatio
222
222
For example, Username (DeviceId is case-sensitive):
223
223
`iothubname.azure-devices.net/DeviceId`
224
224
225
-
Password (You can generate a SAS token with the CLI extension command [az iot hub generate-sas-token](/cli/azure/iot/hub#az-iot-hub-generate-sas-token), or the [Azure IoT Tools for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit)):
225
+
Password (You can generate a SAS token with the CLI extension command [az iot hub generate-sas-token](/cli/azure/iot/hub#az-iot-hub-generate-sas-token), or the [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit)):
> It's possible to generate a SAS token with the CLI extension command [az iot hub generate-sas-token](/cli/azure/iot/hub#az-iot-hub-generate-sas-token), or the [Azure IoT Tools for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit).
317
+
> It's possible to generate a SAS token with the CLI extension command [az iot hub generate-sas-token](/cli/azure/iot/hub#az-iot-hub-generate-sas-token), or the [Azure IoT Hub extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit).
318
318
319
319
#### Use a shared access policy to access on behalf of a device
0 commit comments