Show / Hide Table of Contents

Interface IGenericLogDriverProps

The configuration to use when creating a log driver.

Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGenericLogDriverProps
Syntax (vb)
Public Interface IGenericLogDriverProps
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 = new GenericLogDriver(new GenericLogDriverProps {
                    LogDriver = "fluentd",
                    Options = new Dictionary<string, string> {
                        { "tag", "example-tag" }
                    }
                })
            });

Synopsis

Properties

LogDriver

The log driver to use for the container.

Options

The configuration options to send to the log driver.

SecretOptions

The secrets to pass to the log configuration.

Properties

LogDriver

The log driver to use for the container.

string LogDriver { get; }
Property Value

string

Remarks

The valid values listed for this parameter are log drivers that the Amazon ECS container agent can communicate with by default.

For tasks using the Fargate launch type, the supported log drivers are awslogs and splunk. For tasks using the EC2 launch type, the supported log drivers are awslogs, syslog, gelf, fluentd, splunk, journald, and json-file.

For more information about using the awslogs log driver, see Using the awslogs Log Driver in the Amazon Elastic Container Service Developer Guide.

Options

The configuration options to send to the log driver.

IDictionary<string, string>? Options { get; }
Property Value

IDictionary<string, string>

Remarks

Default: - the log driver options.

SecretOptions

The secrets to pass to the log configuration.

IDictionary<string, Secret>? SecretOptions { get; }
Property Value

IDictionary<string, Secret>

Remarks

Default: - no secret options provided.

Back to top Generated by DocFX