Class JsonFileLogDriverProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.JsonFileLogDriverProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<JsonFileLogDriverProps>
- Enclosing interface:
JsonFileLogDriverProps
@Stability(Stable)
public static final class JsonFileLogDriverProps.Builder
extends Object
implements software.amazon.jsii.Builder<JsonFileLogDriverProps>
A builder for
JsonFileLogDriverProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofJsonFileLogDriverProps.getCompress()
Sets the value ofBaseLogDriverProps.getEnv()
Sets the value ofBaseLogDriverProps.getEnvRegex()
Sets the value ofBaseLogDriverProps.getLabels()
Sets the value ofJsonFileLogDriverProps.getMaxFile()
Sets the value ofJsonFileLogDriverProps.getMaxSize()
Sets the value ofBaseLogDriverProps.getTag()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
compress
Sets the value ofJsonFileLogDriverProps.getCompress()
- Parameters:
compress
- Toggles compression for rotated logs.- Returns:
this
-
maxFile
Sets the value ofJsonFileLogDriverProps.getMaxFile()
- Parameters:
maxFile
- The maximum number of log files that can be present. If rolling the logs creates excess files, the oldest file is removed. Only effective when max-size is also set. A positive integer.- Returns:
this
-
maxSize
Sets the value ofJsonFileLogDriverProps.getMaxSize()
- Parameters:
maxSize
- The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure (k, m, or g).- 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<JsonFileLogDriverProps>
- Returns:
- a new instance of
JsonFileLogDriverProps
- Throws:
NullPointerException
- if any required attribute was not provided
-