Sha256: f0f898c1195b814af7115bc906caba48898f8a9824b59ed34c1d160c7ce273e1

Contents?: true

Size: 547 Bytes

Versions: 34

Compression:

Stored size: 547 Bytes

Contents

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

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

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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
awspec-0.38.0 lib/awspec/type/autoscaling_group.rb
awspec-0.37.8 lib/awspec/type/autoscaling_group.rb
awspec-0.37.7 lib/awspec/type/autoscaling_group.rb
awspec-0.37.6 lib/awspec/type/autoscaling_group.rb
awspec-0.37.5 lib/awspec/type/autoscaling_group.rb
awspec-0.37.4 lib/awspec/type/autoscaling_group.rb
awspec-0.37.3 lib/awspec/type/autoscaling_group.rb
awspec-0.37.2 lib/awspec/type/autoscaling_group.rb
awspec-0.37.1 lib/awspec/type/autoscaling_group.rb
awspec-0.37.0 lib/awspec/type/autoscaling_group.rb
awspec-0.36.1 lib/awspec/type/autoscaling_group.rb
awspec-0.36.0 lib/awspec/type/autoscaling_group.rb
awspec-0.35.0 lib/awspec/type/autoscaling_group.rb
awspec-0.34.0 lib/awspec/type/autoscaling_group.rb