Class LogRetentionProps.Builder
java.lang.Object
software.amazon.awscdk.services.logs.LogRetentionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LogRetentionProps>
- Enclosing interface:
- LogRetentionProps
@Stability(Stable)
public static final class LogRetentionProps.Builder
extends Object
implements software.amazon.jsii.Builder<LogRetentionProps>
A builder for
LogRetentionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.logGroupName(String logGroupName) Sets the value ofLogRetentionProps.getLogGroupName()logGroupRegion(String logGroupRegion) Sets the value ofLogRetentionProps.getLogGroupRegion()logRetentionRetryOptions(LogRetentionRetryOptions logRetentionRetryOptions) Sets the value ofLogRetentionProps.getLogRetentionRetryOptions()retention(RetentionDays retention) Sets the value ofLogRetentionProps.getRetention()Sets the value ofLogRetentionProps.getRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logGroupName
Sets the value ofLogRetentionProps.getLogGroupName()- Parameters:
logGroupName- The log group name. This parameter is required.- Returns:
this
-
retention
Sets the value ofLogRetentionProps.getRetention()- Parameters:
retention- The number of days log events are kept in CloudWatch Logs. This parameter is required.- Returns:
this
-
logGroupRegion
Sets the value ofLogRetentionProps.getLogGroupRegion()- Parameters:
logGroupRegion- The region where the log group should be created.- Returns:
this
-
logRetentionRetryOptions
@Stability(Stable) public LogRetentionProps.Builder logRetentionRetryOptions(LogRetentionRetryOptions logRetentionRetryOptions) Sets the value ofLogRetentionProps.getLogRetentionRetryOptions()- Parameters:
logRetentionRetryOptions- Retry options for all AWS API calls.- Returns:
this
-
role
Sets the value ofLogRetentionProps.getRole()- Parameters:
role- The IAM role for the Lambda function associated with the custom resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LogRetentionProps>- Returns:
- a new instance of
LogRetentionProps - Throws:
NullPointerException- if any required attribute was not provided
-