@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.709Z") @Stability(value=Stable) public interface LogRetentionProps extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
LogRetentionProps.Builder
A builder for
LogRetentionProps |
static class |
LogRetentionProps.Jsii$Proxy
An implementation for
LogRetentionProps |
| Modifier and Type | Method and Description |
|---|---|
static LogRetentionProps.Builder |
builder() |
String |
getLogGroupName()
The log group name.
|
default String |
getLogGroupRegion()
The region where the log group should be created.
|
default LogRetentionRetryOptions |
getLogRetentionRetryOptions()
Retry options for all AWS API calls.
|
default RemovalPolicy |
getRemovalPolicy()
The removalPolicy for the log group when the stack is deleted.
|
RetentionDays |
getRetention()
The number of days log events are kept in CloudWatch Logs.
|
default IRole |
getRole()
The IAM role for the Lambda function associated with the custom resource.
|
@Stability(value=Stable) @NotNull String getLogGroupName()
@Stability(value=Stable) @NotNull RetentionDays getRetention()
@Stability(value=Stable) @Nullable default String getLogGroupRegion()
Default: - same region as the stack
@Stability(value=Stable) @Nullable default LogRetentionRetryOptions getLogRetentionRetryOptions()
Default: - AWS SDK default retry options
@Stability(value=Stable) @Nullable default RemovalPolicy getRemovalPolicy()
Default: RemovalPolicy.RETAIN
@Stability(value=Stable) @Nullable default IRole getRole()
Default: - A new role is created
@Stability(value=Stable) static LogRetentionProps.Builder builder()
LogRetentionProps.Builder of LogRetentionPropsCopyright © 2022. All rights reserved.