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
Constructors -
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.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, theAWSBackupServiceRolePolicyForRestoresmanaged 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
-
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<BackupSelectionOptions>- Returns:
- a new instance of
BackupSelectionOptions - Throws:
NullPointerException- if any required attribute was not provided
-