Azure 数据工厂 V2:部署时自动启动触发器?

men*_*man 5 deployment templates triggers factory

我创建了一个管道和一个触发器,我试图让触发器在部署后立即自动启动。我在文档中看到部署后触发器的状态为“停止”,我想问一下如何在模板部署中更改它,以便在每次部署后都不需要使用 powershell 脚本。

我试图在我的 TD 中使用“runtimeState”参数,但它被替换为“stopped”。

这是我的触发器:

 {
      "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'))]"
      ]
    },
Run Code Online (Sandbox Code Playgroud)

小智 5

尚不支持, https://github.com/MicrosoftDocs/feedback/issues/1583

" 在调查该问题后,遗憾的是无法创建激活的触发器。ARM 模板仅支持 PUT 操作,但启动是一个单独的 POST 操作。要激活触发器,您必须通过 UX、Powershell 或无论您在创建后使用什么 ADF SDK。这是由于运行时状态是用户无法显式设置的只读属性。”