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.



274
275
276
277
278
279
280
281
# File 'lib/cfnguardian/models/event.rb', line 274

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



283
284
285
# File 'lib/cfnguardian/models/event.rb', line 283

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