Batch delete jobs (v4beta1)

Batch delete jobs.

Code sample


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

raise operation.results.message if operation.error?

response = operation.response

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

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser