Class: AWSCDK::ECS::FirelensOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::FirelensOptions
- Defined in:
- ecs/firelens_options.rb
Overview
The options for firelens log router https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef-customconfig.
Instance Attribute Summary collapse
-
#config_file_type ⇒ AWSCDK::ECS::FirelensConfigFileType?
readonly
Custom configuration file, s3 or file.
-
#config_file_value ⇒ String?
readonly
Custom configuration file, S3 ARN or a file path Both configFileType and configFileValue must be used together to define a custom configuration source.
-
#enable_ecs_log_metadata ⇒ Boolean?
readonly
By default, Amazon ECS adds additional fields in your log entries that help identify the source of the logs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config_file_type: nil, config_file_value: nil, enable_ecs_log_metadata: nil) ⇒ FirelensOptions
constructor
A new instance of FirelensOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(config_file_type: nil, config_file_value: nil, enable_ecs_log_metadata: nil) ⇒ FirelensOptions
Returns a new instance of FirelensOptions.
10 11 12 13 14 15 16 17 |
# File 'ecs/firelens_options.rb', line 10 def initialize(config_file_type: nil, config_file_value: nil, enable_ecs_log_metadata: nil) @config_file_type = config_file_type Jsii::Type.check_type(@config_file_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkZpcmVsZW5zQ29uZmlnRmlsZVR5cGUifQ==")), "configFileType") unless @config_file_type.nil? @config_file_value = config_file_value Jsii::Type.check_type(@config_file_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "configFileValue") unless @config_file_value.nil? @enable_ecs_log_metadata = Jsii::Type.check_type(@enable_ecs_log_metadata, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableECSLogMetadata") unless @enable_ecs_log_metadata.nil? end |
Instance Attribute Details
#config_file_type ⇒ AWSCDK::ECS::FirelensConfigFileType? (readonly)
Default: - determined by checking configFileValue with S3 ARN.
Custom configuration file, s3 or file.
Both configFileType and configFileValue must be used together to define a custom configuration source.
26 27 28 |
# File 'ecs/firelens_options.rb', line 26 def config_file_type @config_file_type end |
#config_file_value ⇒ String? (readonly)
Default: - no config file value
Custom configuration file, S3 ARN or a file path Both configFileType and configFileValue must be used together to define a custom configuration source.
31 32 33 |
# File 'ecs/firelens_options.rb', line 31 def config_file_value @config_file_value end |
#enable_ecs_log_metadata ⇒ Boolean? (readonly)
Default: - true
By default, Amazon ECS adds additional fields in your log entries that help identify the source of the logs.
You can disable this action by setting enable-ecs-log-metadata to false.
38 39 40 |
# File 'ecs/firelens_options.rb', line 38 def @enable_ecs_log_metadata end |
Class Method Details
.jsii_properties ⇒ Object
40 41 42 43 44 45 46 |
# File 'ecs/firelens_options.rb', line 40 def self.jsii_properties { :config_file_type => "configFileType", :config_file_value => "configFileValue", :enable_ecs_log_metadata => "enableECSLogMetadata", } end |
Instance Method Details
#to_jsii ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'ecs/firelens_options.rb', line 48 def to_jsii result = {} result.merge!({ "configFileType" => @config_file_type, "configFileValue" => @config_file_value, "enableECSLogMetadata" => @enable_ecs_log_metadata, }) result.compact end |