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.106.0 (build e852934)",
date="2025-02-05T22:41:59.763Z")
@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");
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.backup.IBackupVault
IBackupVault.Jsii$Default, IBackupVault.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BackupVault
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
BackupVault
(software.amazon.jsii.JsiiObjectRef objRef) BackupVault
(software.constructs.Construct scope, String id) BackupVault
(software.constructs.Construct scope, String id, BackupVaultProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToAccessPolicy
(PolicyStatement statement) Adds a statement to the vault access policy.void
Adds a statement to the vault access policy that prevents anyone from deleting a recovery point.static IBackupVault
fromBackupVaultArn
(software.constructs.Construct scope, String id, String backupVaultArn) Import an existing backup vault by arn.static IBackupVault
fromBackupVaultName
(software.constructs.Construct scope, String id, String backupVaultName) Import an existing backup vault by name.The ARN of the backup vault.The name of a logical container where backups are stored.grant
(IGrantable grantee, @NotNull String... actions) Grant the actions defined in actions to the given grantee on this Backup Vault resource.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
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 interfaceIBackupVault
- Parameters:
grantee
- Principal to grant right to. This parameter is required.actions
- The actions to grant. This parameter is required.
-
getBackupVaultArn
The ARN of the backup vault.- Specified by:
getBackupVaultArn
in interfaceIBackupVault
-
getBackupVaultName
The name of a logical container where backups are stored.- Specified by:
getBackupVaultName
in interfaceIBackupVault
-