Microsoft.Devices IotHubs

Bicep 資源定義

IotHubs 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Devices/IotHubs 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Devices/IotHubs@2023-06-30' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    name: 'string'
  }
  etag: 'string'
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  properties: {
    allowedFqdnList: [
      'string'
    ]
    authorizationPolicies: [
      {
        keyName: 'string'
        primaryKey: 'string'
        rights: 'string'
        secondaryKey: 'string'
        keyName: 'string'
        primaryKey: 'string'
        rights: 'string'
        secondaryKey: 'string'
      }
    ]
    cloudToDevice: {
      defaultTtlAsIso8601: 'string'
      feedback: {
        lockDurationAsIso8601: 'string'
        maxDeliveryCount: int
        ttlAsIso8601: 'string'
      }
      maxDeliveryCount: int
    }
    comments: 'string'
    disableDeviceSAS: bool
    disableLocalAuth: bool
    disableModuleSAS: bool
    enableDataResidency: bool
    enableFileUploadNotifications: bool
    eventHubEndpoints: {
      {customized property}: {
        partitionCount: int
        retentionTimeInDays: int
      }
    }
    features: 'string'
    ipFilterRules: [
      {
        action: 'string'
        filterName: 'string'
        ipMask: 'string'
      }
    ]
    messagingEndpoints: {
      {customized property}: {
        lockDurationAsIso8601: 'string'
        maxDeliveryCount: int
        ttlAsIso8601: 'string'
      }
    }
    minTlsVersion: 'string'
    networkRuleSets: {
      applyToBuiltInEventHubEndpoint: bool
      defaultAction: 'string'
      ipRules: [
        {
          action: 'Allow'
          filterName: 'string'
          ipMask: 'string'
        }
      ]
    }
    privateEndpointConnections: [
      {
        properties: {
          privateEndpoint: {}
          privateLinkServiceConnectionState: {
            actionsRequired: 'string'
            description: 'string'
            status: 'string'
          }
        }
      }
    ]
    publicNetworkAccess: 'string'
    restrictOutboundNetworkAccess: bool
    routing: {
      endpoints: {
        cosmosDBSqlContainers: [
          {
            authenticationType: 'string'
            containerName: 'string'
            databaseName: 'string'
            endpointUri: 'string'
            identity: {
              userAssignedIdentity: 'string'
            }
            name: 'string'
            partitionKeyName: 'string'
            partitionKeyTemplate: 'string'
            primaryKey: 'string'
            resourceGroup: 'string'
            secondaryKey: 'string'
            subscriptionId: 'string'
          }
        ]
        eventHubs: [
          {
            authenticationType: 'string'
            connectionString: 'string'
            endpointUri: 'string'
            entityPath: 'string'
            id: 'string'
            identity: {
              userAssignedIdentity: 'string'
            }
            name: 'string'
            resourceGroup: 'string'
            subscriptionId: 'string'
          }
        ]
        serviceBusQueues: [
          {
            authenticationType: 'string'
            connectionString: 'string'
            endpointUri: 'string'
            entityPath: 'string'
            id: 'string'
            identity: {
              userAssignedIdentity: 'string'
            }
            name: 'string'
            resourceGroup: 'string'
            subscriptionId: 'string'
          }
        ]
        serviceBusTopics: [
          {
            authenticationType: 'string'
            connectionString: 'string'
            endpointUri: 'string'
            entityPath: 'string'
            id: 'string'
            identity: {
              userAssignedIdentity: 'string'
            }
            name: 'string'
            resourceGroup: 'string'
            subscriptionId: 'string'
          }
        ]
        storageContainers: [
          {
            authenticationType: 'string'
            batchFrequencyInSeconds: int
            connectionString: 'string'
            containerName: 'string'
            encoding: 'string'
            endpointUri: 'string'
            fileNameFormat: 'string'
            id: 'string'
            identity: {
              userAssignedIdentity: 'string'
            }
            maxChunkSizeInBytes: int
            name: 'string'
            resourceGroup: 'string'
            subscriptionId: 'string'
          }
        ]
      }
      enrichments: [
        {
          endpointNames: [
            'string'
          ]
          key: 'string'
          value: 'string'
        }
      ]
      fallbackRoute: {
        condition: 'string'
        endpointNames: [
          'string'
        ]
        isEnabled: bool
        name: 'string'
        source: 'string'
      }
      routes: [
        {
          condition: 'string'
          endpointNames: [
            'string'
          ]
          isEnabled: bool
          name: 'string'
          source: 'string'
        }
      ]
    }
    storageEndpoints: {
      {customized property}: {
        authenticationType: 'string'
        connectionString: 'string'
        containerName: 'string'
        identity: {
          userAssignedIdentity: 'string'
        }
        sasTtlAsIso8601: 'string'
      }
    }
  }
}

屬性值

IotHubs

名稱 描述
NAME 資源名稱 字串 (必要)

字元限制:3-50

合法字元:
英數字元和連字號。

不能以連字號結尾。

資源名稱在 Azure 中必須是唯一的。
location 資源位置。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
sku IotHub SKU 資訊 需要IotHubSkuInfo ()
etag 不需要 Etag 欄位。 如果在回應本文中提供,也必須依一般 ETag 慣例提供它做為標頭。 字串
身分識別 IotHub 的受控識別。 ArmIdentity
properties IotHub 屬性 IotHubProperties

ArmIdentity

名稱 描述
類型 用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned'
userAssignedIdentities {ArmUserIdentity} 的字典 ArmIdentityUserAssignedIdentities

ArmIdentityUserAssignedIdentities

名稱 描述
{自定義屬性} ArmUserIdentity

ArmUserIdentity

此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。

IotHubProperties

名稱 描述
allowedFqdnList 允許的 FQDN 清單 (Iot 中樞輸出的完整域名) 。 string[]
authorizationPolicies 您可以用來保護IoT中樞連線的共用存取原則。 SharedAccessSignatureAuthorizationRule[]
cloudToDevice IoT 中樞雲端到裝置的傳訊屬性。 CloudToDeviceProperties
comments IoT 中樞批注。 字串
disableDeviceSAS 如果為 true,則所有裝置 (包括 Edge 裝置,但不包括) 範圍 SAS 金鑰的模組,都無法用於驗證。 bool
disableLocalAuth 如果為 true,則無法使用具有 Iot 中樞範圍的 SAS 金鑰進行驗證的 SAS 令牌。 bool
disableModuleSAS 如果為 true,則所有模組範圍 SAS 金鑰都無法用於驗證。 bool
enableDataResidency 當設定為 true 時,此屬性會啟用數據落地,因此停用災害復原。 bool
enableFileUploadNotifications 如果為 True,則會啟用檔案上傳通知。 bool
eventHubEndpoints 事件中樞相容的端點屬性。 這個字典的唯一可能索引鍵是事件。 在建立或更新IoT中樞的呼叫時,此索引鍵必須存在於字典中。 IotHubPropertiesEventHubEndpoints
特性 IoT 中樞啟用的功能和功能。 'DeviceManagement'
'None'
ipFilterRules IP 篩選規則。 IpFilterRule[]
messagingEndpoints 檔案上傳通知佇列的傳訊端點屬性。 IotHubPropertiesMessagingEndpoints
minTlsVersion 指定要支援此中樞的最低 TLS 版本。 可以設定為 「1.2」,讓使用低於1.2版 TLS 的用戶端遭到拒絕。 字串
networkRuleSets IotHub 的網路規則集屬性 NetworkRuleSetProperties
privateEndpointConnections 在此IotHub上建立的私人端點連線 PrivateEndpointConnection[]
publicNetworkAccess 是否允許來自公用網路的要求 'Disabled'
'Enabled'
restrictOutboundNetworkAccess 如果為 true,來自 IotHub 的輸出將僅限於透過 allowedFqdnList 設定的允許 FQDN。 bool
路由 IoT 中樞的路由相關屬性。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging RoutingProperties
storageEndpoints 您可以在其中上傳檔案的 Azure 記憶體端點清單。 目前您只能設定一個 Azure 記憶體帳戶,而且必須將其密鑰設定為$default。 指定多個記憶體帳戶會導致擲回錯誤。 當 enableFileUploadNotifications 屬性設定為 True 時,未指定此屬性的值,會導致擲回錯誤。 IotHubPropertiesStorageEndpoints

SharedAccessSignatureAuthorizationRule

