Module: Awspec::Helper::Finder::Batch

Included in:
Awspec::Helper::Finder
Defined in:
lib/awspec/helper/finder/batch.rb

Instance Method Summary collapse

Instance Method Details

#find_batch_compute_environment(name) ⇒ Object



6
7
8
9
# File 'lib/awspec/helper/finder/batch.rb', line 6

def find_batch_compute_environment(name)
  res = batch_client.describe_compute_environments(compute_environments: [name], max_results: 1)
  res.compute_environments[0] if res.compute_environments
end

#find_batch_job_definition(name) ⇒ Object



11
12
13
14
# File 'lib/awspec/helper/finder/batch.rb', line 11

def find_batch_job_definition(name)
  res = batch_client.describe_job_definitions(job_definitions: [name], max_results: 1)
  res.job_definitions[0] if res.job_definitions
end

#find_batch_job_queue(name) ⇒ Object



16
17
18
19
# File 'lib/awspec/helper/finder/batch.rb', line 16

def find_batch_job_queue(name)
  res = batch_client.describe_job_queues(job_queues: [name], max_results: 1)
  res.job_queues[0] if res.job_queues
end