Skip to content
v2.278.0

BackupPlanRule Class ​

A backup plan rule.

Example ​

ts
declare const plan: backup.BackupPlan;
plan.addRule(new backup.BackupPlanRule({
  enableContinuousBackup: true,
  deleteAfter: Duration.days(14),
}));
python
# plan: backup.BackupPlan

plan.add_rule(backup.BackupPlanRule(
    enable_continuous_backup=True,
    delete_after=Duration.days(14)
))
java
BackupPlan plan;

plan.addRule(BackupPlanRule.Builder.create()
        .enableContinuousBackup(true)
        .deleteAfter(Duration.days(14))
        .build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
BackupPlan plan;

plan.AddRule(new BackupPlanRule(new BackupPlanRuleProps {
    EnableContinuousBackup = true,
    DeleteAfter = Duration.Days(14)
}));
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var plan BackupPlan

plan.AddRule(backup.NewBackupPlanRule(&BackupPlanRuleProps{
	EnableContinuousBackup: jsii.Boolean(true),
	DeleteAfter: awscdk.Duration_Days(jsii.Number(14)),
}))

Initializer ​

ts
new BackupPlanRule(props: BackupPlanRuleProps)
python
BackupPlanRule(props: BackupPlanRuleProps)
java
new BackupPlanRule(BackupPlanRuleProps props)
csharp
new BackupPlanRule(BackupPlanRuleProps props)
go
NewBackupPlanRule(Props BackupPlanRuleProps)

Properties ​

Methods ​

daily(backupVault?: IBackupVaultRef): BackupPlanRule // chainable@staticmethod def daily(backup_vault: typing.Optional[IBackupVaultRef] = None) -> BackupPlanRulepublic static BackupPlanRule daily(IBackupVaultRef backupVault)public static BackupPlanRule Daily(IBackupVaultRef? backupVault = null)func Daily(BackupVault IBackupVaultRef) BackupPlanRule static #
Daily with 35 days retention.
monthly1Year(backupVault?: IBackupVaultRef): BackupPlanRule // chainable@staticmethod def monthly1_year(backup_vault: typing.Optional[IBackupVaultRef] = None) -> BackupPlanRulepublic static BackupPlanRule monthly1Year(IBackupVaultRef backupVault)public static BackupPlanRule Monthly1Year(IBackupVaultRef? backupVault = null)func Monthly1Year(BackupVault IBackupVaultRef) BackupPlanRule static #
Monthly 1 year retention, move to cold storage after 1 month.
monthly5Year(backupVault?: IBackupVaultRef): BackupPlanRule // chainable@staticmethod def monthly5_year(backup_vault: typing.Optional[IBackupVaultRef] = None) -> BackupPlanRulepublic static BackupPlanRule monthly5Year(IBackupVaultRef backupVault)public static BackupPlanRule Monthly5Year(IBackupVaultRef? backupVault = null)func Monthly5Year(BackupVault IBackupVaultRef) BackupPlanRule static #
Monthly 5 year retention, move to cold storage after 3 months.
monthly7Year(backupVault?: IBackupVaultRef): BackupPlanRule // chainable@staticmethod def monthly7_year(backup_vault: typing.Optional[IBackupVaultRef] = None) -> BackupPlanRulepublic static BackupPlanRule monthly7Year(IBackupVaultRef backupVault)public static BackupPlanRule Monthly7Year(IBackupVaultRef? backupVault = null)func Monthly7Year(BackupVault IBackupVaultRef) BackupPlanRule static #
Monthly 7 year retention, move to cold storage after 3 months.
weekly(backupVault?: IBackupVaultRef): BackupPlanRule // chainable@staticmethod def weekly(backup_vault: typing.Optional[IBackupVaultRef] = None) -> BackupPlanRulepublic static BackupPlanRule weekly(IBackupVaultRef backupVault)public static BackupPlanRule Weekly(IBackupVaultRef? backupVault = null)func Weekly(BackupVault IBackupVaultRef) BackupPlanRule static #
Weekly with 3 months retention.