【问题标题】:What is difference between "projects.locations.templates.create" and "projects.locations.templates.launch" of Dataflow REST API?Dataflow REST API 的“projects.locations.templates.create”和“projects.locations.templates.launch”有什么区别?
【发布时间】:2020-01-07 07:41:47
【问题描述】:

我正在尝试基于 Cloud Scheduler 中的 Dataflow 模板启动 Dataflow 作业。

下面的文档提到了 API projects.templates.launch 来启动 Dataflow 作业: https://cloud.google.com/dataflow/docs/guides/templates/running-templates

API 文档说这个 API “启动模板。”: https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/launch

但我找到了其他 REST API projects.templates.create,我可以从 Google 提供的模板开始 Dataflow 作业: https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.templates/create

API 文档说这个 API“从模板创建 Cloud Dataflow 作业”。

对我来说,这两个 API 描述看起来是一样的。 有谁知道两个 API 的区别吗?

【问题讨论】:

  • 嗨@mkk,lauch url 中缺少一个字符。还查看此文档,他们没有重新运行相同类型的响应。

标签: google-cloud-platform google-cloud-dataflow


【解决方案1】:

阅读您提供的文档,不同之处在于每个方法返回的响应正文。声明如下:

templates.launch: 如果成功,响应正文包含一个 LaunchTemplateResponse 的实例。

templates.create: 如果成功,响应正文包含一个新创建的 Job 实例。

我希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2020-05-28
    • 2021-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-14
    • 2015-04-26
    • 2010-12-06
    相关资源
    最近更新 更多