Class FluentdLogDriver.Builder

java.lang.Object
software.amazon.awscdk.services.ecs.FluentdLogDriver.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<FluentdLogDriver>
Enclosing class:
FluentdLogDriver

@Stability(Stable) public static final class FluentdLogDriver.Builder extends Object implements software.amazon.jsii.Builder<FluentdLogDriver>
A fluent builder for FluentdLogDriver.
  • Method Details

    • create

      @Stability(Stable) public static FluentdLogDriver.Builder create()
      Returns:
      a new instance of FluentdLogDriver.Builder.
    • env

      @Stability(Stable) public FluentdLogDriver.Builder env(List<String> env)
      The env option takes an array of keys.

      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

      Parameters:
      env - The env option takes an array of keys. This parameter is required.
      Returns:
      this
    • envRegex

      @Stability(Stable) public FluentdLogDriver.Builder envRegex(String envRegex)
      The env-regex option is similar to and compatible with env.

      Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.

      Default: - No envRegex

      Parameters:
      envRegex - The env-regex option is similar to and compatible with env. This parameter is required.
      Returns:
      this
    • labels

      @Stability(Stable) public FluentdLogDriver.Builder labels(List<String> labels)
      The labels option takes an array of keys.

      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

      Parameters:
      labels - The labels option takes an array of keys. This parameter is required.
      Returns:
      this
    • tag

      @Stability(Stable) public FluentdLogDriver.Builder tag(String tag)
      By default, Docker uses the first 12 characters of the container ID to tag log messages.

      Refer to the log tag option documentation for customizing the log tag format.

      Default: - The first 12 characters of the container ID

      Parameters:
      tag - By default, Docker uses the first 12 characters of the container ID to tag log messages. This parameter is required.
      Returns:
      this
    • address

      @Stability(Stable) public FluentdLogDriver.Builder address(String address)
      By default, the logging driver connects to localhost:24224.

      Supply the address option to connect to a different address. tcp(default) and unix sockets are supported.

      Default: - address not set.

      Parameters:
      address - By default, the logging driver connects to localhost:24224. This parameter is required.
      Returns:
      this
    • asyncConnect

      @Stability(Stable) public FluentdLogDriver.Builder asyncConnect(Boolean asyncConnect)
      Docker connects to Fluentd in the background.

      Messages are buffered until the connection is established.

      Default: - false

      Parameters:
      asyncConnect - Docker connects to Fluentd in the background. This parameter is required.
      Returns:
      this
    • bufferLimit

      @Stability(Stable) public FluentdLogDriver.Builder bufferLimit(Number bufferLimit)
      The amount of data to buffer before flushing to disk.

      Default: - The amount of RAM available to the container.

      Parameters:
      bufferLimit - The amount of data to buffer before flushing to disk. This parameter is required.
      Returns:
      this
    • maxRetries

      @Stability(Stable) public FluentdLogDriver.Builder maxRetries(Number maxRetries)
      The maximum number of retries.

      Default: - 4294967295 (2**32 - 1).

      Parameters:
      maxRetries - The maximum number of retries. This parameter is required.
      Returns:
      this
    • retryWait

      @Stability(Stable) public FluentdLogDriver.Builder retryWait(Duration retryWait)
      How long to wait between retries.

      Default: - 1 second

      Parameters:
      retryWait - How long to wait between retries. This parameter is required.
      Returns:
      this
    • subSecondPrecision

      @Stability(Stable) public FluentdLogDriver.Builder subSecondPrecision(Boolean subSecondPrecision)
      Generates event logs in nanosecond resolution.

      Default: - false

      Parameters:
      subSecondPrecision - Generates event logs in nanosecond resolution. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public FluentdLogDriver build()
      Specified by:
      build in interface software.amazon.jsii.Builder<FluentdLogDriver>
      Returns:
      a newly built instance of FluentdLogDriver.