【发布时间】:2018-08-22 14:14:01
【问题描述】:
我创建了一个管道和一个触发器,并试图让触发器在部署后立即自动启动。 我在文档中看到,部署后触发器的状态是“停止”,我想问一下如何在我的模板部署中更改它,以便在每次部署后不需要立即使用 powershell 脚本。
我尝试在我的 TD 中使用“runtimeState”参数,但它被替换为“已停止”。
这是我的触发器:
{
"name": "[concat(variables('factoryName'), '/periodicTrigger')]",
"type": "Microsoft.DataFactory/factories/triggers",
"apiVersion": "2018-06-01",
"properties": {
"description": "Periodic trigger for the backup pipeline.",
"annotations": [],
"runtimeState": "Started",
"pipelines": [
{
"pipelineReference": {
"referenceName": "[concat(variables('mainStorageName'),'backupPipeline')]",
"type": "PipelineReference"
},
"parameters": {}
}
],
"type": "ScheduleTrigger",
"typeProperties": {
"recurrence": {
"frequency": "Day",
"interval": 1,
"startTime": "2018-08-21T13:28:07.785Z",
"timeZone": "UTC",
"schedule": {
"minutes": [
0
],
"hours": [
3
]
}
}
}
},
"dependsOn": [
"[concat(variables('factoryId'), '/pipelines/',concat(variables('mainStorageName'),'backupPipeline'))]"
]
},
【问题讨论】:
-
有人吗?触发器似乎是数据工厂 V2 的一个新特性。在 V1 中,它是在部署管道时自动进行的。
-
同样的问题,也尝试设置“runtimeState”但无济于事。 ARM 文档也没有提及任何表明这是可能的内容:-/ 只找到了这些 powershell cmdlet 来启用它:docs.microsoft.com/en-us/powershell/module/az.datafactory/… 虽然很想在 ARM 模板中执行此操作...
标签: templates deployment triggers factory