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
description: Create an Azure Device Update for Iot Hub account and instance by using the Azure portal or Azure CLI.
4
4
author: eshashah-msft
5
5
ms.author: eshashah
6
-
ms.date: 11/18/2024
6
+
ms.date: 11/19/2024
7
7
ms.topic: how-to
8
8
ms.service: azure-iot-hub
9
9
ms.subservice: device-update
@@ -13,7 +13,7 @@ ms.subservice: device-update
13
13
14
14
To get started with Azure Device Update for IoT Hub, you create a Device Update account and instance, and then set access control roles as necessary. This article describes how to create and configure Device Update resources by using the Azure portal or Azure CLI.
15
15
16
-
A Device Update account is a resource in your Azure subscription. A Device Update instance is a logical container within the account that's associated with a specific IoT hub. A Device Update instance contains updates and deployments associated with its IoT hub. You can create multiple Device Update instances within an account. For more information, see [Device Update resources](device-update-resources.md).
16
+
A Device Update account is a resource in your Azure subscription. A Device Update instance is a logical container within the account that's associated with a specific IoT hub. You can create multiple Device Update instances within an account. A Device Update instance contains updates and deployments associated with its IoT hub. For more information, see [Device Update resources](device-update-resources.md).
17
17
18
18
## Prerequisites
19
19
@@ -33,7 +33,7 @@ A Device Update account is a resource in your Azure subscription. A Device Updat
33
33
34
34
Or, if you prefer to run Azure CLI commands locally:
35
35
36
-
1.[Install Azure CLI](/cli/azure/install-azure-cli). Run [az version](/cli/azure/reference-index#az-version) to see the installed Azure CLI version and dependent libraries, and [az upgrade](/cli/azure/reference-index#az-upgrade) to install the latest version.
36
+
1.[Install Azure CLI](/cli/azure/install-azure-cli). Run [az version](/cli/azure/reference-index#az-version) to see the installed Azure CLI version and dependent libraries, and run [az upgrade](/cli/azure/reference-index#az-upgrade) to install the latest version.
37
37
1. Sign in to Azure by running [az login](/cli/azure/reference-index#az-login).
38
38
1. Install the `azure-iot` extension when prompted on first use. To make sure you're using the latest version of the extension, run `az extension update --name azure-iot`.
39
39
@@ -58,14 +58,16 @@ A Device Update account is a resource in your Azure subscription. A Device Updat
58
58
- Under **Grant Access to Account**, select the checkbox for **Assign Device Update Administrator role** to assign yourself the Device Update administrator role. For more information, see [Configure access control roles](configure-access-control-device-update.md).
59
59
-**Instance Name**: Provide a name for your Device Update instance.
60
60
-**IoT Hub Name**: Select the IoT Hub you want to link to your Device Update instance.
61
+
62
+
If you have the required **Owner** or **User Access Administrator** permissions in your Azure subscription, Device Update setup automatically assigns IoT Hub Data Contributor role to the Device Update service principal.
61
63
62
64
1. Select **Next: Diagnostics**
63
65
64
66
:::image type="content" source="media/create-device-update-account/account-details.png" alt-text="Screenshot of account details for a new Device Update account.":::
65
67
66
-
1. On the **Diagnostics** tab, slide the toggle to **Microsoft diagnostics logging Enabled** to enable diagnostic logging for your Device Update instance. Enabling Microsoft diagnostics allows Microsoft to collect, store, and analyze diagnostic log files from your devices if they encounter an update failure.
68
+
1. On the **Diagnostics** tab, slide the toggle to **Microsoft diagnostics logging Enabled**. Enabling Microsoft diagnostics allows Microsoft to collect, store, and analyze diagnostic log files from your devices if they encounter an update failure.
67
69
68
-
1.To enable remote diagnostics log collection, select **Select Azure Storage account** and then select an Azure Blob storage account to link to your Device Update instance. The Storage account details update automatically.
70
+
1.Select **Select Azure Storage account** and then select an Azure Blob storage account to link to your Device Update instance for remote diagnostic log collection. The Storage account details update automatically.
69
71
70
72
1. Select **Next: Networking**.
71
73
@@ -100,6 +102,8 @@ A Device Update account is a resource in your Azure subscription. A Device Updat
100
102
> [!NOTE]
101
103
> Your Device Update account doesn't need to be in the same region as your IoT hub, but for better performance it should be geographically close.
102
104
105
+
1. If prompted, respond `y` to install the `azure-iot` Azure CLI extension.
106
+
103
107
1. A Device Update instance is associated with a single IoT hub. Run [az iot du instance create](/cli/azure/iot/du/instance#az-iot-du-instance-create) to create a Device Update instance and specify the IoT hub to use with the instance.
104
108
105
109
```azurecli
@@ -111,7 +115,13 @@ A Device Update account is a resource in your Azure subscription. A Device Updat
111
115
112
116
-`<account_name>`: The name of the Device Update account for this instance.
113
117
-`<instance_name>`: A name for this instance.
114
-
-`<iothub_id>`: The resource ID for the IoT hub to link to this instance. You can get your IoT hub resource ID by running [az iot hub show](/cli/azure/iot/hub#az-iot-hub-show) and querying for the ID value: `az iot hub show -n <iothub_name> --query id`.
118
+
-`<iothub_id>`: The fully-qualified resource ID for the IoT hub to link to this instance, for example `"/subscriptions/<subscription_id>/resourceGroups/<resource-group-name>/providers/Microsoft.Devices/IotHubs/<iot-hub-name>"`.
119
+
120
+
To get your IoT hub resource ID, run [az iot hub show](/cli/azure/iot/hub#az-iot-hub-show) and query for the ID value.
121
+
122
+
```azurecli
123
+
`az iot hub show -n <iothub_name> --query id`
124
+
```
115
125
116
126
> [!TIP]
117
127
> You can also configure diagnostics logging as part of the instance creation process. You must have an Azure Blob Storage account to store the diagnostic logs. For more information, see [Remotely collect diagnostic logs from devices](device-update-log-collection.md).
@@ -120,7 +130,7 @@ A Device Update account is a resource in your Azure subscription. A Device Updat
120
130
121
131
## Configure access
122
132
123
-
If you have the required **Owner** or **User Access Administrator** permissions in your Azure subscription, Device Update setup automatically assigns **IoT Hub Data Contributor** role to the Device Update service principal. This role allows the Device Update instance to connect and write to the linked IoT hub to run deployment, device management, and diagnostic operations, and ensures that access is limited to the Device Update instance.
133
+
If you have the required **Owner** or **User Access Administrator** permissions in your Azure subscription, Device Update setup automatically assigns **IoT Hub Data Contributor** role to the Device Update service principal. This role assignment allows the Device Update instance to connect and write to the linked IoT hub to run deployment, device management, and diagnostic operations, and ensures that access is limited to the Device Update instance.
124
134
125
135
After you create your Device Update resources, you can configure access control to provide a combination of roles to users and applications for the right level of access. For more information, see [Configure access control roles for Device Update resources](configure-access-control-device-update.md).
0 commit comments