Class: AWSCDK::Backup::BackupPlanCopyActionProps

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

Overview

Properties for a BackupPlanCopyAction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination_backup_vault:, delete_after: nil, move_to_cold_storage_after: nil) ⇒ BackupPlanCopyActionProps

Returns a new instance of BackupPlanCopyActionProps.

Parameters:

  • destination_backup_vault (AWSCDK::Interfaces::AWSBackup::IBackupVaultRef)

    Destination Vault for recovery points to be copied into.

  • delete_after (AWSCDK::Duration, nil) (defaults to: nil)

    Specifies the duration after creation that a copied recovery point is deleted from the destination vault.

  • move_to_cold_storage_after (AWSCDK::Duration, nil) (defaults to: nil)

    Specifies the duration after creation that a copied recovery point is moved to cold storage.



10
11
12
13
14
15
16
17
# File 'backup/backup_plan_copy_action_props.rb', line 10

def initialize(destination_backup_vault:, delete_after: nil, move_to_cold_storage_after: nil)
  @destination_backup_vault = destination_backup_vault
  Jsii::Type.check_type(@destination_backup_vault, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19iYWNrdXAuSUJhY2t1cFZhdWx0UmVmIn0=")), "destinationBackupVault")
  @delete_after = delete_after
  Jsii::Type.check_type(@delete_after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "deleteAfter") unless @delete_after.nil?
  @move_to_cold_storage_after = move_to_cold_storage_after
  Jsii::Type.check_type(@move_to_cold_storage_after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "moveToColdStorageAfter") unless @move_to_cold_storage_after.nil?
end

Instance Attribute Details

#delete_afterAWSCDK::Duration? (readonly)

Note:

Default: - recovery point is never deleted

Specifies the duration after creation that a copied recovery point is deleted from the destination vault.

Must be at least 90 days greater than move_to_cold_storage_after, if specified.

Returns:



29
30
31
# File 'backup/backup_plan_copy_action_props.rb', line 29

def delete_after
  @delete_after
end

#destination_backup_vaultAWSCDK::Interfaces::AWSBackup::IBackupVaultRef (readonly)

Destination Vault for recovery points to be copied into.



22
23
24
# File 'backup/backup_plan_copy_action_props.rb', line 22

def destination_backup_vault
  @destination_backup_vault
end

#move_to_cold_storage_afterAWSCDK::Duration? (readonly)

Note:

Default: - recovery point is never moved to cold storage

Specifies the duration after creation that a copied recovery point is moved to cold storage.

Returns:



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

def move_to_cold_storage_after
  @move_to_cold_storage_after
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'backup/backup_plan_copy_action_props.rb', line 36

def self.jsii_properties
  {
    :destination_backup_vault => "destinationBackupVault",
    :delete_after => "deleteAfter",
    :move_to_cold_storage_after => "moveToColdStorageAfter",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'backup/backup_plan_copy_action_props.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "destinationBackupVault" => @destination_backup_vault,
    "deleteAfter" => @delete_after,
    "moveToColdStorageAfter" => @move_to_cold_storage_after,
  })
  result.compact
end