Class: CfnGuardian::Models::HttpEvent
- Defined in:
- lib/cfnguardian/models/event.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body_regex ⇒ Object
Returns the value of attribute body_regex.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#method ⇒ Object
Returns the value of attribute method.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Attributes inherited from BaseEvent
#cron, #enabled, #environment, #group, #hash, #name, #resource, #ssm_parameters, #target, #type
Instance Method Summary collapse
-
#initialize(resource) ⇒ HttpEvent
constructor
A new instance of HttpEvent.
Constructor Details
#initialize(resource) ⇒ HttpEvent
Returns a new instance of HttpEvent.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/cfnguardian/models/event.rb', line 44 def initialize(resource) super(resource) @group = 'Http' @name = 'HttpEvent' @target = 'HttpCheckFunction' @endpoint = resource['Id'] @method = resource.fetch('Method','GET') @timeout = resource.fetch('Timeout',50) @status_code = resource.fetch('StatusCode',200) @body_regex = resource.fetch('BodyRegex',nil) @headers = resource.fetch('Headers',nil) @user_agent = resource.fetch('UserAgent',nil) @payload = resource.fetch('Payload',nil) @compressed = resource.fetch('Compressed',false) end |
Instance Attribute Details
#body_regex ⇒ Object
Returns the value of attribute body_regex.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def body_regex @body_regex end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def endpoint @endpoint end |
#headers ⇒ Object
Returns the value of attribute headers.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def headers @headers end |
#method ⇒ Object
Returns the value of attribute method.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def method @method end |
#payload ⇒ Object
Returns the value of attribute payload.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def payload @payload end |
#status_code ⇒ Object
Returns the value of attribute status_code.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def status_code @status_code end |
#timeout ⇒ Object
Returns the value of attribute timeout.
36 37 38 |
# File 'lib/cfnguardian/models/event.rb', line 36 def timeout @timeout end |