Class GelfLogDriver.Builder

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

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

    • create

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

      @Stability(Stable) public GelfLogDriver.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 GelfLogDriver.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 GelfLogDriver.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 GelfLogDriver.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 GelfLogDriver.Builder address(String address)
      The address of the GELF server.

      tcp and udp are the only supported URI specifier and you must specify the port.

      Parameters:
      address - The address of the GELF server. This parameter is required.
      Returns:
      this
    • compressionLevel

      @Stability(Stable) public GelfLogDriver.Builder compressionLevel(Number compressionLevel)
      UDP Only The level of compression when gzip or zlib is the gelf-compression-type.

      An integer in the range of -1 to 9 (BestCompression). Higher levels provide more compression at lower speed. Either -1 or 0 disables compression.

      Default: - 1

      Parameters:
      compressionLevel - UDP Only The level of compression when gzip or zlib is the gelf-compression-type. This parameter is required.
      Returns:
      this
    • compressionType

      @Stability(Stable) public GelfLogDriver.Builder compressionType(GelfCompressionType compressionType)
      UDP Only The type of compression the GELF driver uses to compress each log message.

      Allowed values are gzip, zlib and none.

      Default: - gzip

      Parameters:
      compressionType - UDP Only The type of compression the GELF driver uses to compress each log message. This parameter is required.
      Returns:
      this
    • tcpMaxReconnect

      @Stability(Stable) public GelfLogDriver.Builder tcpMaxReconnect(Number tcpMaxReconnect)
      TCP Only The maximum number of reconnection attempts when the connection drop.

      A positive integer.

      Default: - 3

      Parameters:
      tcpMaxReconnect - TCP Only The maximum number of reconnection attempts when the connection drop. This parameter is required.
      Returns:
      this
    • tcpReconnectDelay

      @Stability(Stable) public GelfLogDriver.Builder tcpReconnectDelay(Duration tcpReconnectDelay)
      TCP Only The number of seconds to wait between reconnection attempts.

      A positive integer.

      Default: - 1

      Parameters:
      tcpReconnectDelay - TCP Only The number of seconds to wait between reconnection attempts. This parameter is required.
      Returns:
      this
    • build

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