Class AwsLogDriverProps.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • streamPrefix

      @Stability(Stable) public AwsLogDriverProps.Builder streamPrefix(String streamPrefix)
      Parameters:
      streamPrefix - Prefix for the log streams. This parameter is required. The awslogs-stream-prefix option allows you to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task to which the container belongs. If you specify a prefix with this option, then the log stream takes the following format:

                           prefix-name/container-name/ecs-task-id
                           
      Returns:
      this
    • datetimeFormat

      @Stability(Stable) public AwsLogDriverProps.Builder datetimeFormat(String datetimeFormat)
      Parameters:
      datetimeFormat - This option defines a multiline start pattern in Python strftime format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. Thus the matched line is the delimiter between log messages.
      Returns:
      this
    • logGroup

      @Stability(Stable) public AwsLogDriverProps.Builder logGroup(ILogGroup logGroup)
      Parameters:
      logGroup - The log group to log to.
      Returns:
      this
    • logRetention

      @Stability(Stable) public AwsLogDriverProps.Builder logRetention(RetentionDays logRetention)
      Parameters:
      logRetention - The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct.
      Returns:
      this
    • maxBufferSize

      @Stability(Stable) public AwsLogDriverProps.Builder maxBufferSize(Size maxBufferSize)
      Parameters:
      maxBufferSize - When AwsLogDriverMode.NON_BLOCKING is configured, this parameter controls the size of the non-blocking buffer used to temporarily store messages. This parameter is not valid with AwsLogDriverMode.BLOCKING.
      Returns:
      this
    • mode

      @Stability(Stable) public AwsLogDriverProps.Builder mode(AwsLogDriverMode mode)
      Sets the value of AwsLogDriverProps.getMode()
      Parameters:
      mode - The delivery mode of log messages from the container to awslogs.
      Returns:
      this
    • multilinePattern

      @Stability(Stable) public AwsLogDriverProps.Builder multilinePattern(String multilinePattern)
      Parameters:
      multilinePattern - This option defines a multiline start pattern using a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. Thus the matched line is the delimiter between log messages.

      This option is ignored if datetimeFormat is also configured.

      Returns:
      this
    • build

      @Stability(Stable) public AwsLogDriverProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<AwsLogDriverProps>
      Returns:
      a new instance of AwsLogDriverProps
      Throws:
      NullPointerException - if any required attribute was not provided