名稱 描述
keyName 共用存取原則的名稱。 字串 (必要)
primaryKey 主鍵。 字串
權限 指派給共用存取原則的許可權。 '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' (必要)
secondaryKey 次要金鑰。 字串
keyName 共用存取原則的名稱。 字串 (必要)
primaryKey 主鍵。 字串
權限 指派給共用存取原則的許可權。 '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' (必要)
secondaryKey 次要金鑰。 字串

CloudToDeviceProperties

名稱 描述
defaultTtlAsIso8601 裝置佇列中雲端到裝置訊息的預設存留時間。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串
意見回應 雲端到裝置訊息的意見反應佇列屬性。 FeedbackProperties
maxDeliveryCount 裝置佇列中雲端到裝置訊息的最大傳遞計數。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 int

約束:
最小值 = 1
最大值 = 100

FeedbackProperties

名稱 描述
lockDurationAsIso8601 意見反應佇列的鎖定持續時間。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串
maxDeliveryCount IoT 中樞嘗試在意見反應佇列上傳遞訊息的次數。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 int

約束:
最小值 = 1
最大值 = 100
ttlAsIso8601 訊息在IoT中樞過期之前可供取用的時段。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串

IotHubPropertiesEventHubEndpoints

名稱 描述
{自定義屬性} EventHubProperties

EventHubProperties

名稱 描述
partitionCount 在事件中樞相容端點中接收裝置到雲端訊息的分割區數目。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages。 int
retentionTimeInDays 裝置到雲端訊息的保留時間,以天為單位。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages int

IpFilterRule

