BackupPlanRuleProps

class aws_cdk.aws_backup.BackupPlanRuleProps(*, backup_vault=None, completion_window=None, copy_actions=None, delete_after=None, enable_continuous_backup=None, move_to_cold_storage_after=None, recovery_point_tags=None, rule_name=None, schedule_expression=None, start_window=None)

Bases: object

Properties for a BackupPlanRule.

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: - 7 days

  • copy_actions (Optional[Sequence[Union[BackupPlanCopyActionProps, Dict[str, Any]]]]) – Copy operations to perform on recovery points created by this rule. Default: - no copy actions

  • 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

  • enable_continuous_backup (Optional[bool]) – 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

  • 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

  • recovery_point_tags (Optional[Mapping[str, str]]) – To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. Default: - no recovery point tags.

  • 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

ExampleMetadata:

infused

Example:

# plan: backup.BackupPlan
# secondary_vault: backup.BackupVault

plan.add_rule(backup.BackupPlanRule(
    copy_actions=[backup.BackupPlanCopyActionProps(
        destination_backup_vault=secondary_vault,
        move_to_cold_storage_after=Duration.days(30),
        delete_after=Duration.days(120)
    )]
))

Attributes

backup_vault

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

The duration after a backup job is successfully started before it must be completed or it is canceled by AWS Backup.

Default:
  • 7 days

copy_actions

Copy operations to perform on recovery points created by this rule.

Default:
  • no copy actions

delete_after

Specifies the duration after creation that a recovery point is deleted.

Must be greater than moveToColdStorageAfter.

Default:
  • recovery point is never deleted

enable_continuous_backup

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

move_to_cold_storage_after

Specifies the duration after creation that a recovery point is moved to cold storage.

Default:
  • recovery point is never moved to cold storage

recovery_point_tags

To help organize your resources, you can assign your own metadata to the resources that you create.

Each tag is a key-value pair.

Default:
  • no recovery point tags.

rule_name

A display name for the backup rule.

Default:
  • a CDK generated name

schedule_expression

A CRON expression specifying when AWS Backup initiates a backup job.

Default:
  • no schedule

start_window

The duration after a backup is scheduled before a job is canceled if it doesn’t start successfully.

Default:
  • 8 hours