Class: AWSCDK::Batch::CfnJobDefinition::FirelensConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/cfn_job_definition.rb

Overview

The FireLens configuration for the container.

This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, options: nil) ⇒ FirelensConfigurationProperty

Returns a new instance of FirelensConfigurationProperty.

Parameters:

  • type (String)

    The log router to use.

  • options (AWSCDK::IResolvable, Hash{String => String}, nil) (defaults to: nil)

    The options to use when configuring the log router.



2153
2154
2155
2156
2157
2158
# File 'batch/cfn_job_definition.rb', line 2153

def initialize(type:, options: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @options = options
  Jsii::Type.check_type(@options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "options") unless @options.nil?
end

Instance Attribute Details

#optionsAWSCDK::IResolvable, ... (readonly)

The options to use when configuring the log router.

This field is optional and can be used to specify a custom configuration file or to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event. If specified, the syntax to use is "options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"} . For more information, see Creating a task definition that uses a FireLens configuration in the Amazon Elastic Container Service Developer Guide .



2173
2174
2175
# File 'batch/cfn_job_definition.rb', line 2173

def options
  @options
end

#typeString (readonly)

The log router to use.

The valid values are fluentd or fluentbit .



2166
2167
2168
# File 'batch/cfn_job_definition.rb', line 2166

def type
  @type
end

Class Method Details

.jsii_propertiesObject



2175
2176
2177
2178
2179
2180
# File 'batch/cfn_job_definition.rb', line 2175

def self.jsii_properties
  {
    :type => "type",
    :options => "options",
  }
end

Instance Method Details

#to_jsiiObject



2182
2183
2184
2185
2186
2187
2188
2189
# File 'batch/cfn_job_definition.rb', line 2182

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "options" => @options,
  })
  result.compact
end