名稱 描述
動作 此規則所擷取之要求的所需動作。 'Accept'
必要) ('Reject'
filterName IP 篩選規則的名稱。 字串 (必要)
ipMask 字串,包含規則 CIDR 表示法中的IP位址範圍。 字串 (必要)

IotHubPropertiesMessagingEndpoints

名稱 描述
{自定義屬性} MessagingEndpointProperties

MessagingEndpointProperties

名稱 描述
lockDurationAsIso8601 鎖定持續時間。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 字串
maxDeliveryCount IoT 中樞嘗試傳遞訊息的次數。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 int

約束:
最小值 = 1
最大值 = 100
ttlAsIso8601 訊息在IoT中樞過期之前可供取用的時段。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 字串

NetworkRuleSetProperties

名稱 描述
applyToBuiltInEventHubEndpoint 如果為 True,則網路規則集也會套用至 IotHub 的 BuiltIn EventHub EndPoint bool (必要)
defaultAction 網路規則集的預設動作 'Allow'
'Deny'
ipRules IP 規則清單 NetworkRuleSetIpRule[] (必要)

NetworkRuleSetIpRule

名稱 描述
動作 IP 篩選動作 'Allow'
filterName IP 篩選規則的名稱。 字串 (必要)
ipMask 字串,包含規則 CIDR 表示法中的IP位址範圍。 字串 (必要)

PrivateEndpointConnection

名稱 描述
properties 私人端點連線的屬性 PrivateEndpointConnectionProperties (必要)

PrivateEndpointConnectionProperties

名稱 描述
privateEndpoint 私人端點連線的私人端點屬性 PrivateEndpoint
privateLinkServiceConnectionState 私人端點連線的目前狀態 PrivateLinkServiceConnectionState (必要)

PrivateEndpoint

此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。

PrivateLinkServiceConnectionState

名稱 描述
actionsRequired 私人端點連線所需的動作 字串
description 私人端點連線目前狀態的描述 字串 (必要)
status 私人端點連線的狀態 「已核准」
'Disconnected'
'Pending'
必要) 「已拒絕」 (

RoutingProperties

名稱 描述
端點 與IoT中樞根據路由規則路由訊息的自定義端點相關的屬性。 在付費中樞的所有端點類型中,最多允許 10 個自定義端點,而且免費中樞在所有端點類型中只允許 1 個自定義端點。 RoutingEndpoints
擴充 IoT 中樞套用至要傳遞至內建和自定義端點的訊息的使用者提供擴充清單。 請參閱:https://aka.ms/telemetryoneventgrid EnrichmentProperties[]
fallbackRoute 當符合 『routes』 區段中未指定任何條件時,用來做為後援路由的路由屬性。 這是選擇性參數。 當範本中沒有這個屬性時,預設會停用後援路由。 FallbackRouteProperties
路由 IoT 中樞用來將訊息路由傳送至內建和自定義端點的使用者提供路由規則清單。 付費中樞最多允許 100 個路由規則,最多允許 5 個路由規則供免費中樞使用。 RouteProperties[]

RoutingEndpoints

名稱 描述
cosmosDBSqlContainers IoT 中樞根據路由規則將訊息路由傳送至的Cosmos DB容器端點清單。 RoutingCosmosDBSqlApiProperties[]
eventHubs IoT 中樞根據路由規則將訊息路由傳送至的事件中樞端點清單。 此清單不包含內建事件中樞端點。 RoutingEventHubProperties[]
serviceBusQueues IoT 中樞根據路由規則將訊息路由傳送至的服務總線佇列端點清單。 RoutingServiceBusQueueEndpointProperties[]
serviceBusTopics IoT 中樞根據路由規則將訊息路由傳送至的服務總線主題端點清單。 RoutingServiceBusTopicEndpointProperties[]
storageContainers IoT 中樞根據路由規則將訊息路由傳送至的記憶體容器端點清單。 RoutingStorageContainerProperties[]

RoutingCosmosDBSqlApiProperties

名稱 描述
authenticationType 用來對cosmos DB sql容器端點進行驗證的方法 'identityBased'
'keyBased'
containerName cosmos DB 資料庫中 cosmos DB sql 容器的名稱。 字串 (必要)
databaseName cosmos DB 帳戶中 cosmos DB 資料庫的名稱。 字串 (必要)
endpointUri cosmos DB 帳戶的 URL。 它必須包含通訊協定 https:// 字串 (必要)
身分識別 路由cosmos DB容器端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
partitionKeyName 如果有的話,與這個 cosmos DB sql 容器相關聯的分割區索引鍵名稱。 這是選擇性參數。 字串
partitionKeyTemplate 用來產生綜合分割區索引鍵值的範本,以搭配這個 cosmos DB sql 容器使用。 範本至少必須包含下列其中一個佔位元:{iothub}、{deviceid}、{DD}、{MM}和 {YYYY}。 任何一個佔位元最多可以指定一次,但順序和非佔位符元件是任意的。 只有在指定 PartitionKeyName 時,才需要此參數。 字串
primaryKey cosmos DB 帳戶的主鍵。 字串

約束:
敏感性值。 以安全參數的形式傳入。
resourceGroup cosmos DB 帳戶的資源群組名稱。 字串
secondaryKey cosmos DB 帳戶的次要密鑰。 字串

約束:
敏感性值。 以安全參數的形式傳入。
subscriptionId cosmos DB 帳戶的訂用帳戶標識碼。 字串

ManagedIdentity

名稱 描述
userAssignedIdentity 使用者指派的身分識別。 字串

RoutingEventHubProperties

名稱 描述
authenticationType 用來對事件中樞端點進行驗證的方法 'identityBased'
'keyBased'
connectionString 事件中樞端點的 連接字串。 字串
endpointUri 事件中樞端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 事件中樞命名空間上的事件中樞名稱 字串
id 事件中樞端點的標識碼 字串
身分識別 路由事件中樞端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 事件中樞端點的資源群組名稱。 字串
subscriptionId 事件中樞端點的訂用帳戶標識碼。 字串

RoutingServiceBusQueueEndpointProperties

名稱 描述
authenticationType 用來對服務總線佇列端點進行驗證的方法 'identityBased'
'keyBased'
connectionString 服務總線佇列端點 連接字串。 字串
endpointUri 服務總線佇列端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 服務總線命名空間上的佇列名稱 字串
id 服務總線佇列端點的標識碼 字串
身分識別 路由服務總線佇列端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱不一定與實際的佇列名稱相同。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 服務總線佇列端點的資源群組名稱。 字串
subscriptionId 服務總線佇列端點的訂用帳戶標識碼。 字串

RoutingServiceBusTopicEndpointProperties

名稱 描述
authenticationType 用來對服務總線主題端點進行驗證的方法 'identityBased'
'keyBased'
connectionString 服務總線主題端點 連接字串。 字串
endpointUri 服務總線主題端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 服務總線主題上的佇列名稱 字串
id 服務總線主題端點的標識碼 字串
身分識別 路由服務總線主題端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱不一定與實際主題名稱相同。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 服務總線主題端點的資源群組名稱。 字串
subscriptionId 服務總線主題端點的訂用帳戶標識碼。 字串

RoutingStorageContainerProperties

名稱 描述
authenticationType 用來對記憶體端點進行驗證的方法 'identityBased'
'keyBased'
batchFrequencyInSeconds Blob 寫入記憶體的時間間隔。 值應該介於 60 到 720 秒之間。 預設值為300秒。 int

約束:
最小值 = 60
最大值 = 720
connectionString 記憶體帳戶 連接字串。 字串
containerName 記憶體帳戶中的記憶體容器名稱。 需要字串 ()
編碼 用來將訊息串行化為 Blob 的編碼方式。 支援的值為 'avro'、'avflate' 和 'JSON'。 預設值為 『avro』。 'Avro'
'AvroDflate'
'JSON'
endpointUri 記憶體端點的 URL。 它必須包含通訊協定 https:// 字串
fileNameFormat Blob 的檔名格式。 默認格式為 {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}。 所有參數都是必要參數,但可以重新排序。 字串
id 記憶體容器端點的標識碼 字串
身分識別 路由記憶體端點的受控識別屬性。 ManagedIdentity
maxChunkSizeInBytes 寫入記憶體之每個 Blob 的最大位元元組數目。 值應該介於 10485760 (10MB) 和 524288000 (500 MB) 之間。 預設值為 314572800 (300MB) 。 int

約束:
最小值 = 10485760
最大值 = 524288000
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 記憶體帳戶的資源群組名稱。 字串
subscriptionId 記憶體帳戶的訂用帳戶標識碼。 字串

EnrichmentProperties

名稱 描述
endpointNames 擴充套用至訊息的端點清單。 string[] (必要)

約束:
最小長度 = 1
索引鍵 擴充屬性的索引鍵或名稱。 需要字串 ()
擴充屬性的值。 需要字串 ()

FallbackRouteProperties

名稱 描述
condition (條件) 要套用後援路由的條件。 如果未提供條件,則預設會評估為 true。 如需文法,請參閱:/azure/iot-hub/iot-hub-devguide-query-language 字串
endpointNames 符合條件的訊息會路由傳送至的端點清單。 目前只允許 1 個端點。 string[] (必要)

約束:
最小長度 = 1
最大長度 = 1
isEnabled 用來指定是否啟用後援路由。 bool (必要)
NAME 路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,而且必須是唯一的。 字串
source 要套用路由規則的來源。 例如,DeviceMessages 'DeviceConnectionStateEvents'
'DeviceJobLifecycleEvents'
'DeviceLifecycleEvents'
'DeviceMessages'
'Invalid'
'TwinChangeEvents' (必要)

RouteProperties

名稱 描述
condition (條件) 評估為套用路由規則的條件。 如果未提供任何條件,預設會評估為 true。 如需文法,請參閱:/azure/iot-hub/iot-hub-devguide-query-language 字串
endpointNames 路由傳送滿足條件之訊息的端點清單。 目前只允許一個端點。 string[] (必要)

約束:
最小長度 = 1
最大長度 = 1
isEnabled 用來指定是否啟用路由。 bool (必要)
NAME 路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,且必須是唯一的。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
來源 要套用路由規則的來源,例如 DeviceMessages。 'DeviceConnectionStateEvents'
'DeviceJobLifecycleEvents'
'DeviceLifecycleEvents'
'DeviceMessages'
'Invalid'
'TwinChangeEvents' (必要)

IotHubPropertiesStorageEndpoints

名稱 描述
{自定義屬性} StorageEndpointProperties

StorageEndpointProperties

名稱 描述
authenticationType 指定用於連線至記憶體帳戶的驗證類型。 'identityBased'
'keyBased'
connectionString 上傳檔案的 Azure 記憶體帳戶 連接字串。 字串 (必要)
containerName 上傳檔案的根容器名稱。 容器不需要存在,但應該使用指定的 connectionString 來建立。 字串 (必要)
身分識別 用於檔案上傳之記憶體端點的受控識別屬性。 ManagedIdentity
sasTtlAsIso8601 檔案上傳 IoT 中樞 所產生的 SAS URI 有效期間。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options。 字串

IotHubSkuInfo

名稱 描述
處理能力 已布建 IoT 中樞 單位的數目。 請參閱:/azure/azure-subscription-service-limits#iot-hub-limits。 int
NAME SKU 的名稱。 'B1'
'B2'
'B3'
'F1'
'S1'
'S2'
'S3' (必要)

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 IOT 中樞和 Ubuntu 邊緣模擬器

部署至 Azure
此範本會建立 IOT 中樞和虛擬機 Ubuntu 邊緣模擬器。
使用 ARM 範本建立 IoT 中樞、路由和檢視訊息

部署至 Azure
使用此範本來部署 IoT 中樞 和記憶體帳戶。 執行應用程式以將訊息傳送至路由傳送至記憶體的中樞,然後檢視結果。
建立 IoT 中樞 裝置布建服務

部署至 Azure
此範本可讓您建立IoT中樞和 IoT 中樞裝置布建服務,並將這兩個服務連結在一起。
建立 IoT 中樞和裝置到雲端取用者群組

部署至 Azure
此範本可讓您將具有裝置的 IoT 中樞 實例部署到雲端和雲端到裝置傳訊組態,並將裝置部署到雲端取用者群組。
為 IoT 中樞 帳戶、實例、IoT 中樞 建立裝置更新

部署至 Azure
此範本會建立帳戶,以及用來鏈接實例的實例和中樞。 它會使用必要的存取原則、路由和取用者群組來設定中樞。
部署 MedTech 服務,包括 Azure IoT 中樞

部署至 Azure
MedTech 服務是其中一個 Azure Health Data Services,其設計目的是要從多個裝置內嵌裝置數據、將裝置數據轉換成 FHIR 觀察,然後保存在 Azure Health Data Services FHIR 服務中。
使用 IoT 中樞 建立隨用隨付 (PAYG) 環境

部署至 Azure
此範本可讓您部署隨用隨付 (PAYG) 時間序列深入解析環境,其設定為取用來自 IoT 中樞 的事件。

ARM 範本資源定義

IotHubs 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Devices/IotHubs 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Devices/IotHubs",
  "apiVersion": "2023-06-30",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "capacity": "int",
    "name": "string"
  },
  "etag": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {}
    }
  },
  "properties": {
    "allowedFqdnList": [ "string" ],
    "authorizationPolicies": [
      {
        "keyName": "string",
        "primaryKey": "string",
        "rights": "string",
        "secondaryKey": "string",
        "keyName": "string",
        "primaryKey": "string",
        "rights": "string",
        "secondaryKey": "string"
      }
    ],
    "cloudToDevice": {
      "defaultTtlAsIso8601": "string",
      "feedback": {
        "lockDurationAsIso8601": "string",
        "maxDeliveryCount": "int",
        "ttlAsIso8601": "string"
      },
      "maxDeliveryCount": "int"
    },
    "comments": "string",
    "disableDeviceSAS": "bool",
    "disableLocalAuth": "bool",
    "disableModuleSAS": "bool",
    "enableDataResidency": "bool",
    "enableFileUploadNotifications": "bool",
    "eventHubEndpoints": {
      "{customized property}": {
        "partitionCount": "int",
        "retentionTimeInDays": "int"
      }
    },
    "features": "string",
    "ipFilterRules": [
      {
        "action": "string",
        "filterName": "string",
        "ipMask": "string"
      }
    ],
    "messagingEndpoints": {
      "{customized property}": {
        "lockDurationAsIso8601": "string",
        "maxDeliveryCount": "int",
        "ttlAsIso8601": "string"
      }
    },
    "minTlsVersion": "string",
    "networkRuleSets": {
      "applyToBuiltInEventHubEndpoint": "bool",
      "defaultAction": "string",
      "ipRules": [
        {
          "action": "Allow",
          "filterName": "string",
          "ipMask": "string"
        }
      ]
    },
    "privateEndpointConnections": [
      {
        "properties": {
          "privateEndpoint": {},
          "privateLinkServiceConnectionState": {
            "actionsRequired": "string",
            "description": "string",
            "status": "string"
          }
        }
      }
    ],
    "publicNetworkAccess": "string",
    "restrictOutboundNetworkAccess": "bool",
    "routing": {
      "endpoints": {
        "cosmosDBSqlContainers": [
          {
            "authenticationType": "string",
            "containerName": "string",
            "databaseName": "string",
            "endpointUri": "string",
            "identity": {
              "userAssignedIdentity": "string"
            },
            "name": "string",
            "partitionKeyName": "string",
            "partitionKeyTemplate": "string",
            "primaryKey": "string",
            "resourceGroup": "string",
            "secondaryKey": "string",
            "subscriptionId": "string"
          }
        ],
        "eventHubs": [
          {
            "authenticationType": "string",
            "connectionString": "string",
            "endpointUri": "string",
            "entityPath": "string",
            "id": "string",
            "identity": {
              "userAssignedIdentity": "string"
            },
            "name": "string",
            "resourceGroup": "string",
            "subscriptionId": "string"
          }
        ],
        "serviceBusQueues": [
          {
            "authenticationType": "string",
            "connectionString": "string",
            "endpointUri": "string",
            "entityPath": "string",
            "id": "string",
            "identity": {
              "userAssignedIdentity": "string"
            },
            "name": "string",
            "resourceGroup": "string",
            "subscriptionId": "string"
          }
        ],
        "serviceBusTopics": [
          {
            "authenticationType": "string",
            "connectionString": "string",
            "endpointUri": "string",
            "entityPath": "string",
            "id": "string",
            "identity": {
              "userAssignedIdentity": "string"
            },
            "name": "string",
            "resourceGroup": "string",
            "subscriptionId": "string"
          }
        ],
        "storageContainers": [
          {
            "authenticationType": "string",
            "batchFrequencyInSeconds": "int",
            "connectionString": "string",
            "containerName": "string",
            "encoding": "string",
            "endpointUri": "string",
            "fileNameFormat": "string",
            "id": "string",
            "identity": {
              "userAssignedIdentity": "string"
            },
            "maxChunkSizeInBytes": "int",
            "name": "string",
            "resourceGroup": "string",
            "subscriptionId": "string"
          }
        ]
      },
      "enrichments": [
        {
          "endpointNames": [ "string" ],
          "key": "string",
          "value": "string"
        }
      ],
      "fallbackRoute": {
        "condition": "string",
        "endpointNames": [ "string" ],
        "isEnabled": "bool",
        "name": "string",
        "source": "string"
      },
      "routes": [
        {
          "condition": "string",
          "endpointNames": [ "string" ],
          "isEnabled": "bool",
          "name": "string",
          "source": "string"
        }
      ]
    },
    "storageEndpoints": {
      "{customized property}": {
        "authenticationType": "string",
        "connectionString": "string",
        "containerName": "string",
        "identity": {
          "userAssignedIdentity": "string"
        },
        "sasTtlAsIso8601": "string"
      }
    }
  }
}

