Interface LogRetentionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LogRetentionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:39.924Z")
@Stability(Stable)
public interface LogRetentionProps
extends software.amazon.jsii.JsiiSerializable
Construction properties for a LogRetention.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.services.logs.*;
Role role;
LogRetentionProps logRetentionProps = LogRetentionProps.builder()
.logGroupName("logGroupName")
.retention(RetentionDays.ONE_DAY)
// the properties below are optional
.logGroupRegion("logGroupRegion")
.logRetentionRetryOptions(LogRetentionRetryOptions.builder()
.base(Duration.minutes(30))
.maxRetries(123)
.build())
.removalPolicy(RemovalPolicy.DESTROY)
.role(role)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLogRetentionPropsstatic final classAn implementation forLogRetentionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic LogRetentionProps.Builderbuilder()The log group name.default StringThe region where the log group should be created.default LogRetentionRetryOptionsRetry options for all AWS API calls.default RemovalPolicyThe removalPolicy for the log group when the stack is deleted.The number of days log events are kept in CloudWatch Logs.default IRolegetRole()The IAM role for the Lambda function associated with the custom resource.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getLogGroupName
The log group name. -
getRetention
The number of days log events are kept in CloudWatch Logs. -
getLogGroupRegion
The region where the log group should be created.Default: - same region as the stack
-
getLogRetentionRetryOptions
Retry options for all AWS API calls.Default: - AWS SDK default retry options
-
getRemovalPolicy
The removalPolicy for the log group when the stack is deleted.Default: RemovalPolicy.RETAIN
-
getRole
The IAM role for the Lambda function associated with the custom resource.Default: - A new role is created
-
builder
- Returns:
- a
LogRetentionProps.BuilderofLogRetentionProps
-