Class: AWSCDK::EventsTargets::LogGroupTargetInputOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EventsTargets::LogGroupTargetInputOptions
- Defined in:
- events_targets/log_group_target_input_options.rb
Overview
Options used when creating a target input template.
Instance Attribute Summary collapse
-
#message ⇒ Object?
readonly
The value provided here will be used in the Log "message" field.
-
#timestamp ⇒ Object?
readonly
The timestamp that will appear in the CloudWatch Logs record.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message: nil, timestamp: nil) ⇒ LogGroupTargetInputOptions
constructor
A new instance of LogGroupTargetInputOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(message: nil, timestamp: nil) ⇒ LogGroupTargetInputOptions
Returns a new instance of LogGroupTargetInputOptions.
9 10 11 12 13 14 |
# File 'events_targets/log_group_target_input_options.rb', line 9 def initialize(message: nil, timestamp: nil) @message = Jsii::Type.check_type(@message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "message") unless @message.nil? @timestamp = Jsii::Type.check_type(@timestamp, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "timestamp") unless @timestamp.nil? end |
Instance Attribute Details
#message ⇒ Object? (readonly)
Default: EventField.detailType
The value provided here will be used in the Log "message" field.
This field must be a string. If an object is passed (e.g. JSON data)
it will not throw an error, but the message that makes it to
CloudWatch logs will be incorrect. This is a likely scenario if
doing something like: EventField.fromPath('$.detail') since in most cases
the detail field contains JSON data.
26 27 28 |
# File 'events_targets/log_group_target_input_options.rb', line 26 def @message end |
#timestamp ⇒ Object? (readonly)
Default: EventField.time
The timestamp that will appear in the CloudWatch Logs record.
31 32 33 |
# File 'events_targets/log_group_target_input_options.rb', line 31 def @timestamp end |
Class Method Details
.jsii_properties ⇒ Object
33 34 35 36 37 38 |
# File 'events_targets/log_group_target_input_options.rb', line 33 def self.jsii_properties { :message => "message", :timestamp => "timestamp", } end |
Instance Method Details
#to_jsii ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'events_targets/log_group_target_input_options.rb', line 40 def to_jsii result = {} result.merge!({ "message" => @message, "timestamp" => @timestamp, }) result.compact end |