Class: CfnGuardian::Models::TLSEvent
- 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
-
#initialize(resource) ⇒ TLSEvent
constructor
A new instance of TLSEvent.
- #payload ⇒ Object
Constructor Details
#initialize(resource) ⇒ TLSEvent
Returns a new instance of TLSEvent.
329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/cfnguardian/models/event.rb', line 329 def initialize(resource) super(resource) @group = 'TLS' @name = 'TLSEvent' @target = 'TLSCheckFunction' @cron = resource.fetch('Schedule', "0/5 * * * ? *") @host = resource['Id'] @port = resource.fetch('Port', 443) @check_max = resource.fetch('MaxSupported', nil) @versions = resource.fetch('Versions', ['SSLv2','SSLv3','TLSv1','TLSv1.1','TLSv1.2']) end |
Instance Method Details
#payload ⇒ Object
341 342 343 344 345 346 347 348 349 |
# File 'lib/cfnguardian/models/event.rb', line 341 def payload payload = { 'HOSTNAME' => @host, 'PORT' => @port } payload['CHECK_MAX_SUPPORTED'] = @check_max.nil? payload['PROTOCOLS'] = @versions unless @versions.nil? return payload.to_json end |