Class: AwsAlertMonitor::Events::AutoScalingNotification

Inherits:
AwsAlertMonitor::Event show all
Defined in:
lib/aws-alert-monitor/events/auto_scaling_notification.rb

Instance Attribute Summary

Attributes inherited from AwsAlertMonitor::Event

#message_data, #raw_data

Instance Method Summary collapse

Methods inherited from AwsAlertMonitor::Event

#initialize

Constructor Details

This class inherits a constructor from AwsAlertMonitor::Event

Instance Method Details

#bodyObject



6
7
8
9
10
# File 'lib/aws-alert-monitor/events/auto_scaling_notification.rb', line 6

def body
  cause       = message_data['Cause']
  description = message_data['Description']
  "received an alert: \n\n #{description} \n\n #{cause}"
end

#subjectObject



12
13
14
# File 'lib/aws-alert-monitor/events/auto_scaling_notification.rb', line 12

def subject
  "Alert: #{raw_data['Subject']}"
end

#typeObject



16
17
18
# File 'lib/aws-alert-monitor/events/auto_scaling_notification.rb', line 16

def type
  message_data['Event']
end