Sha256: 9380bf484e76eb65bde1637ba23e29a8ed4b25ba8da890abfb3b2e9470b6e5f2

Contents?: true

Size: 735 Bytes

Versions: 56

Compression:

Stored size: 735 Bytes

Contents

module Awspec::Type
  class BatchJobQueue < ResourceBase
    def initialize(jobqueue)
      super
      @display_name = jobqueue
    end

    def resource_via_client
      @resource_via_client ||= find_batch_job_queue(@display_name)
    end

    def id
      @id ||= resource_via_client.job_queue_name if resource_via_client
    end

    STATES = %w(ENABLED DISABLED)

    STATES.each do |state|
      define_method state.downcase + '?' do
        resource_via_client.state == state
      end
    end

    def has_compute_environment_order?(arn, order)
      resource_via_client.compute_environment_order.each do |res|
        return true if res.compute_environment == arn && res.order == order
      end
      false
    end
  end
end

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
awspec-1.15.1 lib/awspec/type/batch_job_queue.rb
awspec-1.15.0 lib/awspec/type/batch_job_queue.rb
awspec-1.14.1 lib/awspec/type/batch_job_queue.rb
awspec-1.14.0 lib/awspec/type/batch_job_queue.rb
awspec-1.13.0 lib/awspec/type/batch_job_queue.rb
awspec-1.12.7 lib/awspec/type/batch_job_queue.rb
awspec-1.12.6 lib/awspec/type/batch_job_queue.rb
awspec-1.12.5 lib/awspec/type/batch_job_queue.rb
awspec-1.12.4 lib/awspec/type/batch_job_queue.rb
awspec-1.12.3 lib/awspec/type/batch_job_queue.rb
awspec-1.12.2 lib/awspec/type/batch_job_queue.rb
awspec-1.12.1 lib/awspec/type/batch_job_queue.rb
awspec-1.12.0 lib/awspec/type/batch_job_queue.rb
awspec-1.11.1 lib/awspec/type/batch_job_queue.rb
awspec-1.11.0 lib/awspec/type/batch_job_queue.rb
awspec-1.10.0 lib/awspec/type/batch_job_queue.rb