Iot Hub Resource - Create Or Update

Create 或更新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 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

包含IoT中樞的資源組名。

resourceName
path True

string

IoT 中樞的名稱。

subscriptionId
path True

string

訂用帳戶識別碼。

api-version
query True

string

API 的版本。

要求標頭

名稱 必要 類型 Description
If-Match

string

IoT 中樞 的 ETag。 請勿指定建立全新的 IoT 中樞。 更新現有 IoT 中樞的必要專案。

要求本文

名稱 必要 類型 Description
location True

string

資源位置。

sku True

IotHubSkuInfo

IotHub SKU 資訊

etag

string

不需要 Etag 欄位。 如果在回應本文中提供,也必須依一般 ETag 慣例提供它做為標頭。

identity

ArmIdentity

IotHub 的受控識別。

properties

IotHubProperties

IotHub 屬性

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

IotHubDescription

這會以回應建立或更新作業的狀態輪詢要求傳回。 本文包含資源表示法,表示過渡布建狀態。

201 Created

IotHubDescription

這是長時間執行的作業。 如果驗證完成,作業會傳回 201。 回應包含包含狀態 URL 的 Azure-AsyncOperation 標頭。 用戶端預期會輪詢作業狀態 URL。 如果成功,作業會傳回 HTTP 狀態代碼 201 (OK) 。

Other Status Codes

ErrorDetails

DefaultErrorResponse

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

IotHubResource_AddCosmosDbEndpoint
IotHubResource_CreateOrUpdate

IotHubResource_AddCosmosDbEndpoint

Sample Request

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
  }
}

Sample Response

{
  "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

Sample Request

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
  }
}

Sample Response

{
  "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"
  }
}

定義

名稱 Description
AccessRights

指派給共用存取原則的許可權。

ArmIdentity
ArmUserIdentity
AuthenticationType

指定用於連線至記憶體帳戶的驗證類型。

authenticationType

用來針對服務總線佇列端點進行驗證的方法

Capabilities

IoT 中樞啟用的功能和功能。

CloudToDeviceProperties

IoT 中樞雲端到裝置的傳訊屬性。

createdByType

建立資源的身分識別類型。

DefaultAction

網路規則集的預設動作

EnrichmentProperties

IoT 中樞的擴充屬性會套用至傳遞至端點的訊息。

ErrorDetails

錯誤詳細數據。

EventHubProperties

IoT 中樞所使用的已布建事件中樞相容端點屬性。

FallbackRouteProperties

後援路由的屬性。 IoT 中樞 將訊息路由傳送至後援端點時,會使用這些屬性。

FeedbackProperties

雲端到裝置訊息的意見反應佇列屬性。

IotHubDescription

IoT 中樞的描述。

IotHubLocationDescription

布建資源之其中一個位置的公用表示法。

IotHubProperties

IoT 中樞的屬性。

IotHubReplicaRoleType

區域的角色可以是主要或次要。 主要區域是目前布建IoT中樞的位置。 次要區域是 Azure 災害復原 (DR) 配對區域,以及 IoT 中樞可以故障轉移到的區域。

IotHubSku

SKU 的名稱。

IotHubSkuInfo

IoT 中樞 SKU 的相關信息。

IotHubSkuTier

IoT 中樞的計費層。

IpFilterActionType

此規則所擷取之要求的所需動作。

IpFilterRule

IoT 中樞的IP篩選規則。

ManagedIdentity

受控識別的屬性。

MessagingEndpointProperties

這個 IoT 中樞所使用的傳訊端點屬性。

NetworkRuleIPAction

IP 篩選動作

NetworkRuleSetIpRule

要套用為網路規則集一部分的IP規則

NetworkRuleSetProperties

IotHub 的網路規則集屬性

PrivateEndpoint

私人端點連線的私人端點屬性

PrivateEndpointConnection

IotHub 的私人端點連線

PrivateEndpointConnectionProperties

私人端點連線的屬性

PrivateLinkServiceConnectionState

私人端點連線的目前狀態

PrivateLinkServiceConnectionStatus

私人端點連線的狀態

PublicNetworkAccess

是否允許來自公用網路的要求

ResourceIdentityType

用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。

RouteProperties

IoT 中樞用來將訊息路由傳送至端點的路由規則屬性。

RoutingCosmosDBSqlApiProperties

與cosmos DB sql容器端點相關的屬性。

RoutingEndpoints

與IoT中樞根據路由規則路由訊息的自定義端點相關的屬性。 在付費中樞的所有端點類型中,最多允許 10 個自定義端點,而且免費中樞在所有端點類型中只允許 1 個自定義端點。

RoutingEventHubProperties

與事件中樞端點相關的屬性。

RoutingProperties

IoT 中樞的路由相關屬性。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging

RoutingServiceBusQueueEndpointProperties

與服務總線佇列端點類型相關的屬性。

RoutingServiceBusTopicEndpointProperties

與服務總線主題端點類型相關的屬性。

RoutingSource

要套用路由規則的來源,例如 DeviceMessages。

RoutingStorageContainerProperties

與記憶體容器端點相關的屬性。

SharedAccessSignatureAuthorizationRule

IoT 中樞共用存取原則的屬性。

StorageEndpointProperties

檔案上傳的 Azure 記憶體端點屬性。

systemData

與建立和上次修改資源相關的元數據。

AccessRights

指派給共用存取原則的許可權。

名稱 類型 Description
DeviceConnect

string

RegistryRead

string

RegistryRead, DeviceConnect

string

RegistryRead, RegistryWrite

string

RegistryRead, RegistryWrite, DeviceConnect

string

RegistryRead, RegistryWrite, ServiceConnect

string

RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect

string

RegistryRead, ServiceConnect

string

RegistryRead, ServiceConnect, DeviceConnect

string

RegistryWrite

string

RegistryWrite, DeviceConnect

string

RegistryWrite, ServiceConnect

string

RegistryWrite, ServiceConnect, DeviceConnect

string

ServiceConnect

string

ServiceConnect, DeviceConnect

string

ArmIdentity

名稱 類型 Description
principalId

string

主體標識碼

tenantId

string

租用戶識別碼

type

ResourceIdentityType

用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。

userAssignedIdentities

<string,  ArmUserIdentity>

ArmUserIdentity

名稱 類型 Description
clientId

string

principalId

string

AuthenticationType

指定用於連線至記憶體帳戶的驗證類型。

名稱 類型 Description
identityBased

string

keyBased

string

authenticationType

用來針對服務總線佇列端點進行驗證的方法

名稱 類型 Description
identityBased

string

keyBased

string

Capabilities

IoT 中樞啟用的功能和功能。

名稱 類型 Description
DeviceManagement

string

None

string

CloudToDeviceProperties

IoT 中樞雲端到裝置的傳訊屬性。

名稱 類型 Description
defaultTtlAsIso8601

string

裝置佇列中雲端到裝置訊息的預設存留時間。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages

feedback

FeedbackProperties

雲端到裝置訊息的意見反應佇列屬性。

maxDeliveryCount

integer

裝置佇列中雲端到裝置訊息的最大傳遞計數。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages

createdByType

建立資源的身分識別類型。

名稱 類型 Description
Application

string

Key

string

ManagedIdentity

string

User

string

DefaultAction

網路規則集的預設動作

名稱 類型 Description
Allow

string

Deny

string

EnrichmentProperties

IoT 中樞的擴充屬性會套用至傳遞至端點的訊息。

名稱 類型 Description
endpointNames

string[]

擴充套用至訊息的端點清單。

key

string

擴充屬性的索引鍵或名稱。

value

string

擴充屬性的值。

ErrorDetails

錯誤詳細數據。

名稱 類型 Description
code

string

錯誤碼。

details

string

錯誤詳細資料。

httpStatusCode

string

HTTP 狀態碼。

message

string

錯誤訊息。

EventHubProperties

IoT 中樞所使用的已布建事件中樞相容端點屬性。

名稱 類型 Description
endpoint

string

事件中樞相容端點。

partitionCount

integer

在事件中樞相容端點中接收裝置到雲端訊息的分割區數目。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages

partitionIds

string[]

事件中樞相容端點中的分割區標識符。

path

string

事件中樞相容名稱。

retentionTimeInDays

integer

裝置到雲端訊息的保留時間,以天為單位。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages

FallbackRouteProperties

後援路由的屬性。 IoT 中樞 將訊息路由傳送至後援端點時,會使用這些屬性。

名稱 類型 Description
condition

string

評估以套用後援路由的條件。 如果未提供條件,預設會評估為 true。 如需文法,請參閱: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language

endpointNames

string[]

滿足條件的訊息會路由傳送至的端點清單。 目前只允許 1 個端點。

isEnabled

boolean

用來指定是否啟用後援路由。

name

string

路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,且必須是唯一的。

source

RoutingSource

要套用路由規則的來源。 例如,DeviceMessages

FeedbackProperties

雲端到裝置訊息的意見反應佇列屬性。

名稱 類型 Description
lockDurationAsIso8601

string

意見反應佇列的鎖定持續時間。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages

maxDeliveryCount

integer

IoT 中樞嘗試在意見反應佇列上傳遞訊息的次數。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages

ttlAsIso8601

string

訊息在IoT中樞過期之前可供取用的時段。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages

IotHubDescription

IoT 中樞的描述。

名稱 類型 Description
etag

string

不需要 Etag 欄位。 如果在回應本文中提供,則也必須根據一般 ETag 慣例,以標頭的形式提供。

id

string

資源標識碼。

identity

ArmIdentity

IotHub 的受控識別。

location

string

資源位置。

name

string

資源名稱。

properties

IotHubProperties

IotHub 屬性

sku

IotHubSkuInfo

IotHub SKU 資訊

systemData

systemData

與此資源相關的系統元數據。

tags

object

資源標籤。

type

string

資源類型。

IotHubLocationDescription

布建資源之其中一個位置的公用表示法。

名稱 類型 Description
location

string

Azure 區域的名稱

role

IotHubReplicaRoleType

區域的角色可以是主要或次要。 主要區域是目前布建IoT中樞的位置。 次要區域是 Azure 災害復原 (DR) 配對區域,以及 IoT 中樞可以故障轉移到的區域。

IotHubProperties

IoT 中樞的屬性。

名稱 類型 Description
allowedFqdnList

string[]

允許的 FQDN 清單 (Iot 中樞輸出的完整域名) 。

authorizationPolicies

SharedAccessSignatureAuthorizationRule[]

您可以用來保護IoT中樞連線的共用存取原則。

cloudToDevice

CloudToDeviceProperties

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,  EventHubProperties>

事件中樞相容的端點屬性。 這個字典的唯一可能索引鍵是事件。 在建立或更新IoT中樞的呼叫時,此金鑰必須存在於字典中。

features

Capabilities

為IoT中樞啟用的功能和功能。

hostName

string

主機的名稱。

ipFilterRules

IpFilterRule[]

IP 篩選規則。

locations

IotHubLocationDescription[]

iot 中樞的主要和次要位置

messagingEndpoints

<string,  MessagingEndpointProperties>

檔案上傳通知佇列的傳訊端點屬性。

minTlsVersion

string

指定要支援此中樞的最低 TLS 版本。 可以設定為 「1.2」 ,讓使用低於 1.2 的 TLS 版本的用戶端遭到拒絕。

networkRuleSets

NetworkRuleSetProperties

IotHub 的網路規則集屬性

privateEndpointConnections

PrivateEndpointConnection[]

在此IotHub上建立的私人端點連線

provisioningState

string

布建狀態。

publicNetworkAccess

PublicNetworkAccess

是否允許來自公用網路的要求

restrictOutboundNetworkAccess

boolean

如果為 true,則來自 IotHub 的輸出將限製為僅透過 allowedFqdnList 設定的允許 FQDN。

routing

RoutingProperties

IoT 中樞的路由相關屬性。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging

state

string

中樞狀態。

storageEndpoints

<string,  StorageEndpointProperties>

您可以在其中上傳檔案的 Azure 記憶體端點清單。 目前您只能設定一個 Azure 記憶體帳戶,而且必須將其密鑰設定為$default。 指定多個記憶體帳戶會導致擲回錯誤。 當 enableFileUploadNotifications 屬性設定為 True 時,未指定這個屬性的值,會導致擲回錯誤。

IotHubReplicaRoleType

區域的角色可以是主要或次要。 主要區域是目前布建IoT中樞的位置。 次要區域是 Azure 災害復原 (DR) 配對區域,以及 IoT 中樞可以故障轉移到的區域。

名稱 類型 Description
primary

string

secondary

string

IotHubSku

SKU 的名稱。

名稱 類型 Description
B1

string

B2

string

B3

string

F1

string

S1

string

S2

string

S3

string

IotHubSkuInfo

IoT 中樞 SKU 的相關信息。

名稱 類型 Description
capacity

integer

布建的 IoT 中樞 單位數目。 請參閱:https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits

name

IotHubSku

SKU 的名稱。

tier

IotHubSkuTier

IoT 中樞的計費層。

IotHubSkuTier

IoT 中樞的計費層。

名稱 類型 Description
Basic

string

Free

string

Standard

string

IpFilterActionType

此規則所擷取之要求的所需動作。

名稱 類型 Description
Accept

string

Reject

string

IpFilterRule

IoT 中樞的IP篩選規則。

名稱 類型 Description
action

IpFilterActionType

此規則所擷取之要求所需的動作。

filterName

string

IP 篩選規則的名稱。

ipMask

string

字串,包含規則 CIDR 表示法中的IP位址範圍。

ManagedIdentity

受控識別的屬性。

名稱 類型 Description
userAssignedIdentity

string

使用者指派的身分識別。

MessagingEndpointProperties

這個 IoT 中樞所使用的傳訊端點屬性。

名稱 類型 Description
lockDurationAsIso8601

string

鎖定持續時間。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload

maxDeliveryCount

integer

IoT 中樞嘗試傳遞訊息的次數。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload

ttlAsIso8601

string

訊息在IoT中樞過期之前可供取用的時段。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload

NetworkRuleIPAction

IP 篩選動作

名稱 類型 Description
Allow

string

NetworkRuleSetIpRule

要套用為網路規則集一部分的IP規則

名稱 類型 預設值 Description
action

NetworkRuleIPAction

Allow

IP 篩選動作

filterName

string

IP 篩選規則的名稱。

ipMask

string

字串,包含規則 CIDR 表示法中的IP位址範圍。

NetworkRuleSetProperties

IotHub 的網路規則集屬性

名稱 類型 預設值 Description
applyToBuiltInEventHubEndpoint

boolean

如果為 True,則網路規則集也會套用至 IotHub 的 BuiltIn EventHub EndPoint

defaultAction

DefaultAction

Deny

網路規則集的預設動作

ipRules

NetworkRuleSetIpRule[]

IP 規則清單

PrivateEndpoint

私人端點連線的私人端點屬性

名稱 類型 Description
id

string

資源標識碼。

PrivateEndpointConnection

IotHub 的私人端點連線

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties

PrivateEndpointConnectionProperties

私人端點連線的屬性

type

string

資源類型。

PrivateEndpointConnectionProperties

私人端點連線的屬性

名稱 類型 Description
privateEndpoint

PrivateEndpoint

私人端點連線的私人端點屬性

privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

私人端點連線的目前狀態

PrivateLinkServiceConnectionState

私人端點連線的目前狀態

名稱 類型 Description
actionsRequired

string

私人端點連線所需的動作

description

string

私人端點連線目前狀態的描述

status

PrivateLinkServiceConnectionStatus

私人端點連線的狀態

PrivateLinkServiceConnectionStatus

私人端點連線的狀態

名稱 類型 Description
Approved

string

Disconnected

string

Pending

string

Rejected

string

PublicNetworkAccess

是否允許來自公用網路的要求

名稱 類型 Description
Disabled

string

Enabled

string

ResourceIdentityType

用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。

名稱 類型 Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

RouteProperties

IoT 中樞用來將訊息路由傳送至端點的路由規則屬性。

名稱 類型 Description
condition

string

評估為套用路由規則的條件。 如果未提供任何條件,預設會評估為 true。 如需文法,請參閱: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language

endpointNames

string[]

路由傳送滿足條件之訊息的端點清單。 目前只允許一個端點。

isEnabled

boolean

用來指定是否啟用路由。

name

string

路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,且必須是唯一的。

source

RoutingSource

要套用路由規則的來源,例如 DeviceMessages。

RoutingCosmosDBSqlApiProperties

與cosmos DB sql容器端點相關的屬性。

名稱 類型 Description
authenticationType

authenticationType

用來對cosmos DB sql容器端點進行驗證的方法

containerName

string

cosmos DB 資料庫中 cosmos DB sql 容器的名稱。

databaseName

string

cosmos DB 帳戶中 cosmos DB 資料庫的名稱。

endpointUri

string

cosmos DB 帳戶的 URL。 它必須包含通訊協定 https://

id

string

Cosmos DB sql 容器端點的標識碼

identity

ManagedIdentity

路由cosmos DB容器端點的受控識別屬性。

name

string

識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、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 個自定義端點。

名稱 類型 Description
cosmosDBSqlContainers

RoutingCosmosDBSqlApiProperties[]

IoT 中樞根據路由規則將訊息路由傳送至的Cosmos DB容器端點清單。

eventHubs

RoutingEventHubProperties[]

IoT 中樞根據路由規則將訊息路由傳送至的事件中樞端點清單。 此清單不包含內建事件中樞端點。

serviceBusQueues

RoutingServiceBusQueueEndpointProperties[]

IoT 中樞根據路由規則將訊息路由傳送至的服務總線佇列端點清單。

serviceBusTopics

RoutingServiceBusTopicEndpointProperties[]

IoT 中樞根據路由規則將訊息路由傳送至的服務總線主題端點清單。

storageContainers

RoutingStorageContainerProperties[]

IoT 中樞根據路由規則將訊息路由傳送至的記憶體容器端點清單。

RoutingEventHubProperties

與事件中樞端點相關的屬性。

名稱 類型 Description
authenticationType

authenticationType

用來對事件中樞端點進行驗證的方法

connectionString

string

事件中樞端點的 連接字串。

endpointUri

string

事件中樞端點的 URL。 它必須包含通訊協定 sb://

entityPath

string

事件中樞命名空間上的事件中樞名稱

id

string

事件中樞端點的標識碼

identity

ManagedIdentity

路由事件中樞端點的受控識別屬性。

name

string

識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。

resourceGroup

string

事件中樞端點的資源群組名稱。

subscriptionId

string

事件中樞端點的訂用帳戶標識碼。

RoutingProperties

IoT 中樞的路由相關屬性。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging

名稱 類型 Description
endpoints

RoutingEndpoints

與IoT中樞根據路由規則路由訊息的自定義端點相關的屬性。 付費中樞的所有端點類型最多允許10個自定義端點,且免費中樞的所有端點類型只允許1個自定義端點。

enrichments

EnrichmentProperties[]

IoT 中樞套用至要傳遞至內建和自定義端點的訊息的使用者提供擴充清單。 請參閱:https://aka.ms/telemetryoneventgrid

fallbackRoute

FallbackRouteProperties

當符合 『routes』 區段中未指定任何條件時,用來做為後援路由的路由屬性。 這是選擇性參數。 當範本中沒有這個屬性時,預設會停用後援路由。

routes

RouteProperties[]

IoT 中樞用來將訊息路由傳送至內建和自定義端點的使用者提供路由規則清單。 付費中樞最多允許 100 個路由規則,最多允許 5 個路由規則供免費中樞使用。

RoutingServiceBusQueueEndpointProperties

與服務總線佇列端點類型相關的屬性。

名稱 類型 Description
authenticationType

authenticationType

用來針對服務總線佇列端點進行驗證的方法

connectionString

string

服務總線佇列端點的 連接字串。

endpointUri

string

服務總線佇列端點的 URL。 它必須包含通訊協定 sb://

entityPath

string

服務總線命名空間上的佇列名稱

id

string

服務總線佇列端點的標識碼

identity

ManagedIdentity

路由服務總線佇列端點的受控識別屬性。

name

string

識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱與實際的佇列名稱不同。

resourceGroup

string

服務總線佇列端點的資源群組名稱。

subscriptionId

string

服務總線佇列端點的訂用帳戶標識碼。

RoutingServiceBusTopicEndpointProperties

與服務總線主題端點類型相關的屬性。

名稱 類型 Description
authenticationType

authenticationType

用來針對服務總線主題端點進行驗證的方法

connectionString

string

服務總線主題端點的 連接字串。

endpointUri

string

服務總線主題端點的 URL。 它必須包含通訊協定 sb://

entityPath

string

服務總線主題上的佇列名稱

id

string

服務總線主題端點的標識碼

identity

ManagedIdentity

路由服務總線主題端點的受控識別屬性。

name

string

識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱與實際主題名稱不同。

resourceGroup

string

服務總線主題端點的資源群組名稱。

subscriptionId

string

服務總線主題端點的訂用帳戶標識碼。

RoutingSource

要套用路由規則的來源,例如 DeviceMessages。

名稱 類型 Description
DeviceConnectionStateEvents

string

DeviceJobLifecycleEvents

string

DeviceLifecycleEvents

string

DeviceMessages

string

Invalid

string

TwinChangeEvents

string

RoutingStorageContainerProperties

與記憶體容器端點相關的屬性。

名稱 類型 Description
authenticationType

authenticationType

用來對記憶體端點進行驗證的方法

batchFrequencyInSeconds

integer

Blob 寫入記憶體的時間間隔。 值應介於 60 到 720 秒之間。 預設值為300秒。

connectionString

string

記憶體帳戶的 連接字串。

containerName

string

記憶體帳戶中的記憶體容器名稱。

encoding enum:
  • Avro
  • AvroDeflate
  • JSON

用來將訊息串行化為 Blob 的編碼方式。 支援的值為 『avro』、『avflate』和 『JSON』。 預設值為 『avro』。

endpointUri

string

記憶體端點的 URL。 它必須包含通訊協定 https://

fileNameFormat

string

Blob 的檔名格式。 默認格式為 {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}。 所有參數都是必要參數,但可以重新排序。

id

string

記憶體容器端點的標識碼

identity

ManagedIdentity

路由記憶體端點的受控識別屬性。

maxChunkSizeInBytes

integer

寫入記憶體之每個 Blob 的最大位元元組數目。 值應介於 10485760 (10MB) 和 524288000 (500 MB) 之間。 預設值為 314572800 (300MB) 。

name

string

識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。

resourceGroup

string

記憶體帳戶的資源群組名稱。

subscriptionId

string

記憶體帳戶的訂用帳戶標識碼。

SharedAccessSignatureAuthorizationRule

IoT 中樞共用存取原則的屬性。

名稱 類型 Description
keyName

string

共用存取原則的名稱。

primaryKey

string

主鍵。

rights

AccessRights

指派給共用存取原則的許可權。

secondaryKey

string

次要金鑰。

StorageEndpointProperties

檔案上傳的 Azure 記憶體端點屬性。

名稱 類型 Description
authenticationType

AuthenticationType

指定用於連線至記憶體帳戶的驗證類型。

connectionString

string

上傳檔案的 Azure 記憶體帳戶 連接字串。

containerName

string

上傳檔案的根容器名稱。 容器不需要存在,但應該使用指定的 connectionString 來建立。

identity

ManagedIdentity

用於檔案上傳之記憶體端點的受控識別屬性。

sasTtlAsIso8601

string

檔案上傳 IoT 中樞 所產生的 SAS URI 有效期間。 請參閱:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string

資源建立的時間戳 (UTC) 。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。