Class LogRetention.Builder
java.lang.Object
software.amazon.awscdk.services.logs.LogRetention.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LogRetention>
- Enclosing class:
LogRetention
@Stability(Stable)
public static final class LogRetention.Builder
extends Object
implements software.amazon.jsii.Builder<LogRetention>
A fluent builder for
LogRetention
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static LogRetention.Builder
logGroupName
(String logGroupName) The log group name.logGroupRegion
(String logGroupRegion) The region where the log group should be created.logRetentionRetryOptions
(LogRetentionRetryOptions logRetentionRetryOptions) Retry options for all AWS API calls.retention
(RetentionDays retention) The number of days log events are kept in CloudWatch Logs.The IAM role for the Lambda function associated with the custom resource.
-
Method Details
-
create
@Stability(Stable) public static LogRetention.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
LogRetention.Builder
.
-
logGroupName
The log group name.- Parameters:
logGroupName
- The log group name. This parameter is required.- Returns:
this
-
retention
The number of days log events are kept in CloudWatch Logs.- Parameters:
retention
- The number of days log events are kept in CloudWatch Logs. This parameter is required.- Returns:
this
-
logGroupRegion
The region where the log group should be created.Default: - same region as the stack
- Parameters:
logGroupRegion
- The region where the log group should be created. This parameter is required.- Returns:
this
-
logRetentionRetryOptions
@Stability(Stable) public LogRetention.Builder logRetentionRetryOptions(LogRetentionRetryOptions logRetentionRetryOptions) Retry options for all AWS API calls.Default: - AWS SDK default retry options
- Parameters:
logRetentionRetryOptions
- Retry options for all AWS API calls. This parameter is required.- Returns:
this
-
role
The IAM role for the Lambda function associated with the custom resource.Default: - A new role is created
- Parameters:
role
- The IAM role for the Lambda function associated with the custom resource. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LogRetention>
- Returns:
- a newly built instance of
LogRetention
.
-