Class BackupPlanRule.Builder

java.lang.Object
software.amazon.awscdk.services.backup.BackupPlanRule.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<BackupPlanRule>
Enclosing class:
BackupPlanRule

@Stability(Stable) public static final class BackupPlanRule.Builder extends Object implements software.amazon.jsii.Builder<BackupPlanRule>
A fluent builder for BackupPlanRule.
  • Method Details

    • create

      @Stability(Stable) public static BackupPlanRule.Builder create()
      Returns:
      a new instance of BackupPlanRule.Builder.
    • backupVault

      @Stability(Stable) public BackupPlanRule.Builder backupVault(IBackupVault backupVault)
      The backup vault where backups are.

      Default: - use the vault defined at the plan level. If not defined a new common vault for the plan will be created

      Parameters:
      backupVault - The backup vault where backups are. This parameter is required.
      Returns:
      this
    • completionWindow

      @Stability(Stable) public BackupPlanRule.Builder completionWindow(Duration completionWindow)
      The duration after a backup job is successfully started before it must be completed or it is canceled by AWS Backup.

      Default: - 8 hours

      Parameters:
      completionWindow - The duration after a backup job is successfully started before it must be completed or it is canceled by AWS Backup. This parameter is required.
      Returns:
      this
    • deleteAfter

      @Stability(Stable) public BackupPlanRule.Builder deleteAfter(Duration deleteAfter)
      Specifies the duration after creation that a recovery point is deleted.

      Must be greater than moveToColdStorageAfter.

      Default: - recovery point is never deleted

      Parameters:
      deleteAfter - Specifies the duration after creation that a recovery point is deleted. This parameter is required.
      Returns:
      this
    • enableContinuousBackup

      @Stability(Stable) public BackupPlanRule.Builder enableContinuousBackup(Boolean enableContinuousBackup)
      Enables continuous backup and point-in-time restores (PITR).

      Property deleteAfter defines the retention period for the backup. It is mandatory if PITR is enabled. If no value is specified, the retention period is set to 35 days which is the maximum retention period supported by PITR.

      Property moveToColdStorageAfter must not be specified because PITR does not support this option.

      Default: false

      Parameters:
      enableContinuousBackup - Enables continuous backup and point-in-time restores (PITR). This parameter is required.
      Returns:
      this
    • moveToColdStorageAfter

      @Stability(Stable) public BackupPlanRule.Builder moveToColdStorageAfter(Duration moveToColdStorageAfter)
      Specifies the duration after creation that a recovery point is moved to cold storage.

      Default: - recovery point is never moved to cold storage

      Parameters:
      moveToColdStorageAfter - Specifies the duration after creation that a recovery point is moved to cold storage. This parameter is required.
      Returns:
      this
    • ruleName

      @Stability(Stable) public BackupPlanRule.Builder ruleName(String ruleName)
      A display name for the backup rule.

      Default: - a CDK generated name

      Parameters:
      ruleName - A display name for the backup rule. This parameter is required.
      Returns:
      this
    • scheduleExpression

      @Stability(Stable) public BackupPlanRule.Builder scheduleExpression(Schedule scheduleExpression)
      A CRON expression specifying when AWS Backup initiates a backup job.

      Default: - no schedule

      Parameters:
      scheduleExpression - A CRON expression specifying when AWS Backup initiates a backup job. This parameter is required.
      Returns:
      this
    • startWindow

      @Stability(Stable) public BackupPlanRule.Builder startWindow(Duration startWindow)
      The duration after a backup is scheduled before a job is canceled if it doesn't start successfully.

      Default: - 8 hours

      Parameters:
      startWindow - The duration after a backup is scheduled before a job is canceled if it doesn't start successfully. This parameter is required.
      Returns:
      this
    • build

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