Class: AWS::AutoScaling::ActivityCollection

Inherits:
Object
  • Object
show all
Includes:
Core::Collection::WithLimitAndNextToken
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 reference to it:

activity = auto_scaling.activities['activity-id']

Instance Method Summary collapse

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Instance Method Details

#[](activity_id) ⇒ Activity

Parameters:

  • activity_id (String)

Returns:



53
54
55
# File 'lib/aws/auto_scaling/activity_collection.rb', line 53

def [] activity_id
  Activity.new(activity_id, :config => config)
end