Class BackupPlan
A backup plan.
Inherited Members
Namespace: Amazon.CDK.AWS.Backup
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class BackupPlan : Resource, IBackupPlan, IResource, IBackupPlanRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class BackupPlan Inherits Resource Implements IBackupPlan, IResource, IBackupPlanRef, IConstruct, IDependable, IEnvironmentAware
Remarks
ExampleMetadata: infused
Examples
// Daily, weekly and monthly with 5 year retention
var plan = BackupPlan.DailyWeeklyMonthly5YearRetention(this, "Plan");
Synopsis
Constructors
| BackupPlan(Construct, string, IBackupPlanProps?) | A backup plan. |
Properties
| BackupPlanArn | The ARN of the backup plan. |
| BackupPlanId | The identifier of the backup plan. |
| BackupPlanRef | A reference to a BackupPlan resource. |
| BackupVault | The backup vault where backups are stored if not defined at the rule level. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| VersionId | Version Id. |
Methods
| AddRule(BackupPlanRule) | Adds a rule to a plan. |
| AddSelection(string, IBackupSelectionOptions) | Adds a selection to this plan. |
| Daily35DayRetention(Construct, string, IBackupVaultRef?) | Daily with 35 day retention. |
| DailyMonthly1YearRetention(Construct, string, IBackupVaultRef?) | Daily and monthly with 1 year retention. |
| DailyWeeklyMonthly5YearRetention(Construct, string, IBackupVaultRef?) | Daily, weekly and monthly with 5 year retention. |
| DailyWeeklyMonthly7YearRetention(Construct, string, IBackupVaultRef?) | Daily, weekly and monthly with 7 year retention. |
| FromBackupPlanId(Construct, string, string) | Import an existing backup plan. |
Constructors
BackupPlan(Construct, string, IBackupPlanProps?)
A backup plan.
public BackupPlan(Construct scope, string id, IBackupPlanProps? props = null)
Parameters
- scope Construct
- id string
- props IBackupPlanProps
Remarks
ExampleMetadata: infused
Examples
// Daily, weekly and monthly with 5 year retention
var plan = BackupPlan.DailyWeeklyMonthly5YearRetention(this, "Plan");
Properties
BackupPlanArn
The ARN of the backup plan.
public virtual string BackupPlanArn { get; }
Property Value
Remarks
Attribute: true
BackupPlanId
The identifier of the backup plan.
public virtual string BackupPlanId { get; }
Property Value
Remarks
ExampleMetadata: infused
BackupPlanRef
A reference to a BackupPlan resource.
public virtual IBackupPlanReference BackupPlanRef { get; }
Property Value
Remarks
ExampleMetadata: infused
BackupVault
The backup vault where backups are stored if not defined at the rule level.
public virtual IBackupVault BackupVault { get; }
Property Value
Remarks
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
VersionId
Methods
AddRule(BackupPlanRule)
Adds a rule to a plan.
public virtual void AddRule(BackupPlanRule rule)
Parameters
- rule BackupPlanRule
the rule to add.
Remarks
ExampleMetadata: infused
AddSelection(string, IBackupSelectionOptions)
Adds a selection to this plan.
public virtual BackupSelection AddSelection(string id, IBackupSelectionOptions options)
Parameters
- id string
- options IBackupSelectionOptions
Returns
Remarks
ExampleMetadata: infused
Daily35DayRetention(Construct, string, IBackupVaultRef?)
Daily with 35 day retention.
public static BackupPlan Daily35DayRetention(Construct scope, string id, IBackupVaultRef? backupVault = null)
Parameters
- scope Construct
- id string
- backupVault IBackupVaultRef
Returns
Remarks
ExampleMetadata: infused
DailyMonthly1YearRetention(Construct, string, IBackupVaultRef?)
Daily and monthly with 1 year retention.
public static BackupPlan DailyMonthly1YearRetention(Construct scope, string id, IBackupVaultRef? backupVault = null)
Parameters
- scope Construct
- id string
- backupVault IBackupVaultRef
Returns
Remarks
ExampleMetadata: infused
DailyWeeklyMonthly5YearRetention(Construct, string, IBackupVaultRef?)
Daily, weekly and monthly with 5 year retention.
public static BackupPlan DailyWeeklyMonthly5YearRetention(Construct scope, string id, IBackupVaultRef? backupVault = null)
Parameters
- scope Construct
- id string
- backupVault IBackupVaultRef
Returns
Remarks
ExampleMetadata: infused
DailyWeeklyMonthly7YearRetention(Construct, string, IBackupVaultRef?)
Daily, weekly and monthly with 7 year retention.
public static BackupPlan DailyWeeklyMonthly7YearRetention(Construct scope, string id, IBackupVaultRef? backupVault = null)
Parameters
- scope Construct
- id string
- backupVault IBackupVaultRef
Returns
Remarks
ExampleMetadata: infused
FromBackupPlanId(Construct, string, string)
Import an existing backup plan.
public static IBackupPlan FromBackupPlanId(Construct scope, string id, string backupPlanId)
Parameters
Returns
Remarks
ExampleMetadata: infused