屬性值

IotHubs

名稱 描述
類型 資源類型 'Microsoft.Devices/IotHubs'
apiVersion 資源 API 版本 '2023-06-30'
NAME 資源名稱 字串 (必要)

字元限制:3-50

合法字元:
英數字元和連字號。

不能以連字號結尾。

資源名稱在 Azure 中必須是唯一的。
location 資源位置。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
sku IotHub SKU 資訊 需要IotHubSkuInfo ()
etag 不需要 Etag 欄位。 如果在回應本文中提供,也必須依一般 ETag 慣例提供它做為標頭。 字串
身分識別 IotHub 的受控識別。 ArmIdentity
properties IotHub 屬性 IotHubProperties

ArmIdentity

名稱 描述
類型 用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned'
userAssignedIdentities {ArmUserIdentity} 的字典 ArmIdentityUserAssignedIdentities

ArmIdentityUserAssignedIdentities

名稱 描述
{自定義屬性} ArmUserIdentity

ArmUserIdentity

此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。

IotHubProperties

名稱 描述
allowedFqdnList 允許的 FQDN 清單 (Iot 中樞輸出的完整域名) 。 string[]
authorizationPolicies 您可以用來保護IoT中樞連線的共用存取原則。 SharedAccessSignatureAuthorizationRule[]
cloudToDevice IoT 中樞雲端到裝置的傳訊屬性。 CloudToDeviceProperties
comments IoT 中樞批注。 字串
disableDeviceSAS 如果為 true,則所有裝置 (包括 Edge 裝置,但不包括) 範圍 SAS 金鑰的模組,都無法用於驗證。 bool
disableLocalAuth 如果為 true,則無法使用具有 Iot 中樞範圍的 SAS 金鑰進行驗證的 SAS 令牌。 bool
disableModuleSAS 如果為 true,則所有模組範圍 SAS 金鑰都無法用於驗證。 bool
enableDataResidency 當設定為 true 時,此屬性會啟用數據落地,因此停用災害復原。 bool
enableFileUploadNotifications 如果為 True,則會啟用檔案上傳通知。 bool
eventHubEndpoints 事件中樞相容的端點屬性。 這個字典的唯一可能索引鍵是事件。 在建立或更新IoT中樞的呼叫時,此金鑰必須存在於字典中。 IotHubPropertiesEventHubEndpoints
特性 為IoT中樞啟用的功能和功能。 'DeviceManagement'
'None'
ipFilterRules IP 篩選規則。 IpFilterRule[]
messagingEndpoints 檔案上傳通知佇列的傳訊端點屬性。 IotHubPropertiesMessagingEndpoints
minTlsVersion 指定要支援此中樞的最低 TLS 版本。 可以設定為 「1.2」 ,讓使用低於 1.2 的 TLS 版本的用戶端遭到拒絕。 字串
networkRuleSets IotHub 的網路規則集屬性 NetworkRuleSetProperties
privateEndpointConnections 在此IotHub上建立的私人端點連線 PrivateEndpointConnection[]
publicNetworkAccess 是否允許來自公用網路的要求 'Disabled'
'Enabled'
restrictOutboundNetworkAccess 如果為 true,則來自 IotHub 的輸出將限製為僅透過 allowedFqdnList 設定的允許 FQDN。 bool
路由 IoT 中樞的路由相關屬性。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging RoutingProperties
storageEndpoints 您可以在其中上傳檔案的 Azure 記憶體端點清單。 目前您只能設定一個 Azure 記憶體帳戶,而且必須將其密鑰設定為$default。 指定多個記憶體帳戶會導致擲回錯誤。 當 enableFileUploadNotifications 屬性設定為 True 時,未指定這個屬性的值,會導致擲回錯誤。 IotHubPropertiesStorageEndpoints

SharedAccessSignatureAuthorizationRule

名稱 描述
keyName 共用存取原則的名稱。 需要字串 ()
primaryKey 主鍵。 字串
權限 指派給共用存取原則的許可權。 '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' (必要)
secondaryKey 次要金鑰。 字串
keyName 共用存取原則的名稱。 需要字串 ()
primaryKey 主鍵。 字串
權限 指派給共用存取原則的許可權。 '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' (必要)
secondaryKey 次要金鑰。 字串

CloudToDeviceProperties

名稱 描述
defaultTtlAsIso8601 裝置佇列中雲端到裝置訊息的預設存留時間。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串
意見回應 雲端到裝置訊息的意見反應佇列屬性。 FeedbackProperties
maxDeliveryCount 裝置佇列中雲端到裝置訊息的最大傳遞計數。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 int

約束:
最小值 = 1
最大值 = 100

FeedbackProperties

名稱 描述
lockDurationAsIso8601 意見反應佇列的鎖定持續時間。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串
maxDeliveryCount IoT 中樞嘗試在意見反應佇列上傳遞訊息的次數。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 int

約束:
最小值 = 1
最大值 = 100
ttlAsIso8601 訊息在IoT中樞過期之前可供取用的時段。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串

IotHubPropertiesEventHubEndpoints

名稱 描述
{自定義屬性} EventHubProperties

EventHubProperties

名稱 描述
partitionCount 在事件中樞相容端點中接收裝置到雲端訊息的分割區數目。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages。 int
retentionTimeInDays 裝置到雲端訊息的保留時間,以天為單位。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages int

IpFilterRule

