Class BackupVault.Builder

java.lang.Object
software.amazon.awscdk.services.backup.BackupVault.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<BackupVault>
Enclosing class:
BackupVault

@Stability(Stable) public static final class BackupVault.Builder extends Object implements software.amazon.jsii.Builder<BackupVault>
A fluent builder for BackupVault.
  • Method Details

    • create

      @Stability(Stable) public static BackupVault.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of BackupVault.Builder.
    • accessPolicy

      @Stability(Stable) public BackupVault.Builder accessPolicy(PolicyDocument accessPolicy)
      A resource-based policy that is used to manage access permissions on the backup vault.

      Default: - access is not restricted

      Parameters:
      accessPolicy - A resource-based policy that is used to manage access permissions on the backup vault. This parameter is required.
      Returns:
      this
    • backupVaultName

      @Stability(Stable) public BackupVault.Builder backupVaultName(String backupVaultName)
      The name of a logical container where backups are stored.

      Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.

      Default: - A CDK generated name

      Parameters:
      backupVaultName - The name of a logical container where backups are stored. This parameter is required.
      Returns:
      this
    • blockRecoveryPointDeletion

      @Stability(Stable) public BackupVault.Builder blockRecoveryPointDeletion(Boolean blockRecoveryPointDeletion)
      Whether to add statements to the vault access policy that prevents anyone from deleting a recovery point.

      Default: false

      Parameters:
      blockRecoveryPointDeletion - Whether to add statements to the vault access policy that prevents anyone from deleting a recovery point. This parameter is required.
      Returns:
      this
    • encryptionKey

      @Stability(Stable) public BackupVault.Builder encryptionKey(IKey encryptionKey)
      The server-side encryption key to use to protect your backups.

      Default: - an Amazon managed KMS key

      Parameters:
      encryptionKey - The server-side encryption key to use to protect your backups. This parameter is required.
      Returns:
      this
    • notificationEvents

      @Stability(Stable) public BackupVault.Builder notificationEvents(List<? extends BackupVaultEvents> notificationEvents)
      The vault events to send.

      Default: - all vault events if `notificationTopic` is defined

      Parameters:
      notificationEvents - The vault events to send. This parameter is required.
      Returns:
      this
      See Also:
    • notificationTopic

      @Stability(Stable) public BackupVault.Builder notificationTopic(ITopic notificationTopic)
      A SNS topic to send vault events to.

      Default: - no notifications

      Parameters:
      notificationTopic - A SNS topic to send vault events to. This parameter is required.
      Returns:
      this
      See Also:
    • removalPolicy

      @Stability(Stable) public BackupVault.Builder removalPolicy(RemovalPolicy removalPolicy)
      The removal policy to apply to the vault.

      Note that removing a vault that contains recovery points will fail.

      Default: RemovalPolicy.RETAIN

      Parameters:
      removalPolicy - The removal policy to apply to the vault. This parameter is required.
      Returns:
      this
    • build

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