Class BackupPlan

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.593Z") @Stability(Stable) public class BackupPlan extends Resource implements IBackupPlan
A backup plan.

Example:

 // Daily, weekly and monthly with 5 year retention
 BackupPlan plan = BackupPlan.dailyWeeklyMonthly5YearRetention(this, "Plan");
 
  • Constructor Details

    • BackupPlan

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

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

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

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

    • daily35DayRetention

      @Stability(Stable) @NotNull public static BackupPlan daily35DayRetention(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable IBackupVault backupVault)
      Daily with 35 day retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupVault -
    • daily35DayRetention

      @Stability(Stable) @NotNull public static BackupPlan daily35DayRetention(@NotNull software.constructs.Construct scope, @NotNull String id)
      Daily with 35 day retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
    • dailyMonthly1YearRetention

      @Stability(Stable) @NotNull public static BackupPlan dailyMonthly1YearRetention(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable IBackupVault backupVault)
      Daily and monthly with 1 year retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupVault -
    • dailyMonthly1YearRetention

      @Stability(Stable) @NotNull public static BackupPlan dailyMonthly1YearRetention(@NotNull software.constructs.Construct scope, @NotNull String id)
      Daily and monthly with 1 year retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
    • dailyWeeklyMonthly5YearRetention

      @Stability(Stable) @NotNull public static BackupPlan dailyWeeklyMonthly5YearRetention(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable IBackupVault backupVault)
      Daily, weekly and monthly with 5 year retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupVault -
    • dailyWeeklyMonthly5YearRetention

      @Stability(Stable) @NotNull public static BackupPlan dailyWeeklyMonthly5YearRetention(@NotNull software.constructs.Construct scope, @NotNull String id)
      Daily, weekly and monthly with 5 year retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
    • dailyWeeklyMonthly7YearRetention

      @Stability(Stable) @NotNull public static BackupPlan dailyWeeklyMonthly7YearRetention(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable IBackupVault backupVault)
      Daily, weekly and monthly with 7 year retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupVault -
    • dailyWeeklyMonthly7YearRetention

      @Stability(Stable) @NotNull public static BackupPlan dailyWeeklyMonthly7YearRetention(@NotNull software.constructs.Construct scope, @NotNull String id)
      Daily, weekly and monthly with 7 year retention.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
    • fromBackupPlanId

      @Stability(Stable) @NotNull public static IBackupPlan fromBackupPlanId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String backupPlanId)
      Import an existing backup plan.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      backupPlanId - This parameter is required.
    • addRule

      @Stability(Stable) public void addRule(@NotNull BackupPlanRule rule)
      Adds a rule to a plan.

      Parameters:
      rule - the rule to add. This parameter is required.
    • addSelection

      @Stability(Stable) @NotNull public BackupSelection addSelection(@NotNull String id, @NotNull BackupSelectionOptions options)
      Adds a selection to this plan.

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • validate

      @Stability(Stable) @NotNull protected List<String> validate()
      Validate the current construct.

      This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

      Overrides:
      validate in class Construct
      Returns:
      An array of validation error messages, or an empty array if the construct is valid.
    • getBackupPlanArn

      @Stability(Stable) @NotNull public String getBackupPlanArn()
      The ARN of the backup plan.
    • getBackupPlanId

      @Stability(Stable) @NotNull public String getBackupPlanId()
      The identifier of the backup plan.
      Specified by:
      getBackupPlanId in interface IBackupPlan
    • getBackupVault

      @Stability(Stable) @NotNull public IBackupVault getBackupVault()
      The backup vault where backups are stored if not defined at the rule level.
    • getVersionId

      @Stability(Stable) @NotNull public String getVersionId()
      Version Id.