Class: CfnGuardian::Models::WebSocketEvent

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

Instance Attribute Summary collapse

Attributes inherited from BaseEvent

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

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ WebSocketEvent

Returns a new instance of WebSocketEvent.



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/cfnguardian/models/event.rb', line 84

def initialize(resource)
  super(resource)
  @group = 'WebSocket'
  @name = 'WebSocketEvent'
  @target = 'WebSocketCheckFunction'
  @endpoint = resource['Id']
  @message = resource.fetch('Message',nil)
  @expected_response = resource.fetch('Expected_Response',nil)
  @timeout = resource.fetch('Timeout',30)
  @payload = resource.fetch('Payload',nil)
end

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



78
79
80
# File 'lib/cfnguardian/models/event.rb', line 78

def endpoint
  @endpoint
end

#expected_responseObject

Returns the value of attribute expected_response.



78
79
80
# File 'lib/cfnguardian/models/event.rb', line 78

def expected_response
  @expected_response
end

#messageObject

Returns the value of attribute message.



78
79
80
# File 'lib/cfnguardian/models/event.rb', line 78

def message
  @message
end

#payloadObject

Returns the value of attribute payload.



78
79
80
# File 'lib/cfnguardian/models/event.rb', line 78

def payload
  @payload
end

#timeoutObject

Returns the value of attribute timeout.



78
79
80
# File 'lib/cfnguardian/models/event.rb', line 78

def timeout
  @timeout
end