class CfnGuardian::Models::NrpeEvent
Public Class Methods
new(resource,environment,command)
click to toggle source
Calls superclass method
CfnGuardian::Models::BaseEvent::new
# File lib/cfnguardian/models/event.rb, line 116 def initialize(resource,environment,command) super(resource) @group = 'Nrpe' @name = 'NrpeEvent' @target = "NrpeCheckFunction#{environment}" @host = resource['Id'] @environment = environment @region = resource.fetch('Region',"${AWS::Region}") @hash = Digest::MD5.hexdigest "#{resource['Id']}#{command}" @command = command end
Public Instance Methods
payload()
click to toggle source
# File lib/cfnguardian/models/event.rb, line 128 def payload return { 'host' => @host, 'environment' => @environment, 'region' => @region, 'cmd' => @command }.to_json end