Skip to content

Commit 111bbc1

Browse files
committed
Added view account/instance steps
1 parent 8261e4f commit 111bbc1

File tree

2 files changed

+63
-25
lines changed

2 files changed

+63
-25
lines changed

articles/iot-hub-device-update/create-device-update-account.md

Lines changed: 59 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create a device update account in Device Update for Azure IoT Hub | Micro
33
description: Create a device update account in Device Update for Azure IoT Hub.
44
author: vimeht
55
ms.author: vimeht
6-
ms.date: 06/22/2022
6+
ms.date: 06/23/2022
77
ms.topic: how-to
88
ms.service: iot-hub-device-update
99
ms.custom: subject-rbac-steps
@@ -19,7 +19,7 @@ To get started with Device Update you'll need to create a Device Update account
1919

2020
An IoT hub. It's recommended that you use an S1 (Standard) tier or above.
2121

22-
# [CLI](#tab/cli)
22+
# [Azure CLI](#tab/cli)
2323

2424
* An IoT hub. It's recommended that you use an S1 (Standard) tier or above.
2525

@@ -29,27 +29,27 @@ An IoT hub. It's recommended that you use an S1 (Standard) tier or above.
2929

3030
[![Launch Cloud Shell in a new window](../../includes/media/cloud-shell-try-it/hdi-launch-cloud-shell.png)](https://shell.azure.com)
3131

32-
* If you prefer to run CLI reference commands locally, [install the Azure CLI](/cli/azure/install-azure-cli)
32+
* Or, if you prefer to run CLI reference commands locally, [install the Azure CLI](/cli/azure/install-azure-cli)
3333

3434
* Sign in to the Azure CLI by using the [az login](/cli/azure/reference-index#az-login) command.
35+
3536
* 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).
37+
3638
* 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.
3739

3840
---
3941

40-
## Create a device update account and instance
42+
## Create a Device Update account and instance
4143

4244
# [Azure portal](#tab/portal)
4345

44-
1. Go to the [Azure portal](https://portal.azure.com).
45-
46-
2. Select **Create a Resource** and search for "Device Update for IoT Hub"
46+
1. In the [Azure portal](https://portal.azure.com), select **Create a Resource** and search for "Device Update for IoT Hub"
4747

4848
:::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":::
4949

50-
3. Select **Create** > **Device Update for IoT Hub**
50+
2. Select **Create** > **Device Update for IoT Hub**
5151

52-
4. On the **Basics** tab, provide the following information for your Device Update account:
52+
3. On the **Basics** tab, provide the following information for your Device Update account:
5353

5454
* **Subscription**: The Azure subscription to be associated with your Device Update account.
5555
* **Resource group**: An existing or new resource group.
@@ -61,42 +61,44 @@ An IoT hub. It's recommended that you use an S1 (Standard) tier or above.
6161
6262
:::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":::
6363

64-
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.
64+
4. 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.
65+
66+
You need to have Owner or User Access Administrator permissions in your subscription to manage roles.
6567

66-
6. Select **Next: Instance**
68+
5. Select **Next: Instance**
6769

6870
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.
6971

70-
7. On the **Instance** tab, provide the following information for your Device Update instance:
72+
6. On the **Instance** tab, provide the following information for your Device Update instance:
7173

7274
* **Name**: A name for your instance.
7375
* **IoT Hub details**: Select an IoT hub to link to this instance.
7476

7577
:::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":::
7678

77-
8. Select **Next: Review + Create**. After validation, select **Create**.
79+
7. Select **Next: Review + Create**. After validation, select **Create**.
7880

7981
:::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":::
8082

81-
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**
83+
8. 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**
8284

8385
:::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":::
8486

85-
# [CLI](#tab/cli)
87+
# [Azure CLI](#tab/cli)
8688

8789
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.
8890

8991
Replace the following placeholders with your own information:
9092

9193
* *\<resource_group>*: An existing resource group in your subscription.
92-
* *\<name>*: A name for your Device Update account.
94+
* *\<account_name>*: A name for your Device Update account.
9395
* *\<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.
9496

9597
> [!NOTE]
9698
> 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.
9799
98100
```azurecli-interactive
99-
az iot device-update account create --resource-group <resource_group> --account <name> --location <region>
101+
az iot device-update account create --resource-group <resource_group> --account <account_name> --location <region>
100102
```
101103

102104
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.
@@ -106,13 +108,16 @@ An *instance* of Device Update is associated with a single IoT hub. Select the I
106108
Replace the following placeholders with your own information:
107109

108110
* *\<account_name>*: The name of the Device Update account that this instance will be associated with.
109-
* *\<name>*: A name for this instance.
111+
* *\<instance_name>*: A name for this instance.
110112
* *\<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`.
111113

112114
```azurecli-interactive
113-
az iot device-update instance create --account <account_name> --instance <name> --iothub-ids <iothub_id>
115+
az iot device-update instance create --account <account_name> --instance <instance_name> --iothub-ids <iothub_id>
114116
```
115117

118+
>[!TIP]
119+
>As part of the instance creation process, you can also configure diagnostics logging. For more information, see [Remotely collect diagnostic logs from devices](device-update-log-collection.md).
120+
116121
---
117122

118123
## Configure access control roles
@@ -149,7 +154,7 @@ In order for other users to have access to Device Update, they must be granted a
149154
7. Review the new role assignments and select **Review + assign** again
150155
8. You're now ready to use Device Update from within your IoT Hub
151156

152-
# [CLI](#tab/cli)
157+
# [Azure CLI](#tab/cli)
153158

154159
The following roles are available for assigning access to Device Update:
155160

@@ -171,9 +176,42 @@ Replace the following placeholders with your own information:
171176
* *\<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`.
172177

173178
```azurecli-interactive
174-
az role assignment create --role '<role>` --assignee <user_group> --scope <account_id>
179+
az role assignment create --role '<role>' --assignee <user_group> --scope <account_id>
180+
```
181+
182+
---
183+
184+
## View and query accounts or instances
185+
186+
You can view, sort, and query all of your Device Update accounts and instances.
187+
188+
# [Azure portal](#tab/portal)
189+
190+
1. To view all Device Update accounts, use the Azure portal to search for the **Device Update for IoT Hubs** service.
191+
192+
* Use the **Grouping** dropdown menu to group account by subscription, resource group, location, and other conditions.
193+
* Select **Add filter** to filter the list of accounts by resource group, location, tags, and other conditions.
194+
195+
1. To view all instances in an account, navigate to that account in the Azure portal. Select **Instances** from the **Instance management** section of the menu
196+
197+
* Use the search box to filter instances.
198+
199+
# [Azure CLI](#tab/cli)
200+
201+
To view all Device Update accounts, use the [az iot device-update account list](/cli/azure/iot/device-update/account#az-iot-device-update-account-list) command.
202+
203+
```azurecli-interactive
204+
az iot device-update account list
205+
```
206+
207+
To view all instances in an account, use the [az iot device-update instance list](/cli/azure/iot/device-update/instance#az-iot-device-update-instance-list) command.
208+
209+
```azurecli-interactive
210+
az iot device-update instance list --account <account_name>
175211
```
176212

213+
Both `list` commands support additional grouping and filter operations. Use the `--query` argument to find accounts or instances based on conditions like tags. For example, `--query "[?tags.env == 'test']"`. Use the `--output` argument to format the results. For example, `--output table`.
214+
177215
---
178216

179217
## Next steps

articles/iot-hub-device-update/device-update-log-collection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Device Update for Azure IoT Hub log collection | Microsoft Docs
33
description: Device Update for IoT Hub enables remote collection of diagnostic logs from connected IoT devices.
44
author: lichris
55
ms.author: lichris
6-
ms.date: 06/22/2022
6+
ms.date: 06/23/2022
77
ms.topic: how-to
88
ms.service: iot-hub-device-update
99
---
@@ -23,7 +23,7 @@ Learn how to initiate a Device Update for IoT Hub log operation and view collect
2323
> [!NOTE]
2424
> The remote log collection feature is currently compatible only with devices that implement the Diagnostic Interface and are able to upload files to Azure Blob storage. The reference agent implementation also expects the device to write log files to a user-specified file path on the device.
2525
26-
# [CLI](#tab/cli)
26+
# [Azure CLI](#tab/cli)
2727

2828
* [Access to an IoT Hub with Device Update for IoT Hub enabled](create-device-update-account.md).
2929

@@ -37,7 +37,7 @@ Learn how to initiate a Device Update for IoT Hub log operation and view collect
3737

3838
[![Launch Cloud Shell in a new window](../../includes/media/cloud-shell-try-it/hdi-launch-cloud-shell.png)](https://shell.azure.com)
3939

40-
* If you prefer to run CLI reference commands locally, [install the Azure CLI](/cli/azure/install-azure-cli)
40+
* Or, if you prefer to run CLI reference commands locally, [install the Azure CLI](/cli/azure/install-azure-cli)
4141

4242
* Sign in to the Azure CLI by using the [az login](/cli/azure/reference-index#az-login) command.
4343
* 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).
@@ -66,7 +66,7 @@ In order to use the remote log collection feature, you must first link an Azure
6666

6767
6. Once back on the instance list, select **Refresh** periodically until the instance's provisioning state shows "Succeeded." This process usually takes 2-3 minutes.
6868

69-
# [CLI](#tab/cli)
69+
# [Azure CLI](#tab/cli)
7070

7171
Use the [az iot device-update instance create](/cli/azure/iot/device-update/instance#az-iot-device-update-instance-create) command to configure diagnostics for your Device Update instance.
7272

0 commit comments

Comments
 (0)