名稱 描述
動作 此規則所擷取之要求的所需動作。 'Accept'
必要) ('Reject'
filterName IP 篩選規則的名稱。 字串 (必要)
ipMask 字串,包含規則 CIDR 表示法中的IP位址範圍。 字串 (必要)

IotHubPropertiesMessagingEndpoints

名稱 描述
{自定義屬性} MessagingEndpointProperties

MessagingEndpointProperties

名稱 描述
lockDurationAsIso8601 鎖定持續時間。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 字串
maxDeliveryCount IoT 中樞嘗試傳遞訊息的次數。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 int

約束:
最小值 = 1
最大值 = 100
ttlAsIso8601 訊息在IoT中樞過期之前可供取用的時段。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 字串

NetworkRuleSetProperties

名稱 描述
applyToBuiltInEventHubEndpoint 如果為 True,則網路規則集也會套用至 IotHub 的 BuiltIn EventHub EndPoint bool (必要)
defaultAction 網路規則集的預設動作 'Allow'
'Deny'
ipRules IP 規則清單 NetworkRuleSetIpRule[] (必要)

NetworkRuleSetIpRule

名稱 描述
動作 IP 篩選動作 'Allow'
filterName IP 篩選規則的名稱。 需要字串 ()
ipMask 字串,包含規則 CIDR 表示法中的IP位址範圍。 需要字串 ()

PrivateEndpointConnection

名稱 描述
properties 私人端點連線的屬性 PrivateEndpointConnectionProperties (必要)

PrivateEndpointConnectionProperties

名稱 描述
privateEndpoint 私人端點連線的私人端點屬性 PrivateEndpoint
privateLinkServiceConnectionState 私人端點連線的目前狀態 PrivateLinkServiceConnectionState (必要)

PrivateEndpoint

此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。

PrivateLinkServiceConnectionState

名稱 描述
actionsRequired 私人端點連線所需的動作 字串
description 私人端點連線目前狀態的描述 需要字串 ()
status 私人端點連線的狀態 'Approved'
'Disconnected'
'Pending'
必要) 「已拒絕」 (

RoutingProperties

名稱 描述
端點 與IoT中樞根據路由規則路由訊息的自定義端點相關的屬性。 付費中樞的所有端點類型最多允許10個自定義端點,且免費中樞的所有端點類型只允許1個自定義端點。 RoutingEndpoints
擴充 IoT 中樞套用至要傳遞至內建和自定義端點的訊息的使用者提供擴充清單。 請參閱:https://aka.ms/telemetryoneventgrid EnrichmentProperties[]
fallbackRoute 當不符合 『routes』 區段中指定的任何條件時,用來做為後援路由的路由屬性。 這是選擇性參數。 當範本中沒有這個屬性時,預設會停用後援路由。 FallbackRouteProperties
路由 IoT 中樞用來將訊息路由傳送至內建和自定義端點的使用者提供路由規則清單。 付費中樞最多允許 100 個路由規則,免費中樞最多允許 5 個路由規則。 RouteProperties[]

RoutingEndpoints

名稱 描述
cosmosDBSqlContainers IoT 中樞根據路由規則將訊息路由傳送至的Cosmos DB容器端點清單。 RoutingCosmosDBSqlApiProperties[]
eventHubs IoT 中樞根據路由規則,將訊息路由傳送至的事件中樞端點清單。 此清單不包含內建事件中樞端點。 RoutingEventHubProperties[]
serviceBusQueues IoT 中樞根據路由規則將訊息路由傳送至的服務總線佇列端點清單。 RoutingServiceBusQueueEndpointProperties[]
serviceBusTopics IoT 中樞根據路由規則將訊息路由傳送至的服務總線主題端點清單。 RoutingServiceBusTopicEndpointProperties[]
storageContainers IoT 中樞根據路由規則,將訊息路由傳送至的記憶體容器端點清單。 RoutingStorageContainerProperties[]

RoutingCosmosDBSqlApiProperties

名稱 描述
authenticationType 用來對cosmos DB sql容器端點進行驗證的方法 'identityBased'
'keyBased'
containerName cosmos DB 資料庫中 cosmos DB sql 容器的名稱。 字串 (必要)
databaseName cosmos DB 帳戶中 cosmos DB 資料庫的名稱。 字串 (必要)
endpointUri cosmos DB 帳戶的 URL。 它必須包含通訊協定 https:// 字串 (必要)
身分識別 路由cosmos DB容器端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
partitionKeyName 如果有的話,與這個 cosmos DB sql 容器相關聯的分割區索引鍵名稱。 這是選擇性參數。 字串
partitionKeyTemplate 用來產生綜合分割區索引鍵值的範本,以搭配這個 cosmos DB sql 容器使用。 範本至少必須包含下列其中一個佔位元:{iothub}、{deviceid}、{DD}、{MM}和 {YYYY}。 任何一個佔位元最多可以指定一次,但順序和非佔位符元件是任意的。 只有在指定 PartitionKeyName 時,才需要此參數。 字串
primaryKey cosmos DB 帳戶的主鍵。 字串

約束:
敏感性值。 以安全參數的形式傳入。
resourceGroup cosmos DB 帳戶的資源群組名稱。 字串
secondaryKey cosmos DB 帳戶的次要密鑰。 字串

約束:
敏感性值。 以安全參數的形式傳入。
subscriptionId cosmos DB 帳戶的訂用帳戶標識碼。 字串

ManagedIdentity

名稱 描述
userAssignedIdentity 使用者指派的身分識別。 字串

RoutingEventHubProperties

名稱 描述
authenticationType 用來對事件中樞端點進行驗證的方法 'identityBased'
'keyBased'
connectionString 事件中樞端點的 連接字串。 字串
endpointUri 事件中樞端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 事件中樞命名空間上的事件中樞名稱 字串
id 事件中樞端點的標識碼 字串
身分識別 路由事件中樞端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 事件中樞端點的資源群組名稱。 字串
subscriptionId 事件中樞端點的訂用帳戶標識碼。 字串

RoutingServiceBusQueueEndpointProperties

名稱 描述
authenticationType 用來對服務總線佇列端點進行驗證的方法 'identityBased'
'keyBased'
connectionString 服務總線佇列端點的 連接字串。 字串
endpointUri 服務總線佇列端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 服務總線命名空間上的佇列名稱 字串
id 服務總線佇列端點的標識碼 字串
身分識別 路由服務總線佇列端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱不一定與實際的佇列名稱相同。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 服務總線佇列端點的資源群組名稱。 字串
subscriptionId 服務總線佇列端點的訂用帳戶標識碼。 字串

RoutingServiceBusTopicEndpointProperties

名稱 描述
authenticationType 用來對服務總線主題端點進行驗證的方法 'identityBased'
'keyBased'
connectionString 服務總線主題端點 連接字串。 字串
endpointUri 服務總線主題端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 服務總線主題上的佇列名稱 字串
id 服務總線主題端點的標識碼 字串
身分識別 路由服務總線主題端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱不一定與實際主題名稱相同。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 服務總線主題端點的資源群組名稱。 字串
subscriptionId 服務總線主題端點的訂用帳戶標識碼。 字串

RoutingStorageContainerProperties

名稱 描述
authenticationType 用來對記憶體端點進行驗證的方法 'identityBased'
'keyBased'
batchFrequencyInSeconds Blob 寫入記憶體的時間間隔。 值應該介於 60 到 720 秒之間。 預設值為300秒。 int

約束:
最小值 = 60
最大值 = 720
connectionString 記憶體帳戶的 連接字串。 字串
containerName 記憶體帳戶中的記憶體容器名稱。 需要字串 ()
編碼 用來將訊息串行化為 Blob 的編碼方式。 支援的值為 'avro'、'avflate' 和 'JSON'。 預設值為 『avro』。 'Avro'
'AvroDflate'
'JSON'
endpointUri 記憶體端點的 URL。 它必須包含通訊協定 https:// 字串
fileNameFormat Blob 的檔名格式。 默認格式為 {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}。 所有參數都是必要參數,但可以重新排序。 字串
id 記憶體容器端點的標識碼 字串
身分識別 路由記憶體端點的受控識別屬性。 ManagedIdentity
maxChunkSizeInBytes 寫入記憶體之每個 Blob 的最大位元元組數目。 值應該介於 10485760 (10MB) 和 524288000 (500 MB) 之間。 預設值為 314572800 (300MB) 。 int

約束:
最小值 = 10485760
最大值 = 524288000
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 記憶體帳戶的資源群組名稱。 字串
subscriptionId 記憶體帳戶的訂用帳戶標識碼。 字串

EnrichmentProperties

名稱 描述
endpointNames 擴充套用至訊息的端點清單。 string[] (必要)

約束:
最小長度 = 1
索引鍵 擴充屬性的索引鍵或名稱。 需要字串 ()
擴充屬性的值。 需要字串 ()

FallbackRouteProperties

名稱 描述
condition (條件) 要套用後援路由的條件。 如果未提供條件,則預設會評估為 true。 如需文法,請參閱:/azure/iot-hub/iot-hub-devguide-query-language 字串
endpointNames 符合條件的訊息會路由傳送至的端點清單。 目前只允許 1 個端點。 string[] (必要)

約束:
最小長度 = 1
最大長度 = 1
isEnabled 用來指定是否啟用後援路由。 bool (必要)
NAME 路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,而且必須是唯一的。 字串
source 要套用路由規則的來源。 例如,DeviceMessages 'DeviceConnectionStateEvents'
'DeviceJobLifecycleEvents'
'DeviceLifecycleEvents'
'DeviceMessages'
'Invalid'
'TwinChangeEvents' (必要)

RouteProperties

名稱 描述
condition (條件) 評估為套用路由規則的條件。 如果未提供任何條件,則預設會評估為 true。 如需文法,請參閱:/azure/iot-hub/iot-hub-devguide-query-language 字串
endpointNames 路由傳送符合條件之訊息的端點清單。 目前只允許一個端點。 string[] (必要)

約束:
最小長度 = 1
最大長度 = 1
isEnabled 用來指定是否啟用路由。 bool (必要)
NAME 路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,而且必須是唯一的。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
來源 路由規則要套用到的來源,例如 DeviceMessages。 'DeviceConnectionStateEvents'
'DeviceJobLifecycleEvents'
'DeviceLifecycleEvents'
'DeviceMessages'
'Invalid'
'TwinChangeEvents' (必要)

IotHubPropertiesStorageEndpoints

名稱 描述
{自定義屬性} StorageEndpointProperties

StorageEndpointProperties

名稱 描述
authenticationType 指定用於連線到記憶體帳戶的驗證類型。 'identityBased'
'keyBased'
connectionString 上傳檔案的 Azure 記憶體帳戶 連接字串。 需要字串 ()
containerName 上傳檔案的根容器名稱。 容器不需要存在,但應該使用指定的 connectionString 來建立。 需要字串 ()
身分識別 檔案上傳之記憶體端點的受控識別屬性。 ManagedIdentity
sasTtlAsIso8601 檔案上傳 IoT 中樞 所產生的 SAS URI 有效期間。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options。 字串

IotHubSkuInfo

名稱 描述
處理能力 布建的 IoT 中樞 單位數目。 請參閱:/azure/azure-subscription-service-limits#iot-hub-limits。 int
NAME SKU 的名稱。 'B1'
'B2'
'B3'
'F1'
'S1'
'S2'
需要 『S3』 ()

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 IOT 中樞和 Ubuntu 邊緣模擬器

部署至 Azure
此範本會建立 IOT 中樞和虛擬機 Ubuntu 邊緣模擬器。
使用 ARM 範本建立 IoT 中樞、路由和檢視訊息

部署至 Azure
使用此範本來部署 IoT 中樞 和記憶體帳戶。 執行應用程式以將訊息傳送至路由傳送至記憶體的中樞,然後檢視結果。
建立 IoT 中樞 裝置布建服務

部署至 Azure
此範本可讓您建立IoT中樞和 IoT 中樞裝置布建服務,並將這兩個服務連結在一起。
建立 IoT 中樞和裝置到雲端取用者群組

部署至 Azure
此範本可讓您將具有裝置的 IoT 中樞 實例部署到雲端,以及將裝置部署到雲端傳訊設定,以及將裝置部署到雲端取用者群組。
為 IoT 中樞 帳戶、實例、IoT 中樞 建立裝置更新

部署至 Azure
此範本會建立帳戶,以及用來鏈接實例的實例和中樞。 它會使用必要的存取原則、路由和取用者群組來設定中樞。
部署 MedTech 服務,包括 Azure IoT 中樞

部署至 Azure
MedTech 服務是一項 Azure Health Data Services,其設計目的是要從多個裝置內嵌裝置數據、將裝置數據轉換成 FHIR 觀察,然後保存在 Azure Health Data Services FHIR 服務中。
使用 IoT 中樞 建立隨用隨付 (PAYG) 環境

部署至 Azure
此範本可讓您部署 Pay As You Go (PAYG) Time Series Insights 環境,其設定為取用 IoT 中樞 的事件。

Terraform (AzAPI 提供者) 資源定義

您可以使用目標作業來部署 IotHubs 資源類型:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Devices/IotHubs 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Devices/IotHubs@2023-06-30"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      allowedFqdnList = [
        "string"
      ]
      authorizationPolicies = [
        {
          keyName = "string"
          primaryKey = "string"
          rights = "string"
          secondaryKey = "string"
          keyName = "string"
          primaryKey = "string"
          rights = "string"
          secondaryKey = "string"
        }
      ]
      cloudToDevice = {
        defaultTtlAsIso8601 = "string"
        feedback = {
          lockDurationAsIso8601 = "string"
          maxDeliveryCount = int
          ttlAsIso8601 = "string"
        }
        maxDeliveryCount = int
      }
      comments = "string"
      disableDeviceSAS = bool
      disableLocalAuth = bool
      disableModuleSAS = bool
      enableDataResidency = bool
      enableFileUploadNotifications = bool
      eventHubEndpoints = {
        {customized property} = {
          partitionCount = int
          retentionTimeInDays = int
        }
      }
      features = "string"
      ipFilterRules = [
        {
          action = "string"
          filterName = "string"
          ipMask = "string"
        }
      ]
      messagingEndpoints = {
        {customized property} = {
          lockDurationAsIso8601 = "string"
          maxDeliveryCount = int
          ttlAsIso8601 = "string"
        }
      }
      minTlsVersion = "string"
      networkRuleSets = {
        applyToBuiltInEventHubEndpoint = bool
        defaultAction = "string"
        ipRules = [
          {
            action = "Allow"
            filterName = "string"
            ipMask = "string"
          }
        ]
      }
      privateEndpointConnections = [
        {
          properties = {
            privateEndpoint = {}
            privateLinkServiceConnectionState = {
              actionsRequired = "string"
              description = "string"
              status = "string"
            }
          }
        }
      ]
      publicNetworkAccess = "string"
      restrictOutboundNetworkAccess = bool
      routing = {
        endpoints = {
          cosmosDBSqlContainers = [
            {
              authenticationType = "string"
              containerName = "string"
              databaseName = "string"
              endpointUri = "string"
              identity = {
                userAssignedIdentity = "string"
              }
              name = "string"
              partitionKeyName = "string"
              partitionKeyTemplate = "string"
              primaryKey = "string"
              resourceGroup = "string"
              secondaryKey = "string"
              subscriptionId = "string"
            }
          ]
          eventHubs = [
            {
              authenticationType = "string"
              connectionString = "string"
              endpointUri = "string"
              entityPath = "string"
              id = "string"
              identity = {
                userAssignedIdentity = "string"
              }
              name = "string"
              resourceGroup = "string"
              subscriptionId = "string"
            }
          ]
          serviceBusQueues = [
            {
              authenticationType = "string"
              connectionString = "string"
              endpointUri = "string"
              entityPath = "string"
              id = "string"
              identity = {
                userAssignedIdentity = "string"
              }
              name = "string"
              resourceGroup = "string"
              subscriptionId = "string"
            }
          ]
          serviceBusTopics = [
            {
              authenticationType = "string"
              connectionString = "string"
              endpointUri = "string"
              entityPath = "string"
              id = "string"
              identity = {
                userAssignedIdentity = "string"
              }
              name = "string"
              resourceGroup = "string"
              subscriptionId = "string"
            }
          ]
          storageContainers = [
            {
              authenticationType = "string"
              batchFrequencyInSeconds = int
              connectionString = "string"
              containerName = "string"
              encoding = "string"
              endpointUri = "string"
              fileNameFormat = "string"
              id = "string"
              identity = {
                userAssignedIdentity = "string"
              }
              maxChunkSizeInBytes = int
              name = "string"
              resourceGroup = "string"
              subscriptionId = "string"
            }
          ]
        }
        enrichments = [
          {
            endpointNames = [
              "string"
            ]
            key = "string"
            value = "string"
          }
        ]
        fallbackRoute = {
          condition = "string"
          endpointNames = [
            "string"
          ]
          isEnabled = bool
          name = "string"
          source = "string"
        }
        routes = [
          {
            condition = "string"
            endpointNames = [
              "string"
            ]
            isEnabled = bool
            name = "string"
            source = "string"
          }
        ]
      }
      storageEndpoints = {
        {customized property} = {
          authenticationType = "string"
          connectionString = "string"
          containerName = "string"
          identity = {
            userAssignedIdentity = "string"
          }
          sasTtlAsIso8601 = "string"
        }
      }
    }
    sku = {
      capacity = int
      name = "string"
    }
    etag = "string"
  })
}

