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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofLogStreamProps.getLogGroup()
logStreamName
(String logStreamName) Sets the value ofLogStreamProps.getLogStreamName()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofLogStreamProps.getRemovalPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logGroup
Sets the value ofLogStreamProps.getLogGroup()
- Parameters:
logGroup
- The log group to create a log stream for. This parameter is required.- Returns:
this
-
logStreamName
Sets the value ofLogStreamProps.getLogStreamName()
- Parameters:
logStreamName
- The name of the log stream to create. The name must be unique within the log group.- Returns:
this
-
removalPolicy
Sets the value ofLogStreamProps.getRemovalPolicy()
- 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
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LogStreamProps>
- Returns:
- a new instance of
LogStreamProps
- Throws:
NullPointerException
- if any required attribute was not provided
-