批量删除职位 (v4beta1)

批量删除职位。

代码示例

Ruby

require "google/cloud/talent"

# Instantiate a client
job_service = Google::Cloud::Talent.job_service

# project_id = "Your Google Cloud Project ID"
# tenant_id = "Your Tenant ID (using tenancy is required)"
formatted_parent = job_service.tenant_path project: project_id, tenant: tenant_id

# the name of jobs to be deleted.
names = [job_name_one, job_name_two]

# Make the long-running operation request
operation = job_service.batch_delete_jobs parent: formatted_parent, names: names

# Block until operation complete
operation.wait_until_done!

raise operation.results.message if operation.error?

response = operation.response

puts "Batch response: #{response.inspect}"

后续步骤

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