Skip to main content

resource_stats

Creates, updates, deletes, gets or lists a resource_stats resource.

Overview

Nameresource_stats
TypeResource
Idazure.iot_hub.resource_stats

Fields

The following fields are returned by SELECT queries:

This is a synchronous operation. The body contains JSON-serialized statistics from the identity registry in the IoT hub.

NameDatatypeDescription
disabledDeviceCountinteger (int64)The count of disabled devices in the identity registry.
enabledDeviceCountinteger (int64)The count of enabled devices in the identity registry.
totalDeviceCountinteger (int64)The total count of devices in the identity registry.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, resourceNameapi-versionGet the statistics from an IoT hub.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resourceGroupNamestringThe name of the resource group that contains the IoT hub.
resourceNamestringThe name of the IoT hub.
subscriptionIdstringThe subscription identifier.
api-versionstringThe version of the API.

SELECT examples

Get the statistics from an IoT hub.

SELECT
disabledDeviceCount,
enabledDeviceCount,
totalDeviceCount
FROM azure.iot_hub.resource_stats
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND api-version = '{{ api-version }}'
;