Class: ESP::CloudTrailEvent
- Inherits:
-
Resource
- Object
- ActiveResource::Base
- Resource
- ESP::CloudTrailEvent
- Defined in:
- lib/esp/resources/cloud_trail_event.rb
Class Method Summary collapse
-
.find(id) ⇒ ESP::CloudTrailEvent
Find a CloudTrailEvent by id.
-
.for_alert(alert_id = nil) ⇒ ActiveResource::PaginatedCollection<ESP::CloudTrailEvent>
Returns cloud trail events for the given
alert_id
. -
.where ⇒ void
Not Implemented.
Instance Method Summary collapse
-
#destroy ⇒ void
Not Implemented.
-
#save ⇒ void
Not Implemented.
Methods included from Dirty
#changed_attributes, #original_attributes, #original_attributes=
Methods included from LoadWithOriginalAttributes
Class Method Details
.find(id) ⇒ ESP::CloudTrailEvent
Find a CloudTrailEvent by id
call-seq -> super.find(id)
47 48 49 50 51 52 53 54 |
# File 'lib/esp/resources/cloud_trail_event.rb', line 47 def self.find(*arguments) scope = arguments.slice!(0) = (arguments.slice!(0) || {}).with_indifferent_access return super(scope, ) if scope.is_a?(Numeric) || [:from].present? params = .fetch(:params, {}).with_indifferent_access alert_id = params.delete(:alert_id) for_alert(alert_id) end |
.for_alert(alert_id = nil) ⇒ ActiveResource::PaginatedCollection<ESP::CloudTrailEvent>
Returns cloud trail events for the given alert_id
. Convenience method to use instead of find since an alert_id
is required to return cloud trail events.
32 33 34 35 36 |
# File 'lib/esp/resources/cloud_trail_event.rb', line 32 def self.for_alert(alert_id = nil) fail ArgumentError, "You must supply an alert id." unless alert_id.present? from = "#{prefix}alerts/#{alert_id}/cloud_trail_events.json" find(:all, from: from) end |
.where ⇒ void
This method returns an undefined value.
Not Implemented. You cannot search for a CloudTrailEvent.
6 7 8 |
# File 'lib/esp/resources/cloud_trail_event.rb', line 6 def self.where(*) fail ESP::NotImplementedError end |
Instance Method Details
#destroy ⇒ void
This method returns an undefined value.
Not Implemented. You cannot destroy a CloudTrailEvent.
20 21 22 |
# File 'lib/esp/resources/cloud_trail_event.rb', line 20 def destroy fail ESP::NotImplementedError end |
#save ⇒ void
This method returns an undefined value.
Not Implemented. You cannot create or update a CloudTrailEvent.
13 14 15 |
# File 'lib/esp/resources/cloud_trail_event.rb', line 13 def save fail ESP::NotImplementedError end |