Class: AWSCDK::Logs::CfnTransformer::GrokProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Logs::CfnTransformer::GrokProperty
- Defined in:
- logs/cfn_transformer.rb
Overview
This processor uses pattern matching to parse and structure unstructured data.
This processor can also extract fields from log messages.
For more information about this processor including examples, see grok in the CloudWatch Logs User Guide .
Instance Attribute Summary collapse
-
#match ⇒ String
readonly
The grok pattern to match against the log event.
-
#source ⇒ String?
readonly
The path to the field in the log event that you want to parse.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(match:, source: nil) ⇒ GrokProperty
constructor
A new instance of GrokProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(match:, source: nil) ⇒ GrokProperty
Returns a new instance of GrokProperty.
917 918 919 920 921 922 |
# File 'logs/cfn_transformer.rb', line 917 def initialize(match:, source: nil) @match = match Jsii::Type.check_type(@match, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "match") @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") unless @source.nil? end |
Instance Attribute Details
#match ⇒ String (readonly)
The grok pattern to match against the log event.
For a list of supported grok patterns, see Supported grok patterns .
930 931 932 |
# File 'logs/cfn_transformer.rb', line 930 def match @match end |
#source ⇒ String? (readonly)
The path to the field in the log event that you want to parse.
If you omit this value, the whole log message is parsed.
937 938 939 |
# File 'logs/cfn_transformer.rb', line 937 def source @source end |
Class Method Details
.jsii_properties ⇒ Object
939 940 941 942 943 944 |
# File 'logs/cfn_transformer.rb', line 939 def self.jsii_properties { :match => "match", :source => "source", } end |
Instance Method Details
#to_jsii ⇒ Object
946 947 948 949 950 951 952 953 |
# File 'logs/cfn_transformer.rb', line 946 def to_jsii result = {} result.merge!({ "match" => @match, "source" => @source, }) result.compact end |