根据以下错误:
资源未在 ARM 模板中定义。
Microsoft.Datafactory/factories/integrationruntimes/IR-prod 不
定义
如果您使用不在模板中的 IR,那么 您不应该为同一个 IR 添加依赖块。从代码中您使用的是 connectVia reference name,这是模板中未提供的 IR,然后您再次在 depends on block 中引用相同的 IR,如下所示:
"dependson": ["[concat (variables('factorylId'), '/integrationRuntimes/',parameters ('connectVia_referenceName'))]"]
但由于模板中不存在connectVia_referenceName,因此未定义其抛出错误。
因此,您可以尝试从代码中删除 dependsOn,然后尝试如下操作:
{
"name": "[concat (parameters ('factoryName'), '/example-name')]",
"type": "Microsoft.DataFactory/factories/linkedServices",
"apiversion": "2018-06-01",
"properties": {
"description": "This linked service is used to connect Synapse instance for invoking ILF stored proc",
"annotations": [],
"type": "AzureSqlDW",
"typeProperties": {
"connectionString": {
"type": "SecureString",
"value": "[parameters('connectionString')]"
}
},
"connectVia": {
"referenceName": "[parameters('connectVia_referenceName')]",
"type": "IntegrationRuntimeReference"
}
}
}