BackupPlanRule

class aws_cdk.aws_backup.BackupPlanRule(*, backup_vault=None, completion_window=None, delete_after=None, move_to_cold_storage_after=None, rule_name=None, schedule_expression=None, start_window=None)

Bases: object

A backup plan rule.

stability :stability: experimental

__init__(*, backup_vault=None, completion_window=None, delete_after=None, move_to_cold_storage_after=None, rule_name=None, schedule_expression=None, start_window=None)
Parameters
  • backup_vault (Optional[IBackupVault]) – 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

  • completion_window (Optional[Duration]) – The duration after a backup job is successfully started before it must be completed or it is canceled by AWS Backup. Default: - 8 hours

  • delete_after (Optional[Duration]) – Specifies the duration after creation that a recovery point is deleted. Must be greater than moveToColdStorageAfter. Default: - recovery point is never deleted

  • move_to_cold_storage_after (Optional[Duration]) – Specifies the duration after creation that a recovery point is moved to cold storage. Default: - recovery point is never moved to cold storage

  • rule_name (Optional[str]) – A display name for the backup rule. Default: - a CDK generated name

  • schedule_expression (Optional[Schedule]) – A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule

  • start_window (Optional[Duration]) – The duration after a backup is scheduled before a job is canceled if it doesn’t start successfully. Default: - 8 hours

stability :stability: experimental

Return type

None

Attributes

props

Rule properties.

stability :stability: experimental

Return type

BackupPlanRuleProps

Static Methods

classmethod daily(backup_vault=None)

Daily with 35 days retention.

Parameters

backup_vault (Optional[IBackupVault]) –

stability :stability: experimental

Return type

BackupPlanRule

classmethod monthly1_year(backup_vault=None)

Monthly 1 year retention, move to cold storage after 1 month.

Parameters

backup_vault (Optional[IBackupVault]) –

stability :stability: experimental

Return type

BackupPlanRule

classmethod monthly5_year(backup_vault=None)

Monthly 5 year retention, move to cold storage after 3 months.

Parameters

backup_vault (Optional[IBackupVault]) –

stability :stability: experimental

Return type

BackupPlanRule

classmethod monthly7_year(backup_vault=None)

Monthly 7 year retention, move to cold storage after 3 months.

Parameters

backup_vault (Optional[IBackupVault]) –

stability :stability: experimental

Return type

BackupPlanRule

classmethod weekly(backup_vault=None)

Weekly with 3 months retention.

Parameters

backup_vault (Optional[IBackupVault]) –

stability :stability: experimental

Return type

BackupPlanRule