Sha256: 75528631886092475176c106e3671e5657a7353df5ec7ba511aec58101c51ecc

Contents?: true

Size: 670 Bytes

Versions: 21

Compression:

Stored size: 670 Bytes

Contents

module Awspec::Type
  class AutoscalingGroup < ResourceBase
    aws_resource Aws::AutoScaling::AutoScalingGroup
    tags_allowed

    def resource_via_client
      @resource_via_client ||= find_autoscaling_group(@display_name)
    end

    def 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)
      return nil unless ec2
      resource_via_client.instances.find do |instance|
        instance.instance_id = ec2.instance_id
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
awspec-0.80.1 lib/awspec/type/autoscaling_group.rb
awspec-0.80.0 lib/awspec/type/autoscaling_group.rb
awspec-0.79.2 lib/awspec/type/autoscaling_group.rb
awspec-0.79.1 lib/awspec/type/autoscaling_group.rb
awspec-0.79.0 lib/awspec/type/autoscaling_group.rb
awspec-0.78.1 lib/awspec/type/autoscaling_group.rb
awspec-0.77.1 lib/awspec/type/autoscaling_group.rb
awspec-0.77.0 lib/awspec/type/autoscaling_group.rb
awspec-0.76.1 lib/awspec/type/autoscaling_group.rb
awspec-0.76.0 lib/awspec/type/autoscaling_group.rb
awspec-0.75.2 lib/awspec/type/autoscaling_group.rb
awspec-0.75.1 lib/awspec/type/autoscaling_group.rb
awspec-0.75.0 lib/awspec/type/autoscaling_group.rb
awspec-0.74.1 lib/awspec/type/autoscaling_group.rb
awspec-0.74.0 lib/awspec/type/autoscaling_group.rb
awspec-0.73.2 lib/awspec/type/autoscaling_group.rb
awspec-0.73.1 lib/awspec/type/autoscaling_group.rb
awspec-0.73.0 lib/awspec/type/autoscaling_group.rb
awspec-0.72.0 lib/awspec/type/autoscaling_group.rb
awspec-0.71.0 lib/awspec/type/autoscaling_group.rb