Class LogStreamProps.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • logGroup

      @Stability(Stable) public LogStreamProps.Builder logGroup(ILogGroup logGroup)
      Parameters:
      logGroup - The log group to create a log stream for. This parameter is required.
      Returns:
      this
    • logStreamName

      @Stability(Stable) public LogStreamProps.Builder logStreamName(String logStreamName)
      Parameters:
      logStreamName - The name of the log stream to create. The name must be unique within the log group.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public LogStreamProps.Builder removalPolicy(RemovalPolicy removalPolicy)
      Parameters:
      removalPolicy - Determine what happens when the log stream resource is removed from the app. Normally you want to retain the log stream so you can diagnose issues from logs even after a deployment that no longer includes the log stream.

      The date-based retention policy of your log group will age out the logs after a certain time.

      Returns:
      this
    • build

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