Class: AWSCDK::Rbin::CfnRule::RetentionPeriodProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Rbin::CfnRule::RetentionPeriodProperty
- Defined in:
- rbin/cfn_rule.rb
Overview
Information about the retention period for which the retention rule is to retain resources.
Instance Attribute Summary collapse
-
#retention_period_unit ⇒ String
readonly
The unit of time in which the retention period is measured.
-
#retention_period_value ⇒ Numeric
readonly
The period value for which the retention rule is to retain resources, measured in days.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(retention_period_unit:, retention_period_value:) ⇒ RetentionPeriodProperty
constructor
A new instance of RetentionPeriodProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(retention_period_unit:, retention_period_value:) ⇒ RetentionPeriodProperty
Returns a new instance of RetentionPeriodProperty.
680 681 682 683 684 685 |
# File 'rbin/cfn_rule.rb', line 680 def initialize(retention_period_unit:, retention_period_value:) @retention_period_unit = retention_period_unit Jsii::Type.check_type(@retention_period_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "retentionPeriodUnit") @retention_period_value = retention_period_value Jsii::Type.check_type(@retention_period_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retentionPeriodValue") end |
Instance Attribute Details
#retention_period_unit ⇒ String (readonly)
The unit of time in which the retention period is measured.
Currently, only DAYS is supported.
693 694 695 |
# File 'rbin/cfn_rule.rb', line 693 def retention_period_unit @retention_period_unit end |
#retention_period_value ⇒ Numeric (readonly)
The period value for which the retention rule is to retain resources, measured in days.
The supported retention periods are:
- EBS volumes: 1 - 7 days
- EBS snapshots and EBS-backed AMIs: 1 - 365 days
703 704 705 |
# File 'rbin/cfn_rule.rb', line 703 def retention_period_value @retention_period_value end |
Class Method Details
.jsii_properties ⇒ Object
705 706 707 708 709 710 |
# File 'rbin/cfn_rule.rb', line 705 def self.jsii_properties { :retention_period_unit => "retentionPeriodUnit", :retention_period_value => "retentionPeriodValue", } end |
Instance Method Details
#to_jsii ⇒ Object
712 713 714 715 716 717 718 719 |
# File 'rbin/cfn_rule.rb', line 712 def to_jsii result = {} result.merge!({ "retentionPeriodUnit" => @retention_period_unit, "retentionPeriodValue" => @retention_period_value, }) result.compact end |