创建Azure IoT我们...
通知
清除全部

使用Azure中的ARM模板创建Azure IoT

RSS

(@anamika)
贵族成员
加入:2年前
帖子:1381
16/03/2021 12:06 PM

我正在尝试执行从Azure生成的IOTHUB终点生成的自动脚本,但要获得以下错误:

new -azurermresourcegroupdeployment:12:25:25 am-错误:code = invalidTemplate;消息=部署模板验证失败:'the Template Resource'serviceBus1/topic1/iothubRoutes_tst-iothub'in Line'216''and Comart'10'是无效的:无法评估模板语言函数'resourceId':函数需要一个多型多数分割的参数必须是资源类型,包括资源提供商名称空间。当前函数参数“ Microsoft.ServiceBus/namespaces/topics,servicebus1/topic1'。请参见https://aka.ms/arm-template-expressions/#resourceid有关使用详细信息。.请参阅https://aka.ms/arm-template-expressions用于使用细节。'。在c:\ user \ user \ desktop \ testendpoints \ cims-resourcegrp \ deplo y.ps1:104 char:5 + new-azurermresourcegroupdeployment -resourcegroupname $ resourcegr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeplo yment], Exception + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets .Implementation.NewAzureResourceGroupDeploymentCmdlet

请在下面查找是模板文件片的代码:

“ enable express”:false},“ deverson”:[[“ [resourceId('Microsoft.ServiceBus/namespaces',parameters('namesspaces_cs_servicebus_name'')]”}]},{'imprive'7dshsjdh/resourceGroups/cs-resourcegrp/provers/microsoft.servicebus/namespaces/cs-servicebus/topics/cs-topic/optropic/iothubRoutes_cs-ioothub'。,“ name”:“ [parameters('juretizationrules_iothubroutes_cs_iothub_name')]”,“ apiversion”:“ 2015-08-01”,“位置”:“ East US”:“ East US”,“ scale”:“ scale”:null,null,properties':properties':{“ properties”:{“”权利“:[“ send”]},“依赖森”:[“ [ResourceId('Microsoft.ServiceBus/namespaces',parameters('namesspaces_cs_servicebus_name''))]”,“ [resourceD.参数('topics_cs_topic_name')]]”]

引用
(@ganesh)
贵族成员
加入:2年前
帖子:1362
16/03/2021 12:08 PM

不建议将直接从Azure门户生成的ARM模板部署。因为您从Azure Portal复制的ARM模板将包含当前资源组中的所有资源,并且您的部分资源无法导出到模板。

要使用Azure Resource Manager模板创建IoT中心,建议您使用下文中包含的模板。


回复引用
分享:
Baidu