Class: AWSCDK::Logs::SpaceDelimitedTextPattern
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Logs::SpaceDelimitedTextPattern
- Includes:
- IFilterPattern
- Defined in:
- logs/space_delimited_text_pattern.rb
Overview
Space delimited text pattern.
Class Method Summary collapse
-
.construct(columns) ⇒ AWSCDK::Logs::SpaceDelimitedTextPattern
Construct a new instance of a space delimited text pattern.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize(columns, restrictions) ⇒ SpaceDelimitedTextPattern
constructor
A new instance of SpaceDelimitedTextPattern.
- #log_pattern_string ⇒ String
-
#where_number(column_name, comparison, value) ⇒ AWSCDK::Logs::SpaceDelimitedTextPattern
Restrict where the pattern applies.
-
#where_string(column_name, comparison, value) ⇒ AWSCDK::Logs::SpaceDelimitedTextPattern
Restrict where the pattern applies.
Constructor Details
#initialize(columns, restrictions) ⇒ SpaceDelimitedTextPattern
Returns a new instance of SpaceDelimitedTextPattern.
11 12 13 14 15 16 |
# File 'logs/space_delimited_text_pattern.rb', line 11 def initialize(columns, restrictions) restrictions = restrictions.is_a?(Hash) ? restrictions.transform_values { |jsii_v0| jsii_v0.is_a?(Array) ? jsii_v0.map { |jsii_v1| jsii_v1.is_a?(Hash) ? ::AWSCDK::Logs::ColumnRestriction.new(**jsii_v1.transform_keys(&:to_sym)) : jsii_v1 } : jsii_v0 } : restrictions Jsii::Type.check_type(columns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "columns") Jsii::Type.check_type(restrictions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsiZnFuIjoiYXdzLWNkay1saWIuYXdzX2xvZ3MuQ29sdW1uUmVzdHJpY3Rpb24ifSwia2luZCI6ImFycmF5In19LCJraW5kIjoibWFwIn19")), "restrictions") Jsii::Object.instance_method(:initialize).bind(self).call(columns, restrictions) end |
Class Method Details
.construct(columns) ⇒ AWSCDK::Logs::SpaceDelimitedTextPattern
Construct a new instance of a space delimited text pattern.
Since this class must be public, we can't rely on the user only creating it through
the LogPattern.spaceDelimited() factory function. We must therefore validate the
argument in the constructor. Since we're returning a copy on every mutation, and we
don't want to re-validate the same things on every construction, we provide a limited
set of mutator functions and only validate the new data every time.
36 37 38 39 |
# File 'logs/space_delimited_text_pattern.rb', line 36 def self.construct(columns) Jsii::Type.check_type(columns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "columns") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_logs.SpaceDelimitedTextPattern", "construct", [columns]) end |
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 23 24 |
# File 'logs/space_delimited_text_pattern.rb', line 18 def self.jsii_overridable_methods { :log_pattern_string => { kind: :property, name: "logPatternString", is_optional: false }, :where_number => { kind: :method, name: "whereNumber", is_optional: false }, :where_string => { kind: :method, name: "whereString", is_optional: false }, } end |
Instance Method Details
#log_pattern_string ⇒ String
42 43 44 |
# File 'logs/space_delimited_text_pattern.rb', line 42 def log_pattern_string() jsii_get_property("logPatternString") end |
#where_number(column_name, comparison, value) ⇒ AWSCDK::Logs::SpaceDelimitedTextPattern
Restrict where the pattern applies.
52 53 54 55 56 57 |
# File 'logs/space_delimited_text_pattern.rb', line 52 def where_number(column_name, comparison, value) Jsii::Type.check_type(column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "columnName") Jsii::Type.check_type(comparison, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comparison") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") jsii_call_method("whereNumber", [column_name, comparison, value]) end |
#where_string(column_name, comparison, value) ⇒ AWSCDK::Logs::SpaceDelimitedTextPattern
Restrict where the pattern applies.
65 66 67 68 69 70 |
# File 'logs/space_delimited_text_pattern.rb', line 65 def where_string(column_name, comparison, value) Jsii::Type.check_type(column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "columnName") Jsii::Type.check_type(comparison, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comparison") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") jsii_call_method("whereString", [column_name, comparison, value]) end |