你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Iot Hub Resource - Create Or Update
创建或更新 Iot 中心的元数据。 修改属性的常见模式是检索 IoT 中心元数据和安全元数据,然后将其与新正文中的修改值合并,以更新 IoT 中心。 如果 JSON 中缺少某些属性,更新 IoT 中心可能会导致这些值回退到默认值,这可能会导致意外行为。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}?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 的版本。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
If-Match |
string |
IoT 中心的 ETag。 请勿指定用于创建全新的 IoT 中心。 更新现有 IoT 中心所必需的。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
location | True |
string |
资源位置。 |
sku | True |
IotHub SKU 信息 |
|
etag |
string |
Etag 字段 不需要。 如果在响应正文中提供,则还必须根据正常的 ETag 约定将其作为标头提供。 |
|
identity |
IotHub 的托管标识。 |
||
properties |
IotHub 属性 |
||
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
这是作为对创建或更新作的状态轮询请求的响应返回的。 正文包含指示过渡性预配状态的资源表示形式。 |
|
201 Created |
这是一项长时间运行的操作。 如果验证完成,该作将返回 201。 响应包括包含状态 URL 的 Azure-AsyncOperation 标头。 客户端应轮询作状态的状态 URL。 如果成功,该作将返回 HTTP 状态代码 201(确定)。 |
|
Other Status Codes |
DefaultErrorResponse |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Iot |
Iot |
IotHubResource_AddCosmosDbEndpoint
示例请求
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub?api-version=2023-06-30
{
"location": "centraluseuap",
"tags": {},
"etag": "AAAAAAFD6M4=",
"properties": {
"ipFilterRules": [],
"networkRuleSets": {
"defaultAction": "Deny",
"applyToBuiltInEventHubEndpoint": true,
"ipRules": [
{
"filterName": "rule1",
"action": "Allow",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Allow",
"ipMask": "157.55.59.128/25"
}
]
},
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2
}
},
"routing": {
"endpoints": {
"serviceBusQueues": [],
"serviceBusTopics": [],
"eventHubs": [],
"storageContainers": [],
"cosmosDBSqlContainers": [
{
"primaryKey": "<primary-key>",
"secondaryKey": "<secondary-key>",
"authenticationType": "keyBased",
"containerName": "test",
"databaseName": "systemstore",
"endpointUri": "https://test-systemstore-test2.documents.azure.com",
"name": "endpointcosmos",
"partitionKeyName": "keystamped",
"partitionKeyTemplate": "{deviceid}-{YYYY}-{MM}",
"resourceGroup": "rg-test",
"subscriptionId": "<subscription-id>"
}
]
},
"routes": [],
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
}
},
"storageEndpoints": {
"$default": {
"sasTtlAsIso8601": "PT1H",
"connectionString": "",
"containerName": ""
}
},
"messagingEndpoints": {
"fileNotifications": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"enableFileUploadNotifications": false,
"cloudToDevice": {
"maxDeliveryCount": 10,
"defaultTtlAsIso8601": "PT1H",
"feedback": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"features": "None",
"minTlsVersion": "1.2",
"enableDataResidency": false
},
"sku": {
"name": "S1",
"capacity": 1
}
}
示例响应
{
"id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub",
"name": "testHub",
"type": "Microsoft.Devices/IotHubs",
"location": "centraluseuap",
"tags": {},
"etag": "AAAAAAFD6M4=",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"ipFilterRules": [
{
"filterName": "rule1",
"action": "Accept",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Accept",
"ipMask": "157.55.59.128/25"
}
],
"networkRuleSets": {
"defaultAction": "Deny",
"applyToBuiltInEventHubEndpoint": true,
"ipRules": [
{
"filterName": "rule1",
"action": "Allow",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Allow",
"ipMask": "157.55.59.128/25"
}
]
},
"hostName": "iot-dps-cit-hub-1.azure-devices.net",
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2,
"partitionIds": [
"0",
"1"
],
"path": "iot-dps-cit-hub-1",
"endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"
}
},
"routing": {
"endpoints": {
"serviceBusQueues": [],
"serviceBusTopics": [],
"eventHubs": [],
"storageContainers": [],
"cosmosDBSqlContainers": [
{
"id": "009208fa-9cb7-4b90-bfbd-f40086e766c9",
"authenticationType": "keyBased",
"containerName": "test",
"databaseName": "systemstore",
"endpointUri": "https://test-systemstore-test2.documents.azure.com",
"name": "endpointcosmos",
"partitionKeyName": "keystamped",
"partitionKeyTemplate": "{deviceid}-{YYYY}-{MM}",
"resourceGroup": "rg-test",
"subscriptionId": "<subscription-id>"
}
]
},
"routes": [],
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
}
},
"storageEndpoints": {
"$default": {
"sasTtlAsIso8601": "PT1H",
"connectionString": "",
"containerName": ""
}
},
"messagingEndpoints": {
"fileNotifications": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"enableFileUploadNotifications": false,
"cloudToDevice": {
"maxDeliveryCount": 10,
"defaultTtlAsIso8601": "PT1H",
"feedback": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"features": "None",
"minTlsVersion": "1.2",
"enableDataResidency": false
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"systemData": {
"createdAt": "2021-01-30T00:28:38.963Z"
}
}
{
"id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub",
"name": "testHub",
"type": "Microsoft.Devices/IotHubs",
"location": "centraluseuap",
"tags": {},
"etag": "AAAAAAFD6M4=",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"ipFilterRules": [
{
"filterName": "rule1",
"action": "Accept",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Accept",
"ipMask": "157.55.59.128/25"
}
],
"networkRuleSets": {
"defaultAction": "Deny",
"applyToBuiltInEventHubEndpoint": true,
"ipRules": [
{
"filterName": "rule1",
"action": "Allow",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Allow",
"ipMask": "157.55.59.128/25"
}
]
},
"hostName": "iot-dps-cit-hub-1.azure-devices.net",
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2,
"partitionIds": [
"0",
"1"
],
"path": "iot-dps-cit-hub-1",
"endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"
}
},
"routing": {
"endpoints": {
"serviceBusQueues": [],
"serviceBusTopics": [],
"eventHubs": [],
"storageContainers": [],
"cosmosDBSqlContainers": [
{
"id": "009208fa-9cb7-4b90-bfbd-f40086e766c9",
"authenticationType": "keyBased",
"containerName": "test",
"databaseName": "systemstore",
"endpointUri": "https://test-systemstore-test2.documents.azure.com",
"name": "endpointcosmos",
"partitionKeyName": "keystamped",
"partitionKeyTemplate": "{deviceid}-{YYYY}-{MM}",
"resourceGroup": "rg-test",
"subscriptionId": "<subscription-id>"
}
]
},
"routes": [],
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
}
},
"storageEndpoints": {
"$default": {
"sasTtlAsIso8601": "PT1H",
"connectionString": "",
"containerName": ""
}
},
"messagingEndpoints": {
"fileNotifications": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"enableFileUploadNotifications": false,
"cloudToDevice": {
"maxDeliveryCount": 10,
"defaultTtlAsIso8601": "PT1H",
"feedback": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"features": "None",
"minTlsVersion": "1.2",
"enableDataResidency": false
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"systemData": {
"createdAt": "2021-01-30T00:28:38.963Z"
}
}
IotHubResource_CreateOrUpdate
示例请求
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub?api-version=2023-06-30
{
"location": "centraluseuap",
"tags": {},
"etag": "AAAAAAFD6M4=",
"properties": {
"ipFilterRules": [],
"networkRuleSets": {
"defaultAction": "Deny",
"applyToBuiltInEventHubEndpoint": true,
"ipRules": [
{
"filterName": "rule1",
"action": "Allow",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Allow",
"ipMask": "157.55.59.128/25"
}
]
},
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2
}
},
"routing": {
"endpoints": {
"serviceBusQueues": [],
"serviceBusTopics": [],
"eventHubs": [],
"storageContainers": []
},
"routes": [],
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
}
},
"storageEndpoints": {
"$default": {
"sasTtlAsIso8601": "PT1H",
"connectionString": "",
"containerName": ""
}
},
"messagingEndpoints": {
"fileNotifications": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"enableFileUploadNotifications": false,
"cloudToDevice": {
"maxDeliveryCount": 10,
"defaultTtlAsIso8601": "PT1H",
"feedback": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"features": "None",
"minTlsVersion": "1.2",
"enableDataResidency": false
},
"sku": {
"name": "S1",
"capacity": 1
}
}
示例响应
{
"id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub",
"name": "testHub",
"type": "Microsoft.Devices/IotHubs",
"location": "centraluseuap",
"tags": {},
"etag": "AAAAAAFD6M4=",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"ipFilterRules": [
{
"filterName": "rule1",
"action": "Accept",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Accept",
"ipMask": "157.55.59.128/25"
}
],
"networkRuleSets": {
"defaultAction": "Deny",
"applyToBuiltInEventHubEndpoint": true,
"ipRules": [
{
"filterName": "rule1",
"action": "Allow",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Allow",
"ipMask": "157.55.59.128/25"
}
]
},
"hostName": "iot-dps-cit-hub-1.azure-devices.net",
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2,
"partitionIds": [
"0",
"1"
],
"path": "iot-dps-cit-hub-1",
"endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"
}
},
"routing": {
"endpoints": {
"serviceBusQueues": [],
"serviceBusTopics": [],
"eventHubs": [],
"storageContainers": []
},
"routes": [],
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
}
},
"storageEndpoints": {
"$default": {
"sasTtlAsIso8601": "PT1H",
"connectionString": "",
"containerName": ""
}
},
"messagingEndpoints": {
"fileNotifications": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"enableFileUploadNotifications": false,
"cloudToDevice": {
"maxDeliveryCount": 10,
"defaultTtlAsIso8601": "PT1H",
"feedback": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"features": "None",
"minTlsVersion": "1.2",
"enableDataResidency": false
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"systemData": {
"createdAt": "2021-01-30T00:28:38.963Z"
}
}
{
"id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub",
"name": "testHub",
"type": "Microsoft.Devices/IotHubs",
"location": "centraluseuap",
"tags": {},
"etag": "AAAAAAFD6M4=",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"ipFilterRules": [
{
"filterName": "rule1",
"action": "Accept",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Accept",
"ipMask": "157.55.59.128/25"
}
],
"networkRuleSets": {
"defaultAction": "Deny",
"applyToBuiltInEventHubEndpoint": true,
"ipRules": [
{
"filterName": "rule1",
"action": "Allow",
"ipMask": "131.117.159.53"
},
{
"filterName": "rule2",
"action": "Allow",
"ipMask": "157.55.59.128/25"
}
]
},
"hostName": "iot-dps-cit-hub-1.azure-devices.net",
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2,
"partitionIds": [
"0",
"1"
],
"path": "iot-dps-cit-hub-1",
"endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"
}
},
"routing": {
"endpoints": {
"serviceBusQueues": [],
"serviceBusTopics": [],
"eventHubs": [],
"storageContainers": []
},
"routes": [],
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
}
},
"storageEndpoints": {
"$default": {
"sasTtlAsIso8601": "PT1H",
"connectionString": "",
"containerName": ""
}
},
"messagingEndpoints": {
"fileNotifications": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"enableFileUploadNotifications": false,
"cloudToDevice": {
"maxDeliveryCount": 10,
"defaultTtlAsIso8601": "PT1H",
"feedback": {
"lockDurationAsIso8601": "PT1M",
"ttlAsIso8601": "PT1H",
"maxDeliveryCount": 10
}
},
"features": "None",
"minTlsVersion": "1.2",
"enableDataResidency": false
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"systemData": {
"createdAt": "2021-01-30T00:28:38.963Z"
}
}
定义
名称 | 说明 |
---|---|
Access |
分配给共享访问策略的权限。 |
Arm |
|
Arm |
|
Authentication |
指定用于连接到存储帐户的身份验证类型。 |
authentication |
用于针对服务总线队列终结点进行身份验证的方法 |
Capabilities |
为 IoT 中心启用的功能和功能。 |
Cloud |
IoT 中心云到设备的消息传送属性。 |
created |
创建资源的标识的类型。 |
Default |
网络规则集的默认作 |
Enrichment |
IoT 中心应用于传递到终结点的消息的扩充的属性。 |
Error |
错误详细信息。 |
Event |
IoT 中心使用的预配事件中心兼容终结点的属性。 |
Fallback |
回退路由的属性。 IoT 中心在将消息路由到回退终结点时使用这些属性。 |
Feedback |
云到设备消息的反馈队列的属性。 |
Iot |
IoT 中心的说明。 |
Iot |
在其中预配资源的位置之一的公共表示形式。 |
Iot |
IoT 中心的属性。 |
Iot |
区域的角色可以是主要角色,也可以是次要角色。 主要区域是 IoT 中心当前预配的位置。 次要区域是 Azure 灾难恢复(DR)配对区域,也是 IoT 中心可以故障转移到的区域。 |
Iot |
SKU 的名称。 |
Iot |
有关 IoT 中心的 SKU 的信息。 |
Iot |
IoT 中心的计费层。 |
Ip |
此规则捕获的请求的所需作。 |
Ip |
IoT 中心的 IP 筛选器规则。 |
Managed |
托管标识的属性。 |
Messaging |
此 IoT 中心使用的消息传送终结点的属性。 |
Network |
IP 筛选器作 |
Network |
要作为网络规则集的一部分应用的 IP 规则 |
Network |
IotHub 的网络规则集属性 |
Private |
专用终结点连接的专用终结点属性 |
Private |
IotHub 的专用终结点连接 |
Private |
专用终结点连接的属性 |
Private |
专用终结点连接的当前状态 |
Private |
专用终结点连接的状态 |
Public |
是否允许来自公用网络的请求 |
Resource |
用于资源的标识类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将从服务中删除任何标识。 |
Route |
IoT 中心用于将消息路由到终结点的路由规则的属性。 |
Routing |
与 cosmos DB sql 容器终结点相关的属性。 |
Routing |
与 IoT 中心基于路由规则路由消息的自定义终结点相关的属性。 在付费中心的所有终结点类型中最多允许 10 个自定义终结点,并且免费中心的所有终结点类型只允许 1 个自定义终结点。 |
Routing |
与事件中心终结点相关的属性。 |
Routing |
IoT 中心的路由相关属性。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging |
Routing |
与服务总线队列终结点类型相关的属性。 |
Routing |
与服务总线主题终结点类型相关的属性。 |
Routing |
要应用路由规则的源,例如 DeviceMessages。 |
Routing |
与存储容器终结点相关的属性。 |
Shared |
IoT 中心共享访问策略的属性。 |
Storage |
文件上传的 Azure 存储终结点的属性。 |
system |
与创建和上次修改资源相关的元数据。 |
AccessRights
分配给共享访问策略的权限。
值 | 说明 |
---|---|
DeviceConnect | |
RegistryRead | |
RegistryRead, DeviceConnect | |
RegistryRead, RegistryWrite | |
RegistryRead, RegistryWrite, DeviceConnect | |
RegistryRead, RegistryWrite, ServiceConnect | |
RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect | |
RegistryRead, ServiceConnect | |
RegistryRead, ServiceConnect, DeviceConnect | |
RegistryWrite | |
RegistryWrite, DeviceConnect | |
RegistryWrite, ServiceConnect | |
RegistryWrite, ServiceConnect, DeviceConnect | |
ServiceConnect | |
ServiceConnect, DeviceConnect |
ArmIdentity
名称 | 类型 | 说明 |
---|---|---|
principalId |
string |
主体 ID |
tenantId |
string |
租户 ID |
type |
用于资源的标识类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将从服务中删除任何标识。 |
|
userAssignedIdentities |
<string,
Arm |
ArmUserIdentity
名称 | 类型 | 说明 |
---|---|---|
clientId |
string |
|
principalId |
string |
AuthenticationType
指定用于连接到存储帐户的身份验证类型。
值 | 说明 |
---|---|
identityBased | |
keyBased |
authenticationType
用于针对服务总线队列终结点进行身份验证的方法
值 | 说明 |
---|---|
identityBased | |
keyBased |
Capabilities
为 IoT 中心启用的功能和功能。
值 | 说明 |
---|---|
DeviceManagement | |
None |
CloudToDeviceProperties
IoT 中心云到设备的消息传送属性。
名称 | 类型 | 说明 |
---|---|---|
defaultTtlAsIso8601 |
string (duration) |
设备队列中云到设备消息的默认生存时间。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 |
feedback |
云到设备消息的反馈队列的属性。 |
|
maxDeliveryCount |
integer (int32) minimum: 1maximum: 100 |
设备队列中云到设备消息的最大传递计数。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DefaultAction
网络规则集的默认作
值 | 说明 |
---|---|
Allow | |
Deny |
EnrichmentProperties
IoT 中心应用于传递到终结点的消息的扩充的属性。
名称 | 类型 | 说明 |
---|---|---|
endpointNames |
string[] |
将扩充应用到消息的终结点列表。 |
key |
string |
扩充属性的键或名称。 |
value |
string |
扩充属性的值。 |
ErrorDetails
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
string |
错误详细信息。 |
httpStatusCode |
string |
HTTP 状态代码。 |
message |
string |
错误消息。 |
EventHubProperties
IoT 中心使用的预配事件中心兼容终结点的属性。
名称 | 类型 | 说明 |
---|---|---|
endpoint |
string |
与事件中心兼容的终结点。 |
partitionCount |
integer (int32) |
用于在与事件中心兼容的终结点中接收设备到云消息的分区数。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages。 |
partitionIds |
string[] |
与事件中心兼容的终结点中的分区 ID。 |
path |
string |
与事件中心兼容的名称。 |
retentionTimeInDays |
integer (int64) |
设备到云消息的保留时间(以天为单位)。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages |
FallbackRouteProperties
回退路由的属性。 IoT 中心在将消息路由到回退终结点时使用这些属性。
名称 | 类型 | 说明 |
---|---|---|
condition |
string |
为了应用回退路由而评估的条件。 如果未提供条件,则默认情况下该条件的计算结果为 true。 有关语法,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language |
endpointNames |
string[] |
将满足条件的消息路由到的终结点列表。 目前只允许 1 个终结点。 |
isEnabled |
boolean |
用于指定是否启用回退路由。 |
name |
string |
路由的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符,并且必须是唯一的。 |
source |
要向其应用路由规则的源。 例如,DeviceMessages |
FeedbackProperties
云到设备消息的反馈队列的属性。
名称 | 类型 | 说明 |
---|---|---|
lockDurationAsIso8601 |
string (duration) |
反馈队列的锁定持续时间。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 |
maxDeliveryCount |
integer (int32) minimum: 1maximum: 100 |
IoT 中心尝试在反馈队列上传递消息的次数。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 |
ttlAsIso8601 |
string (duration) |
消息在 IoT 中心过期之前可供使用的时间段。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 |
IotHubDescription
IoT 中心的说明。
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
Etag 字段 不需要。 如果在响应正文中提供,则还必须根据正常的 ETag 约定将其作为标头提供。 |
id |
string |
资源标识符。 |
identity |
IotHub 的托管标识。 |
|
location |
string |
资源位置。 |
name |
string pattern: ^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$ |
资源名称。 |
properties |
IotHub 属性 |
|
sku |
IotHub SKU 信息 |
|
systemData |
与此资源相关的系统元数据。 |
|
tags |
object |
资源标记。 |
type |
string |
资源类型。 |
IotHubLocationDescription
在其中预配资源的位置之一的公共表示形式。
名称 | 类型 | 说明 |
---|---|---|
location |
string |
Azure 区域的名称 |
role |
区域的角色可以是主要角色,也可以是次要角色。 主要区域是 IoT 中心当前预配的位置。 次要区域是 Azure 灾难恢复(DR)配对区域,也是 IoT 中心可以故障转移到的区域。 |
IotHubProperties
IoT 中心的属性。
名称 | 类型 | 说明 |
---|---|---|
allowedFqdnList |
string[] |
从 Iot 中心传出允许的 FQDN(完全限定域名)列表。 |
authorizationPolicies |
可用于保护与 IoT 中心的连接的共享访问策略。 |
|
cloudToDevice |
IoT 中心云到设备的消息传送属性。 |
|
comments |
string |
IoT 中心注释。 |
disableDeviceSAS |
boolean |
如果为 true,则不能使用所有设备(包括 Edge 设备但不包括模块)范围的 SAS 密钥进行身份验证。 |
disableLocalAuth |
boolean |
如果为 true,则无法将具有 Iot 中心范围的 SAS 密钥的 SAS 令牌用于身份验证。 |
disableModuleSAS |
boolean |
如果为 true,则不能使用所有模块范围的 SAS 密钥进行身份验证。 |
enableDataResidency |
boolean |
如果设置为 true,则此属性将启用数据驻留,从而禁用灾难恢复。 |
enableFileUploadNotifications |
boolean |
如果为 True,则启用文件上传通知。 |
eventHubEndpoints |
<string,
Event |
与事件中心兼容的终结点属性。 此字典的唯一可能键是事件。 在对 IoT 中心进行创建或更新调用时,此密钥必须存在于字典中。 |
features |
为 IoT 中心启用的功能和功能。 |
|
hostName |
string |
主机的名称。 |
ipFilterRules |
IP 筛选器规则。 |
|
locations |
iot 中心的主要和辅助位置 |
|
messagingEndpoints |
<string,
Messaging |
文件上传通知队列的消息传送终结点属性。 |
minTlsVersion |
string |
指定要支持此中心的最低 TLS 版本。 可以设置为“1.2”,让使用低于 1.2 的 TLS 版本的客户端被拒绝。 |
networkRuleSets |
IotHub 的网络规则集属性 |
|
privateEndpointConnections |
在此 IotHub 上创建的专用终结点连接 |
|
provisioningState |
string |
预配状态。 |
publicNetworkAccess |
是否允许来自公用网络的请求 |
|
restrictOutboundNetworkAccess |
boolean |
如果为 true,则来自 IotHub 的出口将仅限于通过 allowedFqdnList 配置的允许 FQDN。 |
routing |
IoT 中心的路由相关属性。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging |
|
state |
string |
中心状态。 |
storageEndpoints |
<string,
Storage |
可在其中上传文件的 Azure 存储终结点列表。 目前只能配置一个 Azure 存储帐户,并且必须将其密钥作为$default。 指定多个存储帐户会导致引发错误。 当 enableFileUploadNotifications 属性设置为 True 时,不指定此属性的值,将导致引发错误。 |
IotHubReplicaRoleType
区域的角色可以是主要角色,也可以是次要角色。 主要区域是 IoT 中心当前预配的位置。 次要区域是 Azure 灾难恢复(DR)配对区域,也是 IoT 中心可以故障转移到的区域。
值 | 说明 |
---|---|
primary | |
secondary |
IotHubSku
SKU 的名称。
值 | 说明 |
---|---|
B1 | |
B2 | |
B3 | |
F1 | |
S1 | |
S2 | |
S3 |
IotHubSkuInfo
有关 IoT 中心的 SKU 的信息。
名称 | 类型 | 说明 |
---|---|---|
capacity |
integer (int64) |
预配的 IoT 中心单元数。 请参阅:https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits。 |
name |
SKU 的名称。 |
|
tier |
IoT 中心的计费层。 |
IotHubSkuTier
IoT 中心的计费层。
值 | 说明 |
---|---|
Basic | |
Free | |
Standard |
IpFilterActionType
此规则捕获的请求的所需作。
值 | 说明 |
---|---|
Accept | |
Reject |
IpFilterRule
IoT 中心的 IP 筛选器规则。
名称 | 类型 | 说明 |
---|---|---|
action |
此规则捕获的请求的所需作。 |
|
filterName |
string |
IP 筛选器规则的名称。 |
ipMask |
string |
一个字符串,其中包含规则的 CIDR 表示法中的 IP 地址范围。 |
ManagedIdentity
托管标识的属性。
名称 | 类型 | 说明 |
---|---|---|
userAssignedIdentity |
string |
用户分配的标识。 |
MessagingEndpointProperties
此 IoT 中心使用的消息传送终结点的属性。
名称 | 类型 | 说明 |
---|---|---|
lockDurationAsIso8601 |
string (duration) |
锁定持续时间。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload。 |
maxDeliveryCount |
integer (int32) minimum: 1maximum: 100 |
IoT 中心尝试传递消息的次数。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload。 |
ttlAsIso8601 |
string (duration) |
消息在 IoT 中心过期之前可供使用的时间段。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload。 |
NetworkRuleIPAction
IP 筛选器作
值 | 说明 |
---|---|
Allow |
NetworkRuleSetIpRule
要作为网络规则集的一部分应用的 IP 规则
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
action | Allow |
IP 筛选器作 |
|
filterName |
string |
IP 筛选器规则的名称。 |
|
ipMask |
string |
一个字符串,其中包含规则的 CIDR 表示法中的 IP 地址范围。 |
NetworkRuleSetProperties
IotHub 的网络规则集属性
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
applyToBuiltInEventHubEndpoint |
boolean |
如果为 True,则网络规则集也应用于 IotHub 的 BuiltIn EventHub EndPoint |
|
defaultAction | Deny |
网络规则集的默认作 |
|
ipRules |
IP 规则列表 |
PrivateEndpoint
专用终结点连接的专用终结点属性
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源标识符。 |
PrivateEndpointConnection
IotHub 的专用终结点连接
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源标识符。 |
name |
string |
资源名称。 |
properties |
专用终结点连接的属性 |
|
type |
string |
资源类型。 |
PrivateEndpointConnectionProperties
专用终结点连接的属性
名称 | 类型 | 说明 |
---|---|---|
privateEndpoint |
专用终结点连接的专用终结点属性 |
|
privateLinkServiceConnectionState |
专用终结点连接的当前状态 |
PrivateLinkServiceConnectionState
专用终结点连接的当前状态
名称 | 类型 | 说明 |
---|---|---|
actionsRequired |
string |
专用终结点连接所需的作 |
description |
string |
专用终结点连接的当前状态说明 |
status |
专用终结点连接的状态 |
PrivateLinkServiceConnectionStatus
专用终结点连接的状态
值 | 说明 |
---|---|
Approved | |
Disconnected | |
Pending | |
Rejected |
PublicNetworkAccess
是否允许来自公用网络的请求
值 | 说明 |
---|---|
Disabled | |
Enabled |
ResourceIdentityType
用于资源的标识类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将从服务中删除任何标识。
值 | 说明 |
---|---|
None | |
SystemAssigned | |
SystemAssigned, UserAssigned | |
UserAssigned |
RouteProperties
IoT 中心用于将消息路由到终结点的路由规则的属性。
名称 | 类型 | 说明 |
---|---|---|
condition |
string |
评估为应用路由规则的条件。 如果未提供任何条件,则默认情况下计算结果为 true。 有关语法,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language |
endpointNames |
string[] |
路由满足条件的消息的终结点列表。 目前只允许一个终结点。 |
isEnabled |
boolean |
用于指定是否启用路由。 |
name |
string pattern: ^[A-Za-z0-9-._]{1,64}$ |
路由的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符,并且必须是唯一的。 |
source |
要应用路由规则的源,例如 DeviceMessages。 |
RoutingCosmosDBSqlApiProperties
与 cosmos DB sql 容器终结点相关的属性。
名称 | 类型 | 说明 |
---|---|---|
authenticationType |
用于针对 cosmos DB sql 容器终结点进行身份验证的方法 |
|
containerName |
string |
cosmos DB 数据库中 cosmos DB sql 容器的名称。 |
databaseName |
string |
cosmos DB 帐户中的 cosmos DB 数据库的名称。 |
endpointUri |
string (uri) |
cosmos DB 帐户的 URL。 它必须包括协议 https:// |
id |
string |
cosmos DB sql 容器终结点的 ID |
identity |
路由 cosmos DB 容器终结点的托管标识属性。 |
|
name |
string pattern: ^[A-Za-z0-9-._]{1,64}$ |
标识此终结点的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符。 保留以下名称:事件、fileNotifications、$default。 终结点名称在终结点类型中必须是唯一的。 |
partitionKeyName |
string |
与此 cosmos DB sql 容器关联的分区键的名称(如果存在)。 这是一个可选参数。 |
partitionKeyTemplate |
string |
用于生成用于此 cosmos DB sql 容器的合成分区键值的模板。 模板必须至少包含以下占位符之一:{iothub}、{deviceid}、{DD}、{MM}和 {YYYY}。 最多可以指定一个占位符,但顺序和非占位符组件是任意的。 仅当指定 PartitionKeyName 时,此参数才是必需的。 |
primaryKey |
string |
cosmos DB 帐户的主键。 |
resourceGroup |
string |
cosmos DB 帐户的资源组的名称。 |
secondaryKey |
string |
cosmos DB 帐户的辅助密钥。 |
subscriptionId |
string |
cosmos DB 帐户的订阅标识符。 |
RoutingEndpoints
与 IoT 中心基于路由规则路由消息的自定义终结点相关的属性。 在付费中心的所有终结点类型中最多允许 10 个自定义终结点,并且免费中心的所有终结点类型只允许 1 个自定义终结点。
名称 | 类型 | 说明 |
---|---|---|
cosmosDBSqlContainers |
IoT 中心根据路由规则将消息路由到的 Cosmos DB 容器终结点列表。 |
|
eventHubs |
IoT 中心根据路由规则将消息路由到的事件中心终结点列表。 此列表不包括内置事件中心终结点。 |
|
serviceBusQueues |
IoT 中心根据路由规则将消息路由到的服务总线队列终结点列表。 |
|
serviceBusTopics |
IoT 中心根据路由规则将消息路由到的服务总线主题终结点列表。 |
|
storageContainers |
IoT 中心根据路由规则将消息路由到的存储容器终结点列表。 |
RoutingEventHubProperties
与事件中心终结点相关的属性。
名称 | 类型 | 说明 |
---|---|---|
authenticationType |
用于针对事件中心终结点进行身份验证的方法 |
|
connectionString |
string |
事件中心终结点的连接字符串。 |
endpointUri |
string |
事件中心终结点的 URL。 它必须包括协议 sb:// |
entityPath |
string |
事件中心命名空间上的事件中心名称 |
id |
string |
事件中心终结点的 ID |
identity |
路由事件中心终结点的托管标识属性。 |
|
name |
string pattern: ^[A-Za-z0-9-._]{1,64}$ |
标识此终结点的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符。 保留以下名称:事件、fileNotifications、$default。 终结点名称在终结点类型中必须是唯一的。 |
resourceGroup |
string |
事件中心终结点的资源组的名称。 |
subscriptionId |
string |
事件中心终结点的订阅标识符。 |
RoutingProperties
IoT 中心的路由相关属性。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
名称 | 类型 | 说明 |
---|---|---|
endpoints |
与 IoT 中心基于路由规则路由消息的自定义终结点相关的属性。 在付费中心的所有终结点类型中最多允许 10 个自定义终结点,并且免费中心的所有终结点类型只允许 1 个自定义终结点。 |
|
enrichments |
IoT 中心应用于要传递到内置终结点和自定义终结点的消息的用户提供的扩充列表。 请参阅:https://aka.ms/telemetryoneventgrid |
|
fallbackRoute |
当“路由”部分中指定的任何条件均未满足时,用作回退路由的路由的属性。 这是一个可选参数。 如果模板中不存在此属性,则默认禁用回退路由。 |
|
routes |
IoT 中心用来将消息路由到内置终结点和自定义终结点的用户提供的路由规则列表。 付费中心最多允许 100 个路由规则,最多允许 5 个路由规则用于免费中心。 |
RoutingServiceBusQueueEndpointProperties
与服务总线队列终结点类型相关的属性。
名称 | 类型 | 说明 |
---|---|---|
authenticationType |
用于针对服务总线队列终结点进行身份验证的方法 |
|
connectionString |
string |
服务总线队列终结点的连接字符串。 |
endpointUri |
string |
服务总线队列终结点的 URL。 它必须包括协议 sb:// |
entityPath |
string |
服务总线命名空间上的队列名称 |
id |
string |
服务总线队列终结点的 ID |
identity |
路由服务总线队列终结点的托管标识属性。 |
|
name |
string pattern: ^[A-Za-z0-9-._]{1,64}$ |
标识此终结点的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符。 保留以下名称:事件、fileNotifications、$default。 终结点名称在终结点类型中必须是唯一的。 该名称不需要与实际队列名称相同。 |
resourceGroup |
string |
服务总线队列终结点的资源组的名称。 |
subscriptionId |
string |
服务总线队列终结点的订阅标识符。 |
RoutingServiceBusTopicEndpointProperties
与服务总线主题终结点类型相关的属性。
名称 | 类型 | 说明 |
---|---|---|
authenticationType |
用于针对服务总线主题终结点进行身份验证的方法 |
|
connectionString |
string |
服务总线主题终结点的连接字符串。 |
endpointUri |
string |
服务总线主题终结点的 URL。 它必须包括协议 sb:// |
entityPath |
string |
服务总线主题上的队列名称 |
id |
string |
服务总线主题终结点的 ID |
identity |
路由服务总线主题终结点的托管标识属性。 |
|
name |
string pattern: ^[A-Za-z0-9-._]{1,64}$ |
标识此终结点的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符。 保留以下名称:事件、fileNotifications、$default。 终结点名称在终结点类型中必须是唯一的。 该名称不需要与实际主题名称相同。 |
resourceGroup |
string |
服务总线主题终结点的资源组的名称。 |
subscriptionId |
string |
服务总线主题终结点的订阅标识符。 |
RoutingSource
要应用路由规则的源,例如 DeviceMessages。
值 | 说明 |
---|---|
DeviceConnectionStateEvents | |
DeviceJobLifecycleEvents | |
DeviceLifecycleEvents | |
DeviceMessages | |
Invalid | |
TwinChangeEvents |
RoutingStorageContainerProperties
与存储容器终结点相关的属性。
名称 | 类型 | 说明 |
---|---|---|
authenticationType |
用于针对存储终结点进行身份验证的方法 |
|
batchFrequencyInSeconds |
integer (int32) minimum: 60maximum: 720 |
Blob 写入存储的时间间隔。 值应介于 60 到 720 秒之间。 默认值为 300 秒。 |
connectionString |
string |
存储帐户的连接字符串。 |
containerName |
string |
存储帐户中的存储容器的名称。 |
encoding |
enum:
|
用于将消息序列化为 Blob 的编码。 支持的值为“avro”、“avrodeflate”和“JSON”。 默认值为“avro”。 |
endpointUri |
string |
存储终结点的 URL。 它必须包括协议 https:// |
fileNameFormat |
string |
Blob 的文件名格式。 默认格式为 {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}。 所有参数都是必需参数,但可以重新排序。 |
id |
string |
存储容器终结点的 ID |
identity |
路由存储终结点的托管标识属性。 |
|
maxChunkSizeInBytes |
integer (int32) minimum: 10485760maximum: 524288000 |
写入存储的每个 Blob 的最大字节数。 值应介于 10485760(10MB) 和 524288000(500MB) 之间。 默认值为 314572800(300MB)。 |
name |
string pattern: ^[A-Za-z0-9-._]{1,64}$ |
标识此终结点的名称。 该名称只能包含字母数字字符、句点、下划线、连字符,最大长度为 64 个字符。 保留以下名称:事件、fileNotifications、$default。 终结点名称在终结点类型中必须是唯一的。 |
resourceGroup |
string |
存储帐户的资源组的名称。 |
subscriptionId |
string |
存储帐户的订阅标识符。 |
SharedAccessSignatureAuthorizationRule
IoT 中心共享访问策略的属性。
名称 | 类型 | 说明 |
---|---|---|
keyName |
string |
共享访问策略的名称。 |
primaryKey |
string |
主键。 |
rights |
分配给共享访问策略的权限。 |
|
secondaryKey |
string |
辅助密钥。 |
StorageEndpointProperties
文件上传的 Azure 存储终结点的属性。
名称 | 类型 | 说明 |
---|---|---|
authenticationType |
指定用于连接到存储帐户的身份验证类型。 |
|
connectionString |
string |
将文件上传到的 Azure 存储帐户的连接字符串。 |
containerName |
string |
上传文件的根容器的名称。 容器不需要存在,但应使用指定的 connectionString 进行创建。 |
identity |
用于文件上传的存储终结点的托管标识属性。 |
|
sasTtlAsIso8601 |
string (duration) |
IoT 中心为文件上传生成的 SAS URI 有效的时间段。 请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options。 |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |