ServiceClient.GetServiceStatisticsAsync(CancellationToken) Method

Definition

Gets service statistics for the IoT hub. This call is made over HTTP.

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.ServiceStatistics> GetServiceStatisticsAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetServiceStatisticsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.ServiceStatistics>
override this.GetServiceStatisticsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.ServiceStatistics>
Public Overridable Function GetServiceStatisticsAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of ServiceStatistics)

Parameters

cancellationToken
CancellationToken

A cancellation token to cancel the operation.

Returns

The service statistics that can be retrieved from IoT hub, eg. the number of devices connected to the hub.

Applies to