Iot Hub Resource - Get Stats
从 IoT 中心获取统计信息。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats?api-version=2023-06-30
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
resource
|
path | True |
string |
包含 IoT 中心的资源组的名称。 |
|
resource
|
path | True |
string |
IoT 中心的名称。 |
|
subscription
|
path | True |
string |
订阅标识符。 |
|
api-version
|
query | True |
string |
API 的版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
这是一个同步作。 正文包含 IoT 中心标识注册表中的 JSON 序列化统计信息。 |
|
| Other Status Codes |
DefaultErrorResponse |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
IotHubResource_GetStats
示例请求
GET https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/IotHubStats?api-version=2023-06-30
示例响应
{
"totalDeviceCount": 0,
"enabledDeviceCount": 0,
"disabledDeviceCount": 0
}
定义
| 名称 | 说明 |
|---|---|
|
Error |
错误详细信息。 |
|
Registry |
标识注册表统计信息。 |
ErrorDetails
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码。 |
| details |
string |
错误详细信息。 |
| httpStatusCode |
string |
HTTP 状态代码。 |
| message |
string |
错误消息。 |
RegistryStatistics
标识注册表统计信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| disabledDeviceCount |
integer (int64) |
标识注册表中禁用的设备计数。 |
| enabledDeviceCount |
integer (int64) |
标识注册表中已启用的设备计数。 |
| totalDeviceCount |
integer (int64) |
标识注册表中的设备总数。 |