module RubyAemAws::AbstractSingleComponent

Add common methods to all Components.

Public Instance Methods

get_all_instances() click to toggle source
# File lib/ruby_aem_aws/abstract/single_component.rb, line 32
def get_all_instances
  [get_instance]
end
get_instance() click to toggle source
# File lib/ruby_aem_aws/abstract/single_component.rb, line 23
def get_instance
  instances = ec2_resource.instances(filter_for_descriptor).select { |instance| InstanceState::ALL_ACTIVE.include?(instance.state.name) }
  count = instances.count
  raise RubyAemAws::ExpectedSingleInstanceError if count > 1
  return nil if count.zero?

  instances.first
end