Class BackupSelectionOptions.Builder
java.lang.Object
software.amazon.awscdk.services.backup.BackupSelectionOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BackupSelectionOptions>
- Enclosing interface:
BackupSelectionOptions
@Stability(Stable)
public static final class BackupSelectionOptions.Builder
extends Object
implements software.amazon.jsii.Builder<BackupSelectionOptions>
A builder for
BackupSelectionOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowRestores
(Boolean allowRestores) Sets the value ofBackupSelectionOptions.getAllowRestores()
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
-
resources
@Stability(Stable) public BackupSelectionOptions.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
, theAWSBackupServiceRolePolicyForRestores
managed policy will be attached to the role.- Returns:
this
-
backupSelectionName
@Stability(Stable) public BackupSelectionOptions.Builder backupSelectionName(String backupSelectionName) Sets the value ofBackupSelectionOptions.getBackupSelectionName()
- Parameters:
backupSelectionName
- The name for this selection.- Returns:
this
-
disableDefaultBackupPolicy
@Stability(Stable) public BackupSelectionOptions.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
, theAWSBackupServiceRolePolicyForBackup
managed 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. TheAWSBackupServiceRolePolicyForBackup
managed policy will be attached to this role unlessdisableDefaultBackupPolicy
is set totrue
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BackupSelectionOptions>
- Returns:
- a new instance of
BackupSelectionOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-