Class: CfnGuardian::Models::ContainerInstanceEvent

Inherits:
BaseEvent
  • Object
show all
Defined in:
lib/cfnguardian/models/event.rb

Instance Attribute Summary

Attributes inherited from BaseEvent

#cron, #enabled, #environment, #group, #hash, #name, #resource, #ssm_parameters, #target, #type

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ ContainerInstanceEvent

Returns a new instance of ContainerInstanceEvent.



260
261
262
263
264
265
266
267
# File 'lib/cfnguardian/models/event.rb', line 260

def initialize(resource)
  super(resource)
  @group = 'ContainerInstance'
  @name = 'ContainerInstanceEvent'
  @target = 'ContainerInstanceCheckFunction'
  @cron = resource.fetch('Schedule', "0/5 * * * ? *")
  @cluster = resource['Id']
end

Instance Method Details

#payloadObject



269
270
271
# File 'lib/cfnguardian/models/event.rb', line 269

def payload
  return {'CLUSTER' => @cluster}.to_json
end