templates - Azure 数据工厂 V2 : auto-start trigger upon deployment?

标签 templates deployment 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'))]"
      ]
    },

最佳答案

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


调查问题后,不幸的是无法创建激活的触发器。 ARM 模板仅支持 PUT 操作,但 start 是一个单独的 POST 操作。要激活触发器,您必须通过 UX、Powershell 或创建后使用的任何 ADF SDK 显式调用启动 API。这是因为运行时状态是用户无法显式设置的只读属性。

关于templates - Azure 数据工厂 V2 : auto-start trigger upon deployment?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51968847/

相关文章:

c++ - 尽管定义了强制转换运算符,但没有强制转换

php - 存储触发器中更新表的执行查询出现问题

Oracle触发器更新同一张表中的列值

c# - 如何在创建新文件夹或文件时触发 Windows 服务启动

c++ - "undefined reference"到静态字段模板特化

C++从迭代器中获取整数索引值

gridview - 如何动态更改 gridview 模板列顺序?

maven - 如何在命令行指定tomcat7-maven-plugin使用的服务器信息?

entity-framework - EF Code First - 多个应用程序版本共享数据库

ruby-on-rails - Heroku 推送被拒绝,检测到 Ruby 版本已更改,找不到 net-scp-1.0.6