Sha256: e0505f8982194ee862016bb7779d982d87172fc2a2000c11cb5bb604ffe1867a

Contents?: true

Size: 494 Bytes

Versions: 20

Compression:

Stored size: 494 Bytes

Contents

module Awspec::Type
  class AutoscalingGroup < Base
    def initialize(id)
      super
      @resource = find_autoscaling_group(id)
      @id = @resource[:auto_scaling_group_arn] if @resource
    end

    def has_elb?(name)
      @resource.load_balancer_names.find do |lb_name|
        lb_name == name
      end
    end

    def has_ec2?(id)
      ec2 = find_ec2(id)
      @resource.instances.find do |instance|
        instance.instance_id = ec2.instance_id
      end if ec2
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
awspec-0.25.3 lib/awspec/type/autoscaling_group.rb
awspec-0.25.2 lib/awspec/type/autoscaling_group.rb
awspec-0.25.1 lib/awspec/type/autoscaling_group.rb
awspec-0.25.0 lib/awspec/type/autoscaling_group.rb
awspec-0.24.2 lib/awspec/type/autoscaling_group.rb
awspec-0.24.1 lib/awspec/type/autoscaling_group.rb
awspec-0.24.0 lib/awspec/type/autoscaling_group.rb
awspec-0.23.0 lib/awspec/type/autoscaling_group.rb
awspec-0.22.1 lib/awspec/type/autoscaling_group.rb
awspec-0.22.0 lib/awspec/type/autoscaling_group.rb
awspec-0.21.6 lib/awspec/type/autoscaling_group.rb
awspec-0.21.5 lib/awspec/type/autoscaling_group.rb
awspec-0.21.4 lib/awspec/type/autoscaling_group.rb
awspec-0.21.3 lib/awspec/type/autoscaling_group.rb
awspec-0.21.2 lib/awspec/type/autoscaling_group.rb
awspec-0.21.1 lib/awspec/type/autoscaling_group.rb
awspec-0.21.0 lib/awspec/type/autoscaling_group.rb
awspec-0.20.2 lib/awspec/type/autoscaling_group.rb
awspec-0.20.1 lib/awspec/type/autoscaling_group.rb
awspec-0.20.0 lib/awspec/type/autoscaling_group.rb