Interface LogRetentionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
LogRetentionProps
All Known Implementing Classes:
LogRetentionProps.Jsii$Proxy, LogRetentionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.107Z") @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.services.iam.*;
 import software.amazon.awscdk.services.logs.*;
 import software.amazon.awscdk.core.*;
 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())
         .role(role)
         .build();
 
  • Method Details

    • getLogGroupName

      @Stability(Stable) @NotNull String getLogGroupName()
      The log group name.
    • getRetention

      @Stability(Stable) @NotNull RetentionDays getRetention()
      The number of days log events are kept in CloudWatch Logs.
    • getLogGroupRegion

      @Stability(Stable) @Nullable default String getLogGroupRegion()
      The region where the log group should be created.

      Default: - same region as the stack

    • getLogRetentionRetryOptions

      @Stability(Stable) @Nullable default LogRetentionRetryOptions getLogRetentionRetryOptions()
      Retry options for all AWS API calls.

      Default: - AWS SDK default retry options

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The IAM role for the Lambda function associated with the custom resource.

      Default: - A new role is created

    • builder

      @Stability(Stable) static LogRetentionProps.Builder builder()
      Returns:
      a LogRetentionProps.Builder of LogRetentionProps