Class BackupVault
A backup vault.
Inherited Members
Namespace: Amazon.CDK.AWS.Backup
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class BackupVault : Resource, IBackupVault, IResource
Syntax (vb)
Public Class BackupVault
Inherits Resource
Implements IBackupVault, IResource
Remarks
ExampleMetadata: infused
Examples
var importedVault = BackupVault.FromBackupVaultName(this, "Vault", "myVaultName");
var role = new Role(this, "Access Role", new RoleProps { AssumedBy = new ServicePrincipal("lambda.amazonaws.com") });
importedVault.Grant(role, "backup:StartBackupJob");
Synopsis
Constructors
BackupVault(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
BackupVault(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
BackupVault(Construct, String, IBackupVaultProps) |
Properties
BackupVaultArn | The ARN of the backup vault. |
BackupVaultName | The name of a logical container where backups are stored. |
Methods
AddToAccessPolicy(PolicyStatement) | Adds a statement to the vault access policy. |
BlockRecoveryPointDeletion() | Adds a statement to the vault access policy that prevents anyone from deleting a recovery point. |
FromBackupVaultArn(Construct, String, String) | Import an existing backup vault by arn. |
FromBackupVaultName(Construct, String, String) | Import an existing backup vault by name. |
Grant(IGrantable, String[]) | Grant the actions defined in actions to the given grantee on this Backup Vault resource. |
Constructors
BackupVault(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected BackupVault(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
BackupVault(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected BackupVault(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
BackupVault(Construct, String, IBackupVaultProps)
public BackupVault(Construct scope, string id, IBackupVaultProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IBackupVaultProps
Properties
BackupVaultArn
The ARN of the backup vault.
public virtual string BackupVaultArn { get; }
Property Value
System.String
BackupVaultName
The name of a logical container where backups are stored.
public virtual string BackupVaultName { get; }
Property Value
System.String
Methods
AddToAccessPolicy(PolicyStatement)
Adds a statement to the vault access policy.
public virtual void AddToAccessPolicy(PolicyStatement statement)
Parameters
- statement PolicyStatement
BlockRecoveryPointDeletion()
Adds a statement to the vault access policy that prevents anyone from deleting a recovery point.
public virtual void BlockRecoveryPointDeletion()
FromBackupVaultArn(Construct, String, String)
Import an existing backup vault by arn.
public static IBackupVault FromBackupVaultArn(Construct scope, string id, string backupVaultArn)
Parameters
- scope Constructs.Construct
- id System.String
- backupVaultArn System.String
Returns
FromBackupVaultName(Construct, String, String)
Import an existing backup vault by name.
public static IBackupVault FromBackupVaultName(Construct scope, string id, string backupVaultName)
Parameters
- scope Constructs.Construct
- id System.String
- backupVaultName System.String
Returns
Grant(IGrantable, String[])
Grant the actions defined in actions to the given grantee on this Backup Vault resource.
public virtual Grant Grant(IGrantable grantee, params string[] actions)
Parameters
- grantee IGrantable
Principal to grant right to.
- actions System.String[]
The actions to grant.
Returns