Class: AwsHelpers::CloudFormation::StackErrorEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_helpers/cloud_formation/stack_error_events.rb

Instance Method Summary collapse

Constructor Details

#initialize(cloud_formation_client, stack_name) ⇒ StackErrorEvents


5
6
7
8
# File 'lib/aws_helpers/cloud_formation/stack_error_events.rb', line 5

def initialize(cloud_formation_client, stack_name)
  @cloud_formation_client = cloud_formation_client
  @stack_name = stack_name
end

Instance Method Details

#executeObject


10
11
12
13
14
15
16
17
# File 'lib/aws_helpers/cloud_formation/stack_error_events.rb', line 10

def execute
  events = retrieve_events
  events = filter_post_initiation(events)
  events = filter_failed(events)
  events.each { |event|
    puts "#{event[:timestamp]}, #{event[:resource_status]}, #{event[:logical_resource_id]}, #{event[:resource_status_reason]}"
  }
end