Class: AWSCDK::DLM::CfnLifecyclePolicy::DeprecateRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DLM::CfnLifecyclePolicy::DeprecateRuleProperty
- Defined in:
- dlm/cfn_lifecycle_policy.rb
Overview
[Custom AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.
For age-based schedules, you must specify Interval and IntervalUnit . For count-based schedules, you must specify Count .
Instance Attribute Summary collapse
-
#count ⇒ Numeric?
readonly
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate.
-
#interval ⇒ Numeric?
readonly
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule.
-
#interval_unit ⇒ String?
readonly
The unit of time in which to measure the Interval .
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(count: nil, interval: nil, interval_unit: nil) ⇒ DeprecateRuleProperty
constructor
A new instance of DeprecateRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(count: nil, interval: nil, interval_unit: nil) ⇒ DeprecateRuleProperty
Returns a new instance of DeprecateRuleProperty.
1182 1183 1184 1185 1186 1187 1188 1189 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1182 def initialize(count: nil, interval: nil, interval_unit: nil) @count = count Jsii::Type.check_type(@count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "count") unless @count.nil? @interval = interval Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "interval") unless @interval.nil? @interval_unit = interval_unit Jsii::Type.check_type(@interval_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "intervalUnit") unless @interval_unit.nil? end |
Instance Attribute Details
#count ⇒ Numeric? (readonly)
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate.
The count must be less than or equal to the schedule's retention count, and it can't be greater than 1000.
1197 1198 1199 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1197 def count @count end |
#interval ⇒ Numeric? (readonly)
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule.
The period must be less than or equal to the schedule's retention period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.
1204 1205 1206 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1204 def interval @interval end |
#interval_unit ⇒ String? (readonly)
The unit of time in which to measure the Interval .
1209 1210 1211 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1209 def interval_unit @interval_unit end |
Class Method Details
.jsii_properties ⇒ Object
1211 1212 1213 1214 1215 1216 1217 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1211 def self.jsii_properties { :count => "count", :interval => "interval", :interval_unit => "intervalUnit", } end |
Instance Method Details
#to_jsii ⇒ Object
1219 1220 1221 1222 1223 1224 1225 1226 1227 |
# File 'dlm/cfn_lifecycle_policy.rb', line 1219 def to_jsii result = {} result.merge!({ "count" => @count, "interval" => @interval, "intervalUnit" => @interval_unit, }) result.compact end |