Class: AWS::AutoScaling::ActivityCollection
- Inherits:
-
Object
- Object
- AWS::AutoScaling::ActivityCollection
- Includes:
- Core::Collection::Limitable
- Defined in:
- lib/aws/auto_scaling/activity_collection.rb
Overview
Allows you to enumerate Auto Scaling activities
Enumerating ALL activities:
auto_scaling = AWS::AutoScaling.new
auto_scaling.activities.each do |activity|
# ...
end
Enumerating activities for a single Auto Scaling group:
group = auto_scaling.groups['group-name']
group.activities.each do |activity|
# ...
end
If you know the id of an activity you can get a refernce to it:
activity = auto_scaling.activities['activity-id']
Instance Attribute Summary
Attributes included from Core::Model
Instance Method Summary collapse
- #[](activity_id) ⇒ Activity
-
#initialize(options = {}) ⇒ ActivityCollection
constructor
A new instance of ActivityCollection.
Methods included from Core::Collection::Limitable
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from Core::Model
#client, #config_prefix, #inspect
Constructor Details
#initialize(options = {}) ⇒ ActivityCollection
Returns a new instance of ActivityCollection.
42 43 44 45 46 47 48 49 |
# File 'lib/aws/auto_scaling/activity_collection.rb', line 42 def initialize = {} @group = [:group] if @group super(@group, ) else super end end |