Sha256: 082032a13b70c448e5736d4de657f8720fa3fc44fca2f59f6221627592b43bad

Contents?: true

Size: 549 Bytes

Versions: 13

Compression:

Stored size: 549 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

13 entries across 13 versions & 1 rubygems

Version Path
awspec-0.33.0 lib/awspec/type/autoscaling_group.rb
awspec-0.32.0 lib/awspec/type/autoscaling_group.rb
awspec-0.31.0 lib/awspec/type/autoscaling_group.rb
awspec-0.30.0 lib/awspec/type/autoscaling_group.rb
awspec-0.29.0 lib/awspec/type/autoscaling_group.rb
awspec-0.28.1 lib/awspec/type/autoscaling_group.rb
awspec-0.28.0 lib/awspec/type/autoscaling_group.rb
awspec-0.27.2 lib/awspec/type/autoscaling_group.rb
awspec-0.27.1 lib/awspec/type/autoscaling_group.rb
awspec-0.27.0 lib/awspec/type/autoscaling_group.rb
awspec-0.26.2 lib/awspec/type/autoscaling_group.rb
awspec-0.26.1 lib/awspec/type/autoscaling_group.rb
awspec-0.26.0 lib/awspec/type/autoscaling_group.rb