Interface LogStreamProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LogStreamProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.110Z") @Stability(Stable) public interface LogStreamProps extends software.amazon.jsii.JsiiSerializable
Properties for a LogStream.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.logs.*;
 import software.amazon.awscdk.core.*;
 LogGroup logGroup;
 LogStreamProps logStreamProps = LogStreamProps.builder()
         .logGroup(logGroup)
         // the properties below are optional
         .logStreamName("logStreamName")
         .removalPolicy(RemovalPolicy.DESTROY)
         .build();
 
  • Method Details

    • getLogGroup

      @Stability(Stable) @NotNull ILogGroup getLogGroup()
      The log group to create a log stream for.
    • getLogStreamName

      @Stability(Stable) @Nullable default String getLogStreamName()
      The name of the log stream to create.

      The name must be unique within the log group.

      Default: Automatically generated

    • getRemovalPolicy

      @Stability(Stable) @Nullable default RemovalPolicy getRemovalPolicy()
      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.

      Default: RemovalPolicy.Retain

    • builder

      @Stability(Stable) static LogStreamProps.Builder builder()
      Returns:
      a LogStreamProps.Builder of LogStreamProps