Class: AWSCDK::Backup::LockConfiguration

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

Overview

Configuration for AWS Backup Vault Lock.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(min_retention:, changeable_for: nil, max_retention: nil) ⇒ LockConfiguration

Returns a new instance of LockConfiguration.

Parameters:

  • min_retention (AWSCDK::Duration)

    The minimum retention period that the vault retains its recovery points.

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

    The duration before the lock date.

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

    The maximum retention period that the vault retains its recovery points.



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

def initialize(min_retention:, changeable_for: nil, max_retention: nil)
  @min_retention = min_retention
  Jsii::Type.check_type(@min_retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "minRetention")
  @changeable_for = changeable_for
  Jsii::Type.check_type(@changeable_for, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "changeableFor") unless @changeable_for.nil?
  @max_retention = max_retention
  Jsii::Type.check_type(@max_retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxRetention") unless @max_retention.nil?
end

Instance Attribute Details

#changeable_forAWSCDK::Duration? (readonly)

Note:

Default: - Vault Lock can be deleted or changed at any time

The duration before the lock date.

AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable.

Before the lock date, you can delete Vault Lock from the vault or change the Vault Lock configuration. On and after the lock date, the Vault Lock becomes immutable and cannot be changed or deleted.

Returns:



44
45
46
# File 'backup/lock_configuration.rb', line 44

def changeable_for
  @changeable_for
end

#max_retentionAWSCDK::Duration? (readonly)

Note:

Default: - Vault Lock does not enforce a maximum retention period

The maximum retention period that the vault retains its recovery points.

If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or shorter than the maximum retention period. If the job's retention period is longer than that maximum retention period, then the vault fails the backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already saved in the vault prior to Vault Lock are not affected.

Returns:



57
58
59
# File 'backup/lock_configuration.rb', line 57

def max_retention
  @max_retention
end

#min_retentionAWSCDK::Duration (readonly)

The minimum retention period that the vault retains its recovery points.

If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or longer than the minimum retention period. If the job's retention period is shorter than that minimum retention period, then the vault fails that backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already saved in the vault prior to Vault Lock are not affected.

Returns:



32
33
34
# File 'backup/lock_configuration.rb', line 32

def min_retention
  @min_retention
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
# File 'backup/lock_configuration.rb', line 59

def self.jsii_properties
  {
    :min_retention => "minRetention",
    :changeable_for => "changeableFor",
    :max_retention => "maxRetention",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
# File 'backup/lock_configuration.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "minRetention" => @min_retention,
    "changeableFor" => @changeable_for,
    "maxRetention" => @max_retention,
  })
  result.compact
end