Class LogStream.Builder
java.lang.Object
software.amazon.awscdk.services.logs.LogStream.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LogStream>
- Enclosing class:
LogStream
@Stability(Stable)
public static final class LogStream.Builder
extends Object
implements software.amazon.jsii.Builder<LogStream>
A fluent builder for
LogStream
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static LogStream.Builder
The log group to create a log stream for.logStreamName
(String logStreamName) The name of the log stream to create.removalPolicy
(RemovalPolicy removalPolicy) Determine what happens when the log stream resource is removed from the app.
-
Method Details
-
create
@Stability(Stable) public static LogStream.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
LogStream.Builder
.
-
logGroup
The log group to create a log stream for.- Parameters:
logGroup
- The log group to create a log stream for. This parameter is required.- Returns:
this
-
logStreamName
The name of the log stream to create.The name must be unique within the log group.
Default: Automatically generated
- Parameters:
logStreamName
- The name of the log stream to create. This parameter is required.- Returns:
this
-
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.
Default: RemovalPolicy.Retain
- Parameters:
removalPolicy
- Determine what happens when the log stream resource is removed from the app. This parameter is required.- Returns:
this
-
build
-