Class: AWSCDK::Backup::CfnBackupVault::LockConfigurationTypeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Backup::CfnBackupVault::LockConfigurationTypeProperty
- Defined in:
- backup/cfn_backup_vault.rb
Overview
The LockConfigurationType property type specifies configuration for AWS Backup Vault Lock .
Instance Attribute Summary collapse
-
#changeable_for_days ⇒ Numeric?
readonly
The AWS Backup Vault Lock configuration that specifies the number of days before the lock date.
-
#max_retention_days ⇒ Numeric?
readonly
The AWS Backup Vault Lock configuration that specifies the maximum retention period that the vault retains its recovery points.
-
#min_retention_days ⇒ Numeric
readonly
The AWS Backup Vault Lock configuration that specifies the minimum retention period that the vault retains its recovery points.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(min_retention_days:, changeable_for_days: nil, max_retention_days: nil) ⇒ LockConfigurationTypeProperty
constructor
A new instance of LockConfigurationTypeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(min_retention_days:, changeable_for_days: nil, max_retention_days: nil) ⇒ LockConfigurationTypeProperty
Returns a new instance of LockConfigurationTypeProperty.
629 630 631 632 633 634 635 636 |
# File 'backup/cfn_backup_vault.rb', line 629 def initialize(min_retention_days:, changeable_for_days: nil, max_retention_days: nil) @min_retention_days = min_retention_days Jsii::Type.check_type(@min_retention_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minRetentionDays") @changeable_for_days = changeable_for_days Jsii::Type.check_type(@changeable_for_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "changeableForDays") unless @changeable_for_days.nil? @max_retention_days = max_retention_days Jsii::Type.check_type(@max_retention_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxRetentionDays") unless @max_retention_days.nil? end |
Instance Attribute Details
#changeable_for_days ⇒ Numeric? (readonly)
The AWS Backup Vault Lock configuration that specifies the number of days before the lock date.
For example, setting ChangeableForDays to 30 on Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.
AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable. Therefore, you must set ChangeableForDays to 3 or greater.
Before the lock date, you can delete Vault Lock from the vault using DeleteBackupVaultLockConfiguration or change the Vault Lock configuration using PutBackupVaultLockConfiguration . On and after the lock date, the Vault Lock becomes immutable and cannot be changed or deleted.
If this parameter is not specified, you can delete Vault Lock from the vault using DeleteBackupVaultLockConfiguration or change the Vault Lock configuration using PutBackupVaultLockConfiguration at any time.
661 662 663 |
# File 'backup/cfn_backup_vault.rb', line 661 def changeable_for_days @changeable_for_days end |
#max_retention_days ⇒ Numeric? (readonly)
The AWS Backup Vault Lock configuration that specifies the maximum retention period that the vault retains its recovery points.
This setting can be useful if, for example, your organization's policies require you to destroy certain data after retaining it for four years (1460 days).
If this parameter is not included, Vault Lock does not enforce a maximum retention period on the recovery points in the vault. If this parameter is included without a value, Vault Lock will not enforce a maximum retention period.
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.
672 673 674 |
# File 'backup/cfn_backup_vault.rb', line 672 def max_retention_days @max_retention_days end |
#min_retention_days ⇒ Numeric (readonly)
The AWS Backup Vault Lock configuration that specifies the minimum retention period that the vault retains its recovery points.
This setting can be useful if, for example, your organization's policies require you to retain certain data for at least seven years (2555 days).
If this parameter is not specified, Vault Lock will not enforce a minimum retention period.
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.
648 649 650 |
# File 'backup/cfn_backup_vault.rb', line 648 def min_retention_days @min_retention_days end |
Class Method Details
.jsii_properties ⇒ Object
674 675 676 677 678 679 680 |
# File 'backup/cfn_backup_vault.rb', line 674 def self.jsii_properties { :min_retention_days => "minRetentionDays", :changeable_for_days => "changeableForDays", :max_retention_days => "maxRetentionDays", } end |
Instance Method Details
#to_jsii ⇒ Object
682 683 684 685 686 687 688 689 690 |
# File 'backup/cfn_backup_vault.rb', line 682 def to_jsii result = {} result.merge!({ "minRetentionDays" => @min_retention_days, "changeableForDays" => @changeable_for_days, "maxRetentionDays" => @max_retention_days, }) result.compact end |