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 Summary
Modifier and TypeMethodDescriptionbackupVault
(IBackupVault backupVault) The backup vault where backups are.build()
completionWindow
(Duration completionWindow) The duration after a backup job is successfully started before it must be completed or it is canceled by AWS Backup.static BackupPlanRule.Builder
create()
deleteAfter
(Duration deleteAfter) Specifies the duration after creation that a recovery point is deleted.enableContinuousBackup
(Boolean enableContinuousBackup) Enables continuous backup and point-in-time restores (PITR).moveToColdStorageAfter
(Duration moveToColdStorageAfter) Specifies the duration after creation that a recovery point is moved to cold storage.A display name for the backup rule.scheduleExpression
(Schedule scheduleExpression) A CRON expression specifying when AWS Backup initiates a backup job.startWindow
(Duration startWindow) The duration after a backup is scheduled before a job is canceled if it doesn't start successfully.
-
Method Details
-
create
- Returns:
- a new instance of
BackupPlanRule.Builder
.
-
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
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
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
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
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BackupPlanRule>
- Returns:
- a newly built instance of
BackupPlanRule
.
-