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 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

      @Stability(Stable) public BackupSelection.Builder allowRestores(Boolean allowRestores)
      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.

      Default: false

      Parameters:
      allowRestores - Whether to automatically give restores permissions to the role that AWS Backup uses. This parameter is required.
      Returns:
      this
    • backupSelectionName

      @Stability(Stable) public BackupSelection.Builder backupSelectionName(String backupSelectionName)
      The name for this selection.

      Default: - a CDK generated name

      Parameters:
      backupSelectionName - The name for this selection. This parameter is required.
      Returns:
      this
    • disableDefaultBackupPolicy

      @Stability(Stable) public BackupSelection.Builder disableDefaultBackupPolicy(Boolean disableDefaultBackupPolicy)
      Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses.

      If false, the AWSBackupServiceRolePolicyForBackup managed policy will be attached to the role.

      Default: false

      Parameters:
      disableDefaultBackupPolicy - Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses. This parameter is required.
      Returns:
      this
    • role

      @Stability(Stable) public BackupSelection.Builder role(IRole 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 unless disableDefaultBackupPolicy is set to true.

      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

      @Stability(Stable) public BackupSelection.Builder backupPlan(IBackupPlan backupPlan)
      The backup plan for this selection.

      Parameters:
      backupPlan - The backup plan for this selection. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public BackupSelection build()
      Specified by:
      build in interface software.amazon.jsii.Builder<BackupSelection>
      Returns:
      a newly built instance of BackupSelection.