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 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

      @Stability(Stable) public LogRetention.Builder logGroupName(String logGroupName)
      The log group name.

      Parameters:
      logGroupName - The log group name. This parameter is required.
      Returns:
      this
    • retention

      @Stability(Stable) public LogRetention.Builder retention(RetentionDays 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

      @Stability(Stable) public LogRetention.Builder logGroupRegion(String 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

      @Stability(Stable) public LogRetention.Builder role(IRole 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

      @Stability(Stable) public LogRetention build()
      Specified by:
      build in interface software.amazon.jsii.Builder<LogRetention>
      Returns:
      a newly built instance of LogRetention.