屬性值

IotHubs

名稱 描述
類型 資源類型 “Microsoft.Devices/IotHubs@2023-06-30”
NAME 資源名稱 字串 (必要)

字元限制:3-50

合法字元:
英數字元和連字號。

不能以連字號結尾。

資源名稱在 Azure 中必須是唯一的。
location 資源位置。 字串 (必要)
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。
sku IotHub SKU 資訊 需要IotHubSkuInfo ()
etag 不需要 Etag 欄位。 如果在回應本文中提供,也必須依一般 ETag 慣例提供它做為標頭。 字串
身分識別 IotHub 的受控識別。 ArmIdentity
properties IotHub 屬性 IotHubProperties

ArmIdentity

名稱 描述
類型 用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。 “SystemAssigned”
“SystemAssigned, UserAssigned”
“UserAssigned”
identity_ids {ArmUserIdentity} 的字典 使用者身分識別標識碼的陣列。

ArmIdentityUserAssignedIdentities

名稱 描述
{自定義屬性} ArmUserIdentity

ArmUserIdentity

此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。

IotHubProperties

名稱 描述
allowedFqdnList 允許的 FQDN 清單 (Iot 中樞輸出的完整域名) 。 string[]
authorizationPolicies 您可以用來保護IoT中樞連線的共用存取原則。 SharedAccessSignatureAuthorizationRule[]
cloudToDevice IoT 中樞雲端到裝置的傳訊屬性。 CloudToDeviceProperties
comments IoT 中樞批注。 字串
disableDeviceSAS 如果為 true,則所有裝置 (包括 Edge 裝置,但不包括) 範圍 SAS 金鑰的模組,都無法用於驗證。 bool
disableLocalAuth 如果為 true,則無法使用具有 Iot 中樞範圍的 SAS 金鑰進行驗證的 SAS 令牌。 bool
disableModuleSAS 如果為 true,則所有模組範圍 SAS 金鑰都無法用於驗證。 bool
enableDataResidency 當設定為 true 時,此屬性會啟用數據落地,因此停用災害復原。 bool
enableFileUploadNotifications 如果為 True,則會啟用檔案上傳通知。 bool
eventHubEndpoints 事件中樞相容的端點屬性。 這個字典的唯一可能索引鍵是事件。 在建立或更新IoT中樞的呼叫時,此索引鍵必須存在於字典中。 IotHubPropertiesEventHubEndpoints
特性 為IoT中樞啟用的功能和功能。 “DeviceManagement”
"None"
ipFilterRules IP 篩選規則。 IpFilterRule[]
messagingEndpoints 檔案上傳通知佇列的傳訊端點屬性。 IotHubPropertiesMessagingEndpoints
minTlsVersion 指定要支援此中樞的最低 TLS 版本。 可以設定為 「1.2」 ,讓使用低於 1.2 的 TLS 版本的用戶端遭到拒絕。 字串
networkRuleSets IotHub 的網路規則集屬性 NetworkRuleSetProperties
privateEndpointConnections 在此IotHub上建立的私人端點連線 PrivateEndpointConnection[]
publicNetworkAccess 是否允許來自公用網路的要求 “Disabled”
“Enabled”
restrictOutboundNetworkAccess 如果為 true,則來自 IotHub 的輸出將限製為僅透過 allowedFqdnList 設定的允許 FQDN。 bool
路由 IoT 中樞的路由相關屬性。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging RoutingProperties
storageEndpoints 您可以在其中上傳檔案的 Azure 記憶體端點清單。 目前您只能設定一個 Azure 記憶體帳戶,而且必須將其密鑰設定為$default。 指定多個記憶體帳戶會導致擲回錯誤。 當 enableFileUploadNotifications 屬性設定為 True 時,未指定這個屬性的值,會導致擲回錯誤。 IotHubPropertiesStorageEndpoints

SharedAccessSignatureAuthorizationRule

名稱 描述
keyName 共用存取原則的名稱。 需要字串 ()
primaryKey 主鍵。 字串
權限 指派給共用存取原則的許可權。 “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” (必要)
secondaryKey 次要金鑰。 字串
keyName 共用存取原則的名稱。 需要字串 ()
primaryKey 主鍵。 字串
權限 指派給共用存取原則的許可權。 “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” (必要)
secondaryKey 次要金鑰。 字串

CloudToDeviceProperties

名稱 描述
defaultTtlAsIso8601 裝置佇列中雲端到裝置訊息的預設存留時間。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串
意見回應 雲端到裝置訊息的意見反應佇列屬性。 FeedbackProperties
maxDeliveryCount 裝置佇列中雲端到裝置訊息的最大傳遞計數。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 int

約束:
最小值 = 1
最大值 = 100

FeedbackProperties

名稱 描述
lockDurationAsIso8601 意見反應佇列的鎖定持續時間。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串
maxDeliveryCount IoT 中樞嘗試在意見反應佇列上傳遞訊息的次數。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 int

約束:
最小值 = 1
最大值 = 100
ttlAsIso8601 訊息在IoT中樞過期之前可供取用的時段。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages。 字串

IotHubPropertiesEventHubEndpoints

名稱 描述
{自定義屬性} EventHubProperties

EventHubProperties

名稱 描述
partitionCount 在事件中樞相容端點中接收裝置到雲端訊息的分割區數目。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages。 int
retentionTimeInDays 裝置到雲端訊息的保留時間,以天為單位。 請參閱:/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages int

IpFilterRule

名稱 描述
動作 此規則所擷取之要求的所需動作。 “Accept”
必要的「拒絕」 ()
filterName IP 篩選規則的名稱。 字串 (必要)
ipMask 字串,包含規則 CIDR 表示法中的IP位址範圍。 字串 (必要)

IotHubPropertiesMessagingEndpoints

名稱 描述
{自定義屬性} MessagingEndpointProperties

MessagingEndpointProperties

名稱 描述
lockDurationAsIso8601 鎖定持續時間。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 字串
maxDeliveryCount IoT 中樞嘗試傳遞訊息的次數。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 int

約束:
最小值 = 1
最大值 = 100
ttlAsIso8601 訊息在IoT中樞過期之前可供取用的時段。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload。 字串

NetworkRuleSetProperties

名稱 描述
applyToBuiltInEventHubEndpoint 如果為 True,則網路規則集也會套用至 IotHub 的 BuiltIn EventHub EndPoint bool (必要)
defaultAction 網路規則集的預設動作 “Allow”
“Deny”
ipRules IP 規則清單 NetworkRuleSetIpRule[] (必要)

NetworkRuleSetIpRule

名稱 描述
動作 IP 篩選動作 “允許”
filterName IP 篩選規則的名稱。 需要字串 ()
ipMask 字串,包含規則 CIDR 表示法中的IP位址範圍。 需要字串 ()

PrivateEndpointConnection

名稱 描述
properties 私人端點連線的屬性 PrivateEndpointConnectionProperties (必要)

PrivateEndpointConnectionProperties

名稱 描述
privateEndpoint 私人端點連線的私人端點屬性 PrivateEndpoint
privateLinkServiceConnectionState 私人端點連線的目前狀態 PrivateLinkServiceConnectionState (必要)

PrivateEndpoint

此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。

PrivateLinkServiceConnectionState

名稱 描述
actionsRequired 私人端點連線所需的動作 字串
description 私人端點連線目前狀態的描述 需要字串 ()
status 私人端點連線的狀態 「已核准」
“Disconnected”
“Pending”
“Rejected” (必要)

RoutingProperties

名稱 描述
端點 與IoT中樞根據路由規則路由訊息的自定義端點相關的屬性。 付費中樞的所有端點類型最多允許10個自定義端點,且免費中樞的所有端點類型只允許1個自定義端點。 RoutingEndpoints
擴充 IoT 中樞套用至要傳遞至內建和自定義端點的訊息的使用者提供擴充清單。 請參閱:https://aka.ms/telemetryoneventgrid EnrichmentProperties[]
fallbackRoute 當不符合 『routes』 區段中指定的任何條件時,用來做為後援路由的路由屬性。 這是選擇性參數。 當範本中沒有這個屬性時,預設會停用後援路由。 FallbackRouteProperties
路由 IoT 中樞用來將訊息路由傳送至內建和自定義端點的使用者提供路由規則清單。 付費中樞最多允許 100 個路由規則,免費中樞最多允許 5 個路由規則。 RouteProperties[]

RoutingEndpoints

名稱 描述
cosmosDBSqlContainers IoT 中樞根據路由規則將訊息路由傳送至的Cosmos DB容器端點清單。 RoutingCosmosDBSqlApiProperties[]
eventHubs IoT 中樞根據路由規則,將訊息路由傳送至的事件中樞端點清單。 此清單不包含內建事件中樞端點。 RoutingEventHubProperties[]
serviceBusQueues IoT 中樞根據路由規則將訊息路由傳送至的服務總線佇列端點清單。 RoutingServiceBusQueueEndpointProperties[]
serviceBusTopics IoT 中樞根據路由規則將訊息路由傳送至的服務總線主題端點清單。 RoutingServiceBusTopicEndpointProperties[]
storageContainers IoT 中樞根據路由規則,將訊息路由傳送至的記憶體容器端點清單。 RoutingStorageContainerProperties[]

RoutingCosmosDBSqlApiProperties

名稱 描述
authenticationType 用來對cosmos DB sql容器端點進行驗證的方法 “identityBased”
“keyBased”
containerName cosmos DB 資料庫中 cosmos DB sql 容器的名稱。 需要字串 ()
databaseName cosmos DB 帳戶中 cosmos DB 資料庫的名稱。 需要字串 ()
endpointUri cosmos DB 帳戶的 URL。 它必須包含通訊協定 https:// 需要字串 ()
身分識別 路由cosmos DB容器端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
partitionKeyName 如果有的話,與這個 cosmos DB sql 容器相關聯的分割區索引鍵名稱。 這是選擇性參數。 字串
partitionKeyTemplate 用來產生綜合分割區索引鍵值的範本,以便與這個 cosmos DB sql 容器搭配使用。 範本至少必須包含下列其中一個佔位元:{iothub}、{deviceid}、{DD}、{MM}和 {YYYY}。 任何一個佔位元最多可以指定一次,但順序和非佔位元元元件都是任意的。 只有在指定 PartitionKeyName 時,才需要此參數。 字串
primaryKey cosmos DB 帳戶的主鍵。 字串

約束:
敏感性值。 以安全參數的形式傳入。
resourceGroup cosmos DB 帳戶的資源群組名稱。 字串
secondaryKey cosmos DB 帳戶的次要密鑰。 字串

約束:
敏感性值。 以安全參數的形式傳入。
subscriptionId cosmos DB 帳戶的訂用帳戶標識碼。 字串

ManagedIdentity

名稱 描述
userAssignedIdentity 使用者指派的身分識別。 字串

RoutingEventHubProperties

名稱 描述
authenticationType 用來向事件中樞端點進行驗證的方法 “identityBased”
“keyBased”
connectionString 事件中樞端點的 連接字串。 字串
endpointUri 事件中樞端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 事件中樞命名空間上的事件中樞名稱 字串
id 事件中樞端點的標識碼 字串
身分識別 路由事件中樞端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 事件中樞端點的資源群組名稱。 字串
subscriptionId 事件中樞端點的訂用帳戶標識碼。 字串

RoutingServiceBusQueueEndpointProperties

名稱 描述
authenticationType 用來對服務總線佇列端點進行驗證的方法 “identityBased”
“keyBased”
connectionString 服務總線佇列端點的 連接字串。 字串
endpointUri 服務總線佇列端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 服務總線命名空間上的佇列名稱 字串
id 服務總線佇列端點的標識碼 字串
身分識別 路由服務總線佇列端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱與實際的佇列名稱不同。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 服務總線佇列端點的資源群組名稱。 字串
subscriptionId 服務總線佇列端點的訂用帳戶標識碼。 字串

RoutingServiceBusTopicEndpointProperties

名稱 描述
authenticationType 用來針對服務總線主題端點進行驗證的方法 “identityBased”
“keyBased”
connectionString 服務總線主題端點的 連接字串。 字串
endpointUri 服務總線主題端點的 URL。 它必須包含通訊協定 sb:// 字串
entityPath 服務總線主題上的佇列名稱 字串
id 服務總線主題端點的標識碼 字串
身分識別 路由服務總線主題端點的受控識別屬性。 ManagedIdentity
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 名稱與實際主題名稱不同。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 服務總線主題端點的資源群組名稱。 字串
subscriptionId 服務總線主題端點的訂用帳戶標識碼。 字串

RoutingStorageContainerProperties

名稱 描述
authenticationType 用來對記憶體端點進行驗證的方法 “identityBased”
“keyBased”
batchFrequencyInSeconds Blob 寫入記憶體的時間間隔。 值應介於 60 到 720 秒之間。 預設值為300秒。 int

約束:
最小值 = 60
最大值 = 720
connectionString 記憶體帳戶的 連接字串。 字串
containerName 記憶體帳戶中的記憶體容器名稱。 字串 (必要)
編碼 用來將訊息串行化為 Blob 的編碼方式。 支援的值為 『avro』、『avflate』和 『JSON』。 預設值為 『avro』。 “Avro”
“AvroDeflate”
“JSON”
endpointUri 記憶體端點的 URL。 它必須包含通訊協定 https:// 字串
fileNameFormat Blob 的檔名格式。 默認格式為 {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}。 所有參數都是必要參數,但可以重新排序。 字串
id 記憶體容器端點的標識碼 字串
身分識別 路由記憶體端點的受控識別屬性。 ManagedIdentity
maxChunkSizeInBytes 寫入記憶體之每個 Blob 的最大位元元組數目。 值應該介於 10485760 (10MB) 和 524288000 (500 MB) 之間。 預設值為 314572800 (300MB) 。 int

約束:
最小值 = 10485760
最大值 = 524288000
NAME 識別此端點的名稱。 名稱只能包含英數位元、句號、底線、連字元,且長度上限為64個字元。 下列名稱是保留的:events、fileNotifications、$default。 端點名稱在端點類型之間必須是唯一的。 需要字串 ()

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
resourceGroup 記憶體帳戶的資源群組名稱。 字串
subscriptionId 記憶體帳戶的訂用帳戶標識碼。 字串

EnrichmentProperties

名稱 描述
endpointNames 擴充套用至訊息的端點清單。 string[] (必要)

約束:
最小長度 = 1
索引鍵 擴充屬性的索引鍵或名稱。 需要字串 ()
擴充屬性的值。 需要字串 ()

FallbackRouteProperties

名稱 描述
condition (條件) 要套用後援路由的條件。 如果未提供條件,則預設會評估為 true。 如需文法,請參閱:/azure/iot-hub/iot-hub-devguide-query-language 字串
endpointNames 符合條件的訊息會路由傳送至的端點清單。 目前只允許 1 個端點。 string[] (必要)

約束:
最小長度 = 1
最大長度 = 1
isEnabled 用來指定是否啟用後援路由。 bool (必要)
NAME 路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,而且必須是唯一的。 字串
source 要套用路由規則的來源。 例如,DeviceMessages “DeviceConnectionStateEvents”
“DeviceJobLifecycleEvents”
“DeviceLifecycleEvents”
“DeviceMessages”
“Invalid”
“TwinChangeEvents” (必要)

RouteProperties

名稱 描述
condition (條件) 評估為套用路由規則的條件。 如果未提供任何條件,則預設會評估為 true。 如需文法,請參閱:/azure/iot-hub/iot-hub-devguide-query-language 字串
endpointNames 路由傳送符合條件之訊息的端點清單。 目前只允許一個端點。 string[] (必要)

約束:
最小長度 = 1
最大長度 = 1
isEnabled 用來指定是否啟用路由。 bool (必要)
NAME 路由的名稱。 名稱只能包含英數位元、句號、底線、連字元、長度上限為64個字元,且必須是唯一的。 字串 (必要)

約束:
模式 = ^[A-Za-z0-9-._]{1,64}$
來源 要套用路由規則的來源,例如 DeviceMessages。 “DeviceConnectionStateEvents”
“DeviceJobLifecycleEvents”
“DeviceLifecycleEvents”
“DeviceMessages”
“Invalid”
“TwinChangeEvents” (必要)

IotHubPropertiesStorageEndpoints

名稱 描述
{自定義屬性} StorageEndpointProperties

StorageEndpointProperties

名稱 描述
authenticationType 指定用於連線至記憶體帳戶的驗證類型。 “identityBased”
“keyBased”
connectionString 上傳檔案的 Azure 記憶體帳戶 連接字串。 字串 (必要)
containerName 上傳檔案的根容器名稱。 容器不需要存在,但應該使用指定的 connectionString 來建立。 字串 (必要)
身分識別 用於檔案上傳之記憶體端點的受控識別屬性。 ManagedIdentity
sasTtlAsIso8601 檔案上傳 IoT 中樞 所產生的 SAS URI 有效期間。 請參閱:/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options。 字串

IotHubSkuInfo

名稱 描述
處理能力 已布建 IoT 中樞 單位的數目。 請參閱:/azure/azure-subscription-service-limits#iot-hub-limits。 int
NAME SKU 的名稱。 “B1”
“B2”
“B3”
"F1"
“S1”
“S2”
“S3” (必要)