BackupSelectionProps
- class aws_cdk.aws_backup.BackupSelectionProps(*, resources, allow_restores=None, backup_selection_name=None, disable_default_backup_policy=None, role=None, backup_plan)
Bases:
BackupSelectionOptions
Properties for a BackupSelection.
- Parameters:
resources (
Sequence
[BackupResource
]) – The resources to backup. Use the helper static methods defined onBackupResource
.allow_restores (
Optional
[bool
]) – Whether to automatically give restores permissions to the role that AWS Backup uses. Iftrue
, theAWSBackupServiceRolePolicyForRestores
managed policy will be attached to the role. Default: falsebackup_selection_name (
Optional
[str
]) – The name for this selection. Default: - a CDK generated namedisable_default_backup_policy (
Optional
[bool
]) – Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses. Iffalse
, theAWSBackupServiceRolePolicyForBackup
managed policy will be attached to the role. Default: falserole (
Optional
[IRole
]) – The role that AWS Backup uses to authenticate when backuping or restoring the resources. TheAWSBackupServiceRolePolicyForBackup
managed policy will be attached to this role unlessdisableDefaultBackupPolicy
is set totrue
. Default: - a new role will be createdbackup_plan (
IBackupPlan
) – The backup plan for this selection.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_backup as backup from aws_cdk import aws_iam as iam # backup_plan: backup.BackupPlan # backup_resource: backup.BackupResource # role: iam.Role backup_selection_props = backup.BackupSelectionProps( backup_plan=backup_plan, resources=[backup_resource], # the properties below are optional allow_restores=False, backup_selection_name="backupSelectionName", disable_default_backup_policy=False, role=role )
Attributes
- allow_restores
Whether to automatically give restores permissions to the role that AWS Backup uses.
If
true
, theAWSBackupServiceRolePolicyForRestores
managed policy will be attached to the role.- Default:
false
- backup_plan
The backup plan for this selection.
- backup_selection_name
The name for this selection.
- Default:
a CDK generated name
- disable_default_backup_policy
Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses.
If
false
, theAWSBackupServiceRolePolicyForBackup
managed policy will be attached to the role.- Default:
false
- resources
The resources to backup.
Use the helper static methods defined on
BackupResource
.
- role
The role that AWS Backup uses to authenticate when backuping or restoring the resources.
The
AWSBackupServiceRolePolicyForBackup
managed policy will be attached to this role unlessdisableDefaultBackupPolicy
is set totrue
.- Default:
a new role will be created