Class FireLensLogDriverProps
Specifies the firelens log driver configuration options.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class FireLensLogDriverProps : Object, IFireLensLogDriverProps, IBaseLogDriverProps
Syntax (vb)
Public Class FireLensLogDriverProps
Inherits Object
Implements IFireLensLogDriverProps, IBaseLogDriverProps
Remarks
ExampleMetadata: infused
Examples
// Create a Task Definition for the container to start
var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("example-image"),
MemoryLimitMiB = 256,
Logging = LogDrivers.Firelens(new FireLensLogDriverProps {
Options = new Dictionary<string, string> {
{ "Name", "firehose" },
{ "region", "us-west-2" },
{ "delivery_stream", "my-stream" }
}
})
});
Synopsis
Constructors
FireLensLogDriverProps() |
Properties
Env | The env option takes an array of keys. |
EnvRegex | The env-regex option is similar to and compatible with env. |
Labels | The labels option takes an array of keys. |
Options | The configuration options to send to the log driver. |
SecretOptions | The secrets to pass to the log configuration. |
Tag | By default, Docker uses the first 12 characters of the container ID to tag log messages. |
Constructors
FireLensLogDriverProps()
public FireLensLogDriverProps()
Properties
Env
The env option takes an array of keys.
public string[] Env { get; set; }
Property Value
System.String[]
Remarks
If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
Default: - No env
EnvRegex
The env-regex option is similar to and compatible with env.
public string EnvRegex { get; set; }
Property Value
System.String
Remarks
Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
Default: - No envRegex
Labels
The labels option takes an array of keys.
public string[] Labels { get; set; }
Property Value
System.String[]
Remarks
If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
Default: - No labels
Options
The configuration options to send to the log driver.
public IDictionary<string, string> Options { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - the log driver options
SecretOptions
The secrets to pass to the log configuration.
public IDictionary<string, Secret> SecretOptions { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, Secret>
Remarks
Default: - No secret options provided.
Tag
By default, Docker uses the first 12 characters of the container ID to tag log messages.
public string Tag { get; set; }
Property Value
System.String
Remarks
Refer to the log tag option documentation for customizing the log tag format.
Default: - The first 12 characters of the container ID