Class: AWSCDK::Backup::BackupPlanProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
backup/backup_plan_props.rb

Overview

Properties for a BackupPlan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(backup_plan_name: nil, backup_plan_rules: nil, backup_vault: nil, windows_vss: nil) ⇒ BackupPlanProps

Returns a new instance of BackupPlanProps.

Parameters:

  • backup_plan_name (String, nil) (defaults to: nil)

    The display name of the backup plan.

  • backup_plan_rules (Array<AWSCDK::Backup::BackupPlanRule>, nil) (defaults to: nil)

    Rules for the backup plan.

  • backup_vault (AWSCDK::Interfaces::AWSBackup::IBackupVaultRef, nil) (defaults to: nil)

    The backup vault where backups are stored.

  • windows_vss (Boolean, nil) (defaults to: nil)

    Enable Windows VSS backup.



11
12
13
14
15
16
17
18
19
20
# File 'backup/backup_plan_props.rb', line 11

def initialize(backup_plan_name: nil, backup_plan_rules: nil, backup_vault: nil, windows_vss: nil)
  @backup_plan_name = backup_plan_name
  Jsii::Type.check_type(@backup_plan_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "backupPlanName") unless @backup_plan_name.nil?
  @backup_plan_rules = backup_plan_rules
  Jsii::Type.check_type(@backup_plan_rules, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYWNrdXAuQmFja3VwUGxhblJ1bGUifSwia2luZCI6ImFycmF5In19")), "backupPlanRules") unless @backup_plan_rules.nil?
  @backup_vault = backup_vault
  Jsii::Type.check_type(@backup_vault, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19iYWNrdXAuSUJhY2t1cFZhdWx0UmVmIn0=")), "backupVault") unless @backup_vault.nil?
  @windows_vss = windows_vss
  Jsii::Type.check_type(@windows_vss, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "windowsVss") unless @windows_vss.nil?
end

Instance Attribute Details

#backup_plan_nameString? (readonly)

Note:

Default: - A CDK generated name

The display name of the backup plan.

Returns:

  • (String, nil)


26
27
28
# File 'backup/backup_plan_props.rb', line 26

def backup_plan_name
  @backup_plan_name
end

#backup_plan_rulesArray<AWSCDK::Backup::BackupPlanRule>? (readonly)

Note:

Default: - use addRule() to add rules

Rules for the backup plan.

Use add_rule() to add rules after instantiation.

Returns:



34
35
36
# File 'backup/backup_plan_props.rb', line 34

def backup_plan_rules
  @backup_plan_rules
end

#backup_vaultAWSCDK::Interfaces::AWSBackup::IBackupVaultRef? (readonly)

Note:

Default: - use the vault defined at the rule level. If not defined a new common vault for the plan will be created

The backup vault where backups are stored.



39
40
41
# File 'backup/backup_plan_props.rb', line 39

def backup_vault
  @backup_vault
end

#windows_vssBoolean? (readonly)

Note:

Default: false

Enable Windows VSS backup.



45
46
47
# File 'backup/backup_plan_props.rb', line 45

def windows_vss
  @windows_vss
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'backup/backup_plan_props.rb', line 47

def self.jsii_properties
  {
    :backup_plan_name => "backupPlanName",
    :backup_plan_rules => "backupPlanRules",
    :backup_vault => "backupVault",
    :windows_vss => "windowsVss",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'backup/backup_plan_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "backupPlanName" => @backup_plan_name,
    "backupPlanRules" => @backup_plan_rules,
    "backupVault" => @backup_vault,
    "windowsVss" => @windows_vss,
  })
  result.compact
end