Class: AWS::AutoScaling::InstanceCollection
- Inherits:
-
Object
- Object
- AWS::AutoScaling::InstanceCollection
- Includes:
- Core::Collection::Limitable
- Defined in:
- lib/aws/auto_scaling/instance_collection.rb
Overview
Allows you to enumerate Auto Scaling instances.
auto_scaling = AWS::AutoScaling.new
auto_scaling.instances.each do |instance|
# ...
end
You can also get an Auto Scaling instance by its EC2 instance id.
auto_scaling_instance = auto_scaling.instances['i-12345678']
auto_scaling_instance.class #=> AWS::AutoScaling::Instance
Instance Method Summary collapse
Methods included from Core::Collection::Limitable
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Instance Method Details
#[](instance_id) ⇒ AutoScaling::Instance
35 36 37 |
# File 'lib/aws/auto_scaling/instance_collection.rb', line 35 def [] instance_id Instance.new(instance_id, :config => config) end |