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.25.1 lib/awspec/type/batch_job_queue.rb
awspec-1.25.0 lib/awspec/type/batch_job_queue.rb
awspec-1.24.4 lib/awspec/type/batch_job_queue.rb
awspec-1.24.3 lib/awspec/type/batch_job_queue.rb
awspec-1.24.2 lib/awspec/type/batch_job_queue.rb
awspec-1.24.1 lib/awspec/type/batch_job_queue.rb
awspec-1.24.0 lib/awspec/type/batch_job_queue.rb
awspec-1.23.0 lib/awspec/type/batch_job_queue.rb
awspec-1.22.1 lib/awspec/type/batch_job_queue.rb
awspec-1.22.0 lib/awspec/type/batch_job_queue.rb
awspec-1.21.1 lib/awspec/type/batch_job_queue.rb
awspec-1.21.0 lib/awspec/type/batch_job_queue.rb
awspec-1.20.0 lib/awspec/type/batch_job_queue.rb
awspec-1.19.2 lib/awspec/type/batch_job_queue.rb
awspec-1.19.1 lib/awspec/type/batch_job_queue.rb
awspec-1.19.0 lib/awspec/type/batch_job_queue.rb
cthiesfork-awspec-1.2.4 lib/awspec/type/batch_job_queue.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/type/batch_job_queue.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/type/batch_job_queue.rb
awspec-1.18.6 lib/awspec/type/batch_job_queue.rb