Class BackupVault

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.backup.BackupVault
All Implemented Interfaces:
IResource, IBackupVault, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-01T20:58:19.536Z") @Stability(Stable) public class BackupVault extends Resource implements IBackupVault
A backup vault.

Example:

 IBackupVault importedVault = BackupVault.fromBackupVaultName(this, "Vault", "myVaultName");
 Role role = Role.Builder.create(this, "Access Role").assumedBy(new ServicePrincipal("lambda.amazonaws.com")).build();
 importedVault.grant(role, "backup:StartBackupJob");
 
  • Constructor Details

    • BackupVault

      protected BackupVault(software.amazon.jsii.JsiiObjectRef objRef)
    • BackupVault

      protected BackupVault(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • BackupVault

      @Stability(Stable) public BackupVault(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable BackupVaultProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • BackupVault

      @Stability(Stable) public BackupVault(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromBackupVaultArn

      @Stability(Stable) @NotNull public static IBackupVault fromBackupVaultArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String backupVaultArn)
      Import an existing backup vault by arn.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupVaultArn - This parameter is required.
    • fromBackupVaultName

      @Stability(Stable) @NotNull public static IBackupVault fromBackupVaultName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String backupVaultName)
      Import an existing backup vault by name.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupVaultName - This parameter is required.
    • addToAccessPolicy

      @Stability(Stable) public void addToAccessPolicy(@NotNull PolicyStatement statement)
      Adds a statement to the vault access policy.

      Parameters:
      statement - This parameter is required.
    • blockRecoveryPointDeletion

      @Stability(Stable) public void blockRecoveryPointDeletion()
      Adds a statement to the vault access policy that prevents anyone from deleting a recovery point.
    • grant

      @Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions)
      Grant the actions defined in actions to the given grantee on this Backup Vault resource.

      Specified by:
      grant in interface IBackupVault
      Parameters:
      grantee - Principal to grant right to. This parameter is required.
      actions - The actions to grant. This parameter is required.
    • getBackupVaultArn

      @Stability(Stable) @NotNull public String getBackupVaultArn()
      The ARN of the backup vault.
      Specified by:
      getBackupVaultArn in interface IBackupVault
    • getBackupVaultName

      @Stability(Stable) @NotNull public String getBackupVaultName()
      The name of a logical container where backups are stored.
      Specified by:
      getBackupVaultName in interface IBackupVault