Class BackupSelection.Builder
java.lang.Object
software.amazon.awscdk.services.backup.BackupSelection.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BackupSelection>
- Enclosing class:
BackupSelection
@Stability(Stable)
public static final class BackupSelection.Builder
extends Object
implements software.amazon.jsii.Builder<BackupSelection>
A fluent builder for
BackupSelection
.-
Method Summary
Modifier and TypeMethodDescriptionallowRestores
(Boolean allowRestores) Whether to automatically give restores permissions to the role that AWS Backup uses.backupPlan
(IBackupPlan backupPlan) The backup plan for this selection.backupSelectionName
(String backupSelectionName) The name for this selection.build()
static BackupSelection.Builder
resources
(List<? extends BackupResource> resources) The resources to backup.The role that AWS Backup uses to authenticate when backuping or restoring the resources.
-
Method Details
-
create
@Stability(Stable) public static BackupSelection.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
BackupSelection.Builder
.
-
resources
@Stability(Stable) public BackupSelection.Builder resources(List<? extends BackupResource> resources) The resources to backup.Use the helper static methods defined on
BackupResource
.- Parameters:
resources
- The resources to backup. This parameter is required.- Returns:
this
-
allowRestores
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
- Parameters:
allowRestores
- Whether to automatically give restores permissions to the role that AWS Backup uses. This parameter is required.- Returns:
this
-
backupSelectionName
The name for this selection.Default: - a CDK generated name
- Parameters:
backupSelectionName
- The name for this selection. This parameter is required.- Returns:
this
-
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.Default: - a new role will be created
- Parameters:
role
- The role that AWS Backup uses to authenticate when backuping or restoring the resources. This parameter is required.- Returns:
this
-
backupPlan
The backup plan for this selection.- Parameters:
backupPlan
- The backup plan for this selection. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BackupSelection>
- Returns:
- a newly built instance of
BackupSelection
.
-