@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:30.886Z") public class BackupVault extends Resource implements IBackupVault
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");
Modifier and Type | Class and Description |
---|---|
static class |
BackupVault.Builder
A fluent builder for
BackupVault . |
IBackupVault.Jsii$Default, IBackupVault.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
BackupVault(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
BackupVault(software.amazon.jsii.JsiiObjectRef objRef) |
|
BackupVault(software.constructs.Construct scope,
java.lang.String id) |
|
BackupVault(software.constructs.Construct scope,
java.lang.String id,
BackupVaultProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addToAccessPolicy(PolicyStatement statement)
Adds a statement to the vault access policy.
|
void |
blockRecoveryPointDeletion()
Adds a statement to the vault access policy that prevents anyone from deleting a recovery point.
|
static IBackupVault |
fromBackupVaultArn(software.constructs.Construct scope,
java.lang.String id,
java.lang.String backupVaultArn)
Import an existing backup vault by arn.
|
static IBackupVault |
fromBackupVaultName(software.constructs.Construct scope,
java.lang.String id,
java.lang.String backupVaultName)
Import an existing backup vault by name.
|
java.lang.String |
getBackupVaultArn()
The ARN of the backup vault.
|
java.lang.String |
getBackupVaultName()
The name of a logical container where backups are stored.
|
Grant |
grant(IGrantable grantee,
java.lang.String... actions)
Grant the actions defined in actions to the given grantee on this Backup Vault resource.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected BackupVault(software.amazon.jsii.JsiiObjectRef objRef)
protected BackupVault(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public BackupVault(software.constructs.Construct scope, java.lang.String id, BackupVaultProps props)
scope
- This parameter is required.id
- This parameter is required.props
- public BackupVault(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.public static IBackupVault fromBackupVaultArn(software.constructs.Construct scope, java.lang.String id, java.lang.String backupVaultArn)
scope
- This parameter is required.id
- This parameter is required.backupVaultArn
- This parameter is required.public static IBackupVault fromBackupVaultName(software.constructs.Construct scope, java.lang.String id, java.lang.String backupVaultName)
scope
- This parameter is required.id
- This parameter is required.backupVaultName
- This parameter is required.public void addToAccessPolicy(PolicyStatement statement)
statement
- This parameter is required.public void blockRecoveryPointDeletion()
public Grant grant(IGrantable grantee, java.lang.String... actions)
grant
in interface IBackupVault
grantee
- Principal to grant right to. This parameter is required.actions
- The actions to grant. This parameter is required.public java.lang.String getBackupVaultArn()
getBackupVaultArn
in interface IBackupVault
public java.lang.String getBackupVaultName()
getBackupVaultName
in interface IBackupVault