aws-cdk-lib.aws_backup.BackupSelectionProps

interface BackupSelectionProps

LanguageType name
.NETAmazon.CDK.AWS.Backup.BackupSelectionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsbackup#BackupSelectionProps
Javasoftware.amazon.awscdk.services.backup.BackupSelectionProps
Pythonaws_cdk.aws_backup.BackupSelectionProps
TypeScript (source)aws-cdk-lib » aws_backup » BackupSelectionProps

Properties for a BackupSelection.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_backup as backup } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const backupPlan: backup.BackupPlan;
declare const backupResource: backup.BackupResource;
declare const role: iam.Role;
const backupSelectionProps: backup.BackupSelectionProps = {
  backupPlan: backupPlan,
  resources: [backupResource],

  // the properties below are optional
  allowRestores: false,
  backupSelectionName: 'backupSelectionName',
  role: role,
};

Properties

NameTypeDescription
backupPlanIBackupPlanThe backup plan for this selection.
resourcesBackupResource[]The resources to backup.
allowRestores?booleanWhether to automatically give restores permissions to the role that AWS Backup uses.
backupSelectionName?stringThe name for this selection.
role?IRoleThe role that AWS Backup uses to authenticate when backuping or restoring the resources.

backupPlan

Type: IBackupPlan

The backup plan for this selection.


resources

Type: BackupResource[]

The resources to backup.

Use the helper static methods defined on BackupResource.


allowRestores?

Type: boolean (optional, default: false)

Whether to automatically give restores permissions to the role that AWS Backup uses.

If true, the AWSBackupServiceRolePolicyForRestores managed policy will be attached to the role.


backupSelectionName?

Type: string (optional, default: a CDK generated name)

The name for this selection.


role?

Type: IRole (optional, default: a new role will be created)

The role that AWS Backup uses to authenticate when backuping or restoring the resources.

The AWSBackupServiceRolePolicyForBackup managed policy will be attached to this role.