Skip to content
v2.278.0

FirelensOptions Struct ​

The options for firelens log router https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef-customconfig.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const firelensOptions: ecs.FirelensOptions = {
  configFileType: ecs.FirelensConfigFileType.S3,
  configFileValue: 'configFileValue',
  enableECSLogMetadata: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

firelens_options = ecs.FirelensOptions(
    config_file_type=ecs.FirelensConfigFileType.S3,
    config_file_value="configFileValue",
    enable_ecs_log_metadata=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

FirelensOptions firelensOptions = FirelensOptions.builder()
        .configFileType(FirelensConfigFileType.S3)
        .configFileValue("configFileValue")
        .enableECSLogMetadata(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var firelensOptions = new FirelensOptions {
    ConfigFileType = FirelensConfigFileType.S3,
    ConfigFileValue = "configFileValue",
    EnableECSLogMetadata = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

firelensOptions := &FirelensOptions{
	ConfigFileType: awscdk.Aws_ecs.FirelensConfigFileType_S3,
	ConfigFileValue: jsii.String("configFileValue"),
	EnableECSLogMetadata: jsii.Boolean(false),
}

Properties ​

configFileTypeoptionalFirelensConfigFileTypeconfig_file_typeoptionalFirelensConfigFileTypeconfigFileTypeoptionalFirelensConfigFileTypeConfigFileTypeoptionalFirelensConfigFileTypeConfigFileTypeoptionalFirelensConfigFileType #
Custom configuration file, s3 or file.

Default: determined by checking configFileValue with S3 ARN.

Both configFileType and configFileValue must be used together to define a custom configuration source.

configFileValueoptionalstringconfig_file_valueoptionalstrconfigFileValueoptionalStringConfigFileValueoptionalstringConfigFileValueoptional*string #
Custom configuration file, S3 ARN or a file path Both configFileType and configFileValue must be used together to define a custom configuration source.

Default: no config file value

enableECSLogMetadataoptionalbooleanenable_ecs_log_metadataoptionalboolenableECSLogMetadataoptionalBooleanEnableECSLogMetadataoptionalboolEnableECSLogMetadataoptional*bool = 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.