使用 Ruby 更新工作流

使用 Ruby 更新工作流。

代码示例

Ruby

在尝试此示例之前,请按照《Workflows 快速入门:使用客户端库》中的 Ruby 设置说明进行操作。如需了解详情,请参阅 BigQuery Ruby API 参考文档

require "google/cloud/workflows/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Workflows::V1::Workflows::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new

# Call the update_workflow method.
result = client.update_workflow request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

后续步骤

如需搜索和过滤其他 Google Cloud 产品的代码示例,请参阅 Google Cloud 示例浏览器