Class BackupSelectionProps.Builder
java.lang.Object
software.amazon.awscdk.services.backup.BackupSelectionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BackupSelectionProps>
- Enclosing interface:
BackupSelectionProps
@Stability(Stable)
public static final class BackupSelectionProps.Builder
extends Object
implements software.amazon.jsii.Builder<BackupSelectionProps>
A builder for
BackupSelectionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowRestores(Boolean allowRestores) Sets the value ofBackupSelectionOptions.getAllowRestores()backupPlan(IBackupPlan backupPlan) Sets the value ofBackupSelectionProps.getBackupPlan()backupSelectionName(String backupSelectionName) Sets the value ofBackupSelectionOptions.getBackupSelectionName()build()Builds the configured instance.disableDefaultBackupPolicy(Boolean disableDefaultBackupPolicy) Sets the value ofBackupSelectionOptions.getDisableDefaultBackupPolicy()resources(List<? extends BackupResource> resources) Sets the value ofBackupSelectionOptions.getResources()Sets the value ofBackupSelectionOptions.getRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
backupPlan
Sets the value ofBackupSelectionProps.getBackupPlan()- Parameters:
backupPlan- The backup plan for this selection. This parameter is required.- Returns:
this
-
resources
@Stability(Stable) public BackupSelectionProps.Builder resources(List<? extends BackupResource> resources) Sets the value ofBackupSelectionOptions.getResources()- Parameters:
resources- The resources to backup. This parameter is required. Use the helper static methods defined onBackupResource.- Returns:
this
-
allowRestores
Sets the value ofBackupSelectionOptions.getAllowRestores()- Parameters:
allowRestores- Whether to automatically give restores permissions to the role that AWS Backup uses. Iftrue, theAWSBackupServiceRolePolicyForRestoresmanaged policy will be attached to the role.- Returns:
this
-
backupSelectionName
@Stability(Stable) public BackupSelectionProps.Builder backupSelectionName(String backupSelectionName) Sets the value ofBackupSelectionOptions.getBackupSelectionName()- Parameters:
backupSelectionName- The name for this selection.- Returns:
this
-
disableDefaultBackupPolicy
@Stability(Stable) public BackupSelectionProps.Builder disableDefaultBackupPolicy(Boolean disableDefaultBackupPolicy) Sets the value ofBackupSelectionOptions.getDisableDefaultBackupPolicy()- Parameters:
disableDefaultBackupPolicy- Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses. Iffalse, theAWSBackupServiceRolePolicyForBackupmanaged policy will be attached to the role.- Returns:
this
-
role
Sets the value ofBackupSelectionOptions.getRole()- Parameters:
role- The role that AWS Backup uses to authenticate when backuping or restoring the resources. TheAWSBackupServiceRolePolicyForBackupmanaged policy will be attached to this role unlessdisableDefaultBackupPolicyis set totrue.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<BackupSelectionProps>- Returns:
- a new instance of
BackupSelectionProps - Throws:
NullPointerException- if any required attribute was not provided
-