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
@@ -3,104 +3,185 @@ title: Create a device update account in Device Update for Azure IoT Hub | Micro
3
3
description: Create a device update account in Device Update for Azure IoT Hub.
4
4
author: vimeht
5
5
ms.author: vimeht
6
-
ms.date: 2/11/2021
6
+
ms.date: 06/21/2022
7
7
ms.topic: how-to
8
8
ms.service: iot-hub-device-update
9
9
ms.custom: subject-rbac-steps
10
10
---
11
11
12
-
# Device Update for IoT Hub Resource Management
12
+
# Device Update for IoT Hub resource management
13
13
14
-
To get started with Device Update you'll need to create a Device Update account, instance and set access control roles.
14
+
To get started with Device Update you'll need to create a Device Update account and instance, and then set access control roles.
15
15
16
16
## Prerequisites
17
17
18
-
* Access to an IoT Hub. It is recommended that you use a S1 (Standard) tier or above.
19
-
* Supported browsers:
20
-
*[Microsoft Edge](https://www.microsoft.com/edge)
21
-
* Google Chrome
18
+
# [Azure portal](#tab/portal)
19
+
20
+
An IoT hub. It's recommended that you use an S1 (Standard) tier or above.
21
+
22
+
# [CLI](#tab/cli)
23
+
24
+
* An IoT hub. It's recommended that you use an S1 (Standard) tier or above.
25
+
26
+
* An Azure CLI environment:
27
+
28
+
* Use the Bash environment in [Azure Cloud Shell](../cloud-shell/quickstart.md).
29
+
30
+
[](https://shell.azure.com)
31
+
32
+
* If you prefer to run CLI reference commands locally, [install the Azure CLI](/cli/azure/install-azure-cli)
33
+
34
+
* Sign in to the Azure CLI by using the [az login](/cli/azure/reference-index#az-login) command.
35
+
* Run [az version](/cli/azure/reference-index#az-version) to find the version and dependent libraries that are installed. To upgrade to the latest version, run [az upgrade](/cli/azure/reference-index#az-upgrade).
36
+
* When prompted, install Azure CLI extensions on first use. The commands in this article use the **azure-iot** extension. Run `az extension update --name azure-iot` to make sure you're using the latest version of the extension.
22
37
23
38
## Create a device update account and instance
24
39
25
-
1. Go to [Azure portal](https://portal.azure.com)
40
+
# [Azure portal](#tab/portal)
41
+
42
+
1. Go to the [Azure portal](https://portal.azure.com).
26
43
27
-
2.Click**Create a Resource** and search for "Device Update for IoT Hub"
44
+
2.Select**Create a Resource** and search for "Device Update for IoT Hub"
28
45
29
46
:::image type="content" source="media/create-device-update-account/device-update-marketplace.png" alt-text="Screenshot of Device Update for IoT Hub resource." lightbox="media/create-device-update-account/device-update-marketplace.png":::
30
47
31
-
3. Click **Create** -> **Device Update for IoT Hub**
48
+
3. Select **Create** > **Device Update for IoT Hub**
49
+
50
+
4. On the **Basics** tab, provide the following information for your Device Update account:
51
+
52
+
***Subscription**: The Azure subscription to be associated with your Device Update account.
53
+
***Resource group**: An existing or new resource group.
54
+
***Name**: A name for your account.
55
+
***Location**: The Azure region where your account will be located. For information about which regions support Device Update for IoT Hub, see [Azure Products-by-region page](https://azure.microsoft.com/global-infrastructure/services/?products=iot-hub).
32
56
33
-
4. Specify the Azure Subscription to be associated with your Device Update Account and Resource Group. Specify a Name and Location for your Device Update Account
57
+
> [!NOTE]
58
+
> Your Device Update account doesn't need to be in the same region as your IoT hubs, but for better performance it is recommended that you keep them geographically close.
34
59
35
60
:::image type="content" source="media/create-device-update-account/account-details.png" alt-text="Screenshot of account details." lightbox="media/create-device-update-account/account-details.png":::
36
61
37
-
> [!NOTE]
38
-
> You can go to [Azure Products-by-region page](https://azure.microsoft.com/global-infrastructure/services/?products=iot-hub) to discover the regions where Device Update for IoT Hub is available. If Device Update for IoT Hub is not available in your region you can choose to create an account in an available region closest to you.
62
+
5. Optionally, you can check the box to assign the Device Update administrator role to yourself. You can also use the steps listed in the [Configure access control roles](#configure-access-control-roles) section to provide a combination of roles to users and applications for the right level of access.
39
63
40
-
5. Optionally, you can check the box to assign the Device Update administrator role to yourself. You can also use the steps listed in the "Configure access control roles" section to provide a combination of roles to users and applications for the right level of access.
64
+
6. Select **Next: Instance**
41
65
42
-
6. Click **Next: Instance**
66
+
An *instance* of Device Update is associated with a single IoT hub. Select the IoT hub that will be used with Device Update. When you link an IoT hub to a Device Update instance, a new shared access policy is automatically created give Device Update permissions to work with IoT Hub (registry write and service connect). This policy ensures that access is only limited to Device Update.
43
67
44
-
An instance of Device Update is associated with a single IoT hub. Select the IoT hub that will be used with Device Update. We will create a new Shared Access policy during this step to ensure Device Update uses only the required permissions to work with IoT Hub (registry write and service connect). This policy ensures that access is only limited to Device Update.
68
+
7. On the **Instance** tab, provide the following information for your Device Update instance:
45
69
46
-
7. Specify an instance name and select your IoT Hub
70
+
***Name**: A name for your instance.
71
+
***IoT Hub details**: Select an IoT hub to link to this instance.
47
72
48
73
:::image type="content" source="media/create-device-update-account/instance-details.png" alt-text="Screenshot of instance details." lightbox="media/create-device-update-account/instance-details.png":::
49
74
50
-
> [!NOTE]
51
-
> The IoT Hub you link to your Device Update resource, doesn't need to be in the same region as your Device Update Account. However, for better performance it is recommended that your IoT Hub be in a region same as or close to the region of your Device Update account.
52
-
53
-
8. Click **Next: Review + Create**. After validation, click on **Create**.
75
+
8. Select **Next: Review + Create**. After validation, select **Create**.
54
76
55
77
:::image type="content" source="media/create-device-update-account/account-review.png" alt-text="Screenshot of account review." lightbox="media/create-device-update-account/account-review.png":::
56
-
57
-
9. You will see your deployment is in progress. The deployment status will change to "complete" in a few minutes. Click**Go to resource**
78
+
79
+
9. You'll see that your deployment is in progress. The deployment status will change to "complete" in a few minutes. When it does, select**Go to resource**
58
80
59
81
:::image type="content" source="media/create-device-update-account/account-complete.png" alt-text="Screenshot of account deployment complete." lightbox="media/create-device-update-account/account-complete.png":::
60
82
83
+
# [CLI](#tab/cli)
84
+
85
+
Use the [az iot device-update account create](/cli/azure/iot/device-update/account#az-iot-device-update-account-create) command to create a new Device Update account.
86
+
87
+
Replace the following placeholders with your own information:
88
+
89
+
**\<resource_group>*: An existing resource group in your subscription.
90
+
**\<name>*: A name for your Device Update account.
91
+
**\<region>*: The Azure region where your account will be located. For information about which regions support Device Update for IoT Hub, see [Azure Products-by-region page](https://azure.microsoft.com/global-infrastructure/services/?products=iot-hub). If no region is provided, the resource group's location is used.
92
+
93
+
> [!NOTE]
94
+
> Your Device Update account doesn't need to be in the same region as your IoT hubs, but for better performance it is recommended that you keep them geographically close.
Use the [az iot device-update instance create](/cli/azure/iot/device-update/instance#az-iot-device-update-instance-create) command to create a Device Update instance.
101
+
102
+
An *instance* of Device Update is associated with a single IoT hub. Select the IoT hub that will be used with Device Update. When you link an IoT hub to a Device Update instance, a new shared access policy is automatically created give Device Update permissions to work with IoT Hub (registry write and service connect). This policy ensures that access is only limited to Device Update.
103
+
104
+
Replace the following placeholders with your own information:
61
105
106
+
**\<account_name>*: The name of the Device Update account that this instance will be associated with.
107
+
**\<name>*: A name for this instance.
108
+
**\<iothub_id>*: The resource ID for the IoT hub that will be linked to this instance. You can retrieve your IoT hub resource ID by using the [az iot hub show](/cli/azure/iot/hub#az-iot-hub-show) command and querying for the ID value: `az iot hub show -n <iothub_name> --query id`.
In order for other users to have access to Device Update, users must be granted access to this resource. You can skip this step if you assigned the Device Update administrator role to yourself during account creation and don't need to provide access to additional users or applications.
118
+
In order for other users to have access to Device Update, they must be granted access to this resource. You can skip this step if you assigned the Device Update administrator role to yourself during account creation and don't need to provide access to other users or applications.
66
119
67
-
1. Go to Access control (IAM) within the Device Update account
120
+
# [Azure portal](#tab/portal)
121
+
122
+
1. In your Device Update account, select **Access control (IAM)** from the navigation menu.
68
123
69
124
:::image type="content" source="media/create-device-update-account/account-access-control.png" alt-text="Screenshot of access Control within Device Update account." lightbox="media/create-device-update-account/account-access-control.png":::
70
125
71
-
2. Click **Add role assignments**
126
+
2. Select **Add role assignments**.
127
+
128
+
3. On the **Role** tab, select a Device Update role from the available options:
129
+
130
+
* Device Update Administrator
131
+
* Device Update Reader
132
+
* Device Update Content Administrator
133
+
* Device Update Content Reader
134
+
* Device Update Deployments Administrator
135
+
* Device Update Deployments Reader
136
+
137
+
For more information, [Learn about Role-based access control in Device Update for IoT Hub](device-update-control-access.md).
72
138
73
-
3. Under Role tab, select a Device Update role from the given options
74
-
- Device Update Administrator
75
-
- Device Update Reader
76
-
- Device Update Content Administrator
77
-
- Device Update Content Reader
78
-
- Device Update Deployments Administrator
79
-
- Device Update Deployments Reader
80
-
81
139
:::image type="content" source="media/create-device-update-account/role-assignment.png" alt-text="Screenshot of access Control role assignments within Device Update account." lightbox="media/create-device-update-account/role-assignment.png":::
82
-
83
-
[Learn about Role-based access control in Device Update for IoT Hub](device-update-control-access.md)
84
-
85
-
4. Click **Next**
86
-
5. Assign access to a user or Azure AD group
87
-
6. Select members
88
-
140
+
141
+
4. Select **Next**
142
+
5. On the **Members** tab, select the users or groups that you want to assign the role to.
143
+
89
144
:::image type="content" source="media/create-device-update-account/role-assignment-2.png" alt-text="Screenshot of access Control member selection within Device Update account." lightbox="media/create-device-update-account/role-assignment-2.png":::
90
145
91
-
6. Click **Review + assign**
92
-
7. Review the new role assignments and click **Review + assign** again
93
-
8. You are now ready to use the Device Update experience from within your IoT Hub
146
+
6. Select **Review + assign**
147
+
7. Review the new role assignments and select **Review + assign** again
148
+
8. You're now ready to use Device Update from within your IoT Hub
149
+
150
+
# [CLI](#tab/cli)
151
+
152
+
The following roles are available for assigning access to Device Update:
153
+
154
+
* Device Update Administrator
155
+
* Device Update Reader
156
+
* Device Update Content Administrator
157
+
* Device Update Content Reader
158
+
* Device Update Deployments Administrator
159
+
* Device Update Deployments Reader
160
+
161
+
For more information, [Learn about Role-based access control in Device Update for IoT Hub](device-update-control-access.md).
162
+
163
+
Use the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command to configure access control for your Device Update account.
164
+
165
+
Replace the following placeholders with your own information:
166
+
167
+
**\<role>*: The Device Update role that you're assigning.
168
+
**\<user_group>*: The user or group that you want to assign the role to.
169
+
**\<account_id>*: The resource ID for the Device Update account that the user or group will get access to. You can retrieve the resource ID by using the [az iot device-update account show](/cli/azure/iot/device-update/account#az-iot-device-update-account-show) command and querying for the ID value: `az iot device-update account show -n <account_name> --query id`.
170
+
171
+
```azurecli-interactive
172
+
az role assignment create --role '<role>` --assignee <user_group> --scope <account_id>
173
+
```
174
+
175
+
---
94
176
95
177
## Next steps
96
178
97
179
Try updating a device using one of the following quick tutorials:
98
180
99
-
-[Device update on a simulator](device-update-simulator.md)
100
-
-[Device update on Raspberry Pi](device-update-raspberry-pi.md)
101
-
-[Device update on Ubuntu Server 18.04 x64 Package agent](device-update-ubuntu-agent.md)
102
-
103
-
[Learn about Device update account and instance.](device-update-resources.md)
181
+
*[Update a simulated IoT Edge device](device-update-simulator.md)
182
+
*[Update a Raspberry Pi](device-update-raspberry-pi.md)
183
+
*[Update an Ubuntu Server 18.04 x64 Package agent](device-update-ubuntu-agent.md)
104
184
105
-
[Learn about Device update access control roles. ](device-update-control-access.md)
185
+
[Learn about Device update account and instance.](device-update-resources.md)
106
186
187
+
[Learn about Device update access control roles](device-update-control-access.md)
0 commit comments