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.



113
114
115
116
117
118
119
120
121
122
123
# File 'lib/cfnguardian/models/event.rb', line 113

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.



107
108
109
# File 'lib/cfnguardian/models/event.rb', line 107

def endpoint
  @endpoint
end

#expected_responseObject

Returns the value of attribute expected_response.



107
108
109
# File 'lib/cfnguardian/models/event.rb', line 107

def expected_response
  @expected_response
end

#messageObject

Returns the value of attribute message.



107
108
109
# File 'lib/cfnguardian/models/event.rb', line 107

def message
  @message
end

#payloadObject

Returns the value of attribute payload.



107
108
109
# File 'lib/cfnguardian/models/event.rb', line 107

def payload
  @payload
end

#timeoutObject

Returns the value of attribute timeout.



107
108
109
# File 'lib/cfnguardian/models/event.rb', line 107

def timeout
  @timeout
end