class CfnGuardian::Models::PortEvent

Public Class Methods

new(resource) click to toggle source
Calls superclass method CfnGuardian::Models::BaseEvent::new
# File lib/cfnguardian/models/event.rb, line 85
def initialize(resource)
  super(resource)
  @group = 'Port'
  @name = 'PortEvent'
  @target = 'PortCheckFunction'
  @hostname = resource['Id']
  @port = resource['Port']
  @timeout = resource.fetch('Timeout',120)
end

Public Instance Methods

payload() click to toggle source
# File lib/cfnguardian/models/event.rb, line 95
def payload
  return {
    'HOSTNAME' => @hostname,
    'PORT' => @port,
    'TIMEOUT' => @timeout,
    'STATUS_CODE_MATCH' => @status_code
  }.to_json
end