Class: CfnGuardian::Models::BaseEvent
- Inherits:
-
Object
- Object
- CfnGuardian::Models::BaseEvent
- Defined in:
- lib/cfnguardian/models/event.rb
Direct Known Subclasses
AzureFileEvent, ContainerInstanceEvent, DomainExpiryEvent, HttpEvent, NrpeEvent, PortEvent, SFTPEvent, SqlEvent, SslEvent, TLSEvent, WebSocketEvent
Instance Attribute Summary collapse
-
#cron ⇒ Object
Returns the value of attribute cron.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#group ⇒ Object
Returns the value of attribute group.
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#name ⇒ Object
Returns the value of attribute name.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#ssm_parameters ⇒ Object
Returns the value of attribute ssm_parameters.
-
#target ⇒ Object
Returns the value of attribute target.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(resource) ⇒ BaseEvent
constructor
A new instance of BaseEvent.
Constructor Details
#initialize(resource) ⇒ BaseEvent
Returns a new instance of BaseEvent.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cfnguardian/models/event.rb', line 19 def initialize(resource) @type = 'Event' @group = nil @target = nil @hash = Digest::MD5.hexdigest resource['Id'] @name = @hash @cron = "* * * * ? *" @enabled = true @resource = resource['Id'].to_resource_name @environment = "" @payload = {}.to_json @ssm_parameters = [] end |
Instance Attribute Details
#cron ⇒ Object
Returns the value of attribute cron.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def cron @cron end |
#enabled ⇒ Object
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def enabled @enabled end |
#environment ⇒ Object
Returns the value of attribute environment.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def environment @environment end |
#group ⇒ Object
Returns the value of attribute group.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def group @group end |
#hash ⇒ Object
Returns the value of attribute hash.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def hash @hash end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def name @name end |
#payload ⇒ Object
Returns the value of attribute payload.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def payload @payload end |
#resource ⇒ Object
Returns the value of attribute resource.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def resource @resource end |
#ssm_parameters ⇒ Object
Returns the value of attribute ssm_parameters.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def ssm_parameters @ssm_parameters end |
#target ⇒ Object
Returns the value of attribute target.
8 9 10 |
# File 'lib/cfnguardian/models/event.rb', line 8 def target @target end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/cfnguardian/models/event.rb', line 7 def type @type end |