public static final class BackupPlanRule.Builder
extends java.lang.Object
BackupPlanRule
.Modifier and Type | Method and Description |
---|---|
BackupPlanRule.Builder |
backupVault(IBackupVault backupVault)
The backup vault where backups are.
|
BackupPlanRule |
build() |
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.
|
static BackupPlanRule.Builder |
create() |
BackupPlanRule.Builder |
deleteAfter(Duration deleteAfter)
Specifies the duration after creation that a recovery point is deleted.
|
BackupPlanRule.Builder |
enableContinuousBackup(java.lang.Boolean enableContinuousBackup)
Enables continuous backup and point-in-time restores (PITR).
|
BackupPlanRule.Builder |
moveToColdStorageAfter(Duration moveToColdStorageAfter)
Specifies the duration after creation that a recovery point is moved to cold storage.
|
BackupPlanRule.Builder |
ruleName(java.lang.String ruleName)
A display name for the backup rule.
|
BackupPlanRule.Builder |
scheduleExpression(Schedule scheduleExpression)
A CRON expression specifying when AWS Backup initiates a backup job.
|
BackupPlanRule.Builder |
startWindow(Duration startWindow)
The duration after a backup is scheduled before a job is canceled if it doesn't start successfully.
|
public static BackupPlanRule.Builder create()
BackupPlanRule.Builder
.public BackupPlanRule.Builder backupVault(IBackupVault backupVault)
Default: - use the vault defined at the plan level. If not defined a new common vault for the plan will be created
backupVault
- The backup vault where backups are. This parameter is required.this
public BackupPlanRule.Builder completionWindow(Duration completionWindow)
Default: - 8 hours
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.this
public BackupPlanRule.Builder deleteAfter(Duration deleteAfter)
Must be greater than moveToColdStorageAfter
.
Default: - recovery point is never deleted
deleteAfter
- Specifies the duration after creation that a recovery point is deleted. This parameter is required.this
public BackupPlanRule.Builder enableContinuousBackup(java.lang.Boolean enableContinuousBackup)
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
enableContinuousBackup
- Enables continuous backup and point-in-time restores (PITR). This parameter is required.this
public BackupPlanRule.Builder moveToColdStorageAfter(Duration moveToColdStorageAfter)
Default: - recovery point is never moved to cold storage
moveToColdStorageAfter
- Specifies the duration after creation that a recovery point is moved to cold storage. This parameter is required.this
public BackupPlanRule.Builder ruleName(java.lang.String ruleName)
Default: - a CDK generated name
ruleName
- A display name for the backup rule. This parameter is required.this
public BackupPlanRule.Builder scheduleExpression(Schedule scheduleExpression)
Default: - no schedule
scheduleExpression
- A CRON expression specifying when AWS Backup initiates a backup job. This parameter is required.this
public BackupPlanRule.Builder startWindow(Duration startWindow)
Default: - 8 hours
startWindow
- The duration after a backup is scheduled before a job is canceled if it doesn't start successfully. This parameter is required.this
public BackupPlanRule build()