Home » Microsoft » AZ-220 v.2 » You have 1,000 devices that connect to an Azure IoT hub.
You have 1,000 devices that connect to an Azure IoT hub.
You are performing a scheduled check of deployed IoT devices.
You plan to run the following command from the Azure CLI prompt. az iot hub query –hub-name hub1 –query-command “SELECT * FROM devices WHERE connectionState = ‘Disconnected'” What does the command return?
A. the Device Disconnected events
B. the device twins
C. the Connections logs
D. the device credentials
Correct Answer: B
Explanation/Reference:
Explanation:
Device twin queries: IoT Hub exposes the device twins as a document collection called devices. For example, the following query retrieves the whole set of device twins:
SELECT * FROM devices
Reference:
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-query-language#device-and-module-twin-queries