Class GelfLogDriverProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.GelfLogDriverProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GelfLogDriverProps>
- Enclosing interface:
GelfLogDriverProps
@Stability(Stable)
public static final class GelfLogDriverProps.Builder
extends Object
implements software.amazon.jsii.Builder<GelfLogDriverProps>
A builder for
GelfLogDriverProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofGelfLogDriverProps.getAddress()
build()
Builds the configured instance.compressionLevel
(Number compressionLevel) Sets the value ofGelfLogDriverProps.getCompressionLevel()
compressionType
(GelfCompressionType compressionType) Sets the value ofGelfLogDriverProps.getCompressionType()
Sets the value ofBaseLogDriverProps.getEnv()
Sets the value ofBaseLogDriverProps.getEnvRegex()
Sets the value ofBaseLogDriverProps.getLabels()
Sets the value ofBaseLogDriverProps.getTag()
tcpMaxReconnect
(Number tcpMaxReconnect) Sets the value ofGelfLogDriverProps.getTcpMaxReconnect()
tcpReconnectDelay
(Duration tcpReconnectDelay) Sets the value ofGelfLogDriverProps.getTcpReconnectDelay()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
address
Sets the value ofGelfLogDriverProps.getAddress()
- Parameters:
address
- The address of the GELF server. This parameter is required. tcp and udp are the only supported URI specifier and you must specify the port.- Returns:
this
-
compressionLevel
Sets the value ofGelfLogDriverProps.getCompressionLevel()
- Parameters:
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.- Returns:
this
-
compressionType
@Stability(Stable) public GelfLogDriverProps.Builder compressionType(GelfCompressionType compressionType) Sets the value ofGelfLogDriverProps.getCompressionType()
- Parameters:
compressionType
- UDP Only The type of compression the GELF driver uses to compress each log message. Allowed values are gzip, zlib and none.- Returns:
this
-
tcpMaxReconnect
Sets the value ofGelfLogDriverProps.getTcpMaxReconnect()
- Parameters:
tcpMaxReconnect
- TCP Only The maximum number of reconnection attempts when the connection drop. A positive integer.- Returns:
this
-
tcpReconnectDelay
Sets the value ofGelfLogDriverProps.getTcpReconnectDelay()
- Parameters:
tcpReconnectDelay
- TCP Only The number of seconds to wait between reconnection attempts. A positive integer.- Returns:
this
-
env
Sets the value ofBaseLogDriverProps.getEnv()
- Parameters:
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.- Returns:
this
-
envRegex
Sets the value ofBaseLogDriverProps.getEnvRegex()
- Parameters:
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.- Returns:
this
-
labels
Sets the value ofBaseLogDriverProps.getLabels()
- Parameters:
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.- Returns:
this
-
tag
Sets the value ofBaseLogDriverProps.getTag()
- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GelfLogDriverProps>
- Returns:
- a new instance of
GelfLogDriverProps
- Throws:
NullPointerException
- if any required attribute was not provided
-