Module: Cumulus::AutoScaling
- Defined in:
- lib/autoscaling/Commands.rb,
lib/autoscaling/AutoScaling.rb,
lib/autoscaling/loader/Loader.rb,
lib/autoscaling/manager/Manager.rb,
lib/autoscaling/models/AlarmDiff.rb,
lib/autoscaling/models/PolicyDiff.rb,
lib/autoscaling/models/AlarmConfig.rb,
lib/autoscaling/models/GroupConfig.rb,
lib/autoscaling/models/PolicyConfig.rb,
lib/autoscaling/models/AutoScalingDiff.rb,
lib/autoscaling/models/ScheduledConfig.rb,
lib/autoscaling/models/ScheduledActionDiff.rb
Defined Under Namespace
Modules: AlarmChange, AutoScalingChange, Loader, PolicyChange, ScheduledActionChange Classes: AlarmConfig, AlarmDiff, AutoScalingDiff, Commands, GroupConfig, Manager, PolicyConfig, PolicyDiff, ScheduledActionDiff, ScheduledConfig
Constant Summary collapse
- @@client =
Aws::AutoScaling::Client.new(Configuration.instance.client)
Class Method Summary collapse
-
.groups ⇒ Object
Public: Lazily load auto scaling groups.
-
.instance_ids ⇒ Object
Public.
-
.named_groups ⇒ Object
Public.
Class Method Details
.groups ⇒ Object
Public: Lazily load auto scaling groups
25 26 27 |
# File 'lib/autoscaling/AutoScaling.rb', line 25 def groups @groups = init_groups end |
.instance_ids ⇒ Object
Public
Returns an array of instance ids that are in any autoscaling groups
13 14 15 |
# File 'lib/autoscaling/AutoScaling.rb', line 13 def instance_ids @instance_ids ||= groups.map { |gr| gr.instances.map { |i| i.instance_id } }.flatten end |
.named_groups ⇒ Object
Public
Returns a Hash of autoscaling group name to Aws::AutoScaling::Types::AutoScalingGroup
20 21 22 |
# File 'lib/autoscaling/AutoScaling.rb', line 20 def named_groups @named_groups ||= Hash[groups.map { |group| [group.auto_scaling_group_name, group] }] end |