Class: AWSCDK::Logs::CfnTransformer::DateTimeConverterProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Logs::CfnTransformer::DateTimeConverterProperty
- Defined in:
- logs/cfn_transformer.rb
Overview
This processor converts a datetime string into a format that you specify.
For more information about this processor including examples, see datetimeConverter in the CloudWatch Logs User Guide .
Instance Attribute Summary collapse
-
#locale ⇒ String?
readonly
The locale of the source field.
-
#match_patterns ⇒ Array<String>
readonly
A list of patterns to match against the
sourcefield. -
#source ⇒ String
readonly
The key to apply the date conversion to.
-
#source_timezone ⇒ String?
readonly
The time zone of the source field.
-
#target ⇒ String
readonly
The JSON field to store the result in.
-
#target_format ⇒ String?
readonly
The datetime format to use for the converted data in the target field.
-
#target_timezone ⇒ String?
readonly
The time zone of the target field.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(match_patterns:, source:, target:, locale: nil, source_timezone: nil, target_format: nil, target_timezone: nil) ⇒ DateTimeConverterProperty
constructor
A new instance of DateTimeConverterProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(match_patterns:, source:, target:, locale: nil, source_timezone: nil, target_format: nil, target_timezone: nil) ⇒ DateTimeConverterProperty
Returns a new instance of DateTimeConverterProperty.
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'logs/cfn_transformer.rb', line 782 def initialize(match_patterns:, source:, target:, locale: nil, source_timezone: nil, target_format: nil, target_timezone: nil) @match_patterns = match_patterns Jsii::Type.check_type(@match_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "matchPatterns") @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") @target = target Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "target") @locale = locale Jsii::Type.check_type(@locale, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "locale") unless @locale.nil? @source_timezone = source_timezone Jsii::Type.check_type(@source_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceTimezone") unless @source_timezone.nil? @target_format = target_format Jsii::Type.check_type(@target_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetFormat") unless @target_format.nil? @target_timezone = target_timezone Jsii::Type.check_type(@target_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetTimezone") unless @target_timezone.nil? end |
Instance Attribute Details
#locale ⇒ String? (readonly)
The locale of the source field.
If you omit this, the default of locale.ROOT is used.
820 821 822 |
# File 'logs/cfn_transformer.rb', line 820 def locale @locale end |
#match_patterns ⇒ Array<String> (readonly)
A list of patterns to match against the source field.
803 804 805 |
# File 'logs/cfn_transformer.rb', line 803 def match_patterns @match_patterns end |
#source ⇒ String (readonly)
The key to apply the date conversion to.
808 809 810 |
# File 'logs/cfn_transformer.rb', line 808 def source @source end |
#source_timezone ⇒ String? (readonly)
The time zone of the source field.
If you omit this, the default used is the UTC zone.
827 828 829 |
# File 'logs/cfn_transformer.rb', line 827 def source_timezone @source_timezone end |
#target ⇒ String (readonly)
The JSON field to store the result in.
813 814 815 |
# File 'logs/cfn_transformer.rb', line 813 def target @target end |
#target_format ⇒ String? (readonly)
The datetime format to use for the converted data in the target field.
If you omit this, the default of yyyy-MM-dd'T'HH:mm:ss.SSS'Z is used.
834 835 836 |
# File 'logs/cfn_transformer.rb', line 834 def target_format @target_format end |
#target_timezone ⇒ String? (readonly)
The time zone of the target field.
If you omit this, the default used is the UTC zone.
841 842 843 |
# File 'logs/cfn_transformer.rb', line 841 def target_timezone @target_timezone end |
Class Method Details
.jsii_properties ⇒ Object
843 844 845 846 847 848 849 850 851 852 853 |
# File 'logs/cfn_transformer.rb', line 843 def self.jsii_properties { :match_patterns => "matchPatterns", :source => "source", :target => "target", :locale => "locale", :source_timezone => "sourceTimezone", :target_format => "targetFormat", :target_timezone => "targetTimezone", } end |
Instance Method Details
#to_jsii ⇒ Object
855 856 857 858 859 860 861 862 863 864 865 866 867 |
# File 'logs/cfn_transformer.rb', line 855 def to_jsii result = {} result.merge!({ "matchPatterns" => @match_patterns, "source" => @source, "target" => @target, "locale" => @locale, "sourceTimezone" => @source_timezone, "targetFormat" => @target_format, "targetTimezone" => @target_timezone, }) result.compact end |