Class: AWSCDK::ImageBuilder::CfnLifecyclePolicy::LastLaunchedProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ImageBuilder::CfnLifecyclePolicy::LastLaunchedProperty
- Defined in:
- image_builder/cfn_lifecycle_policy.rb
Overview
Defines criteria to exclude AMIs from lifecycle actions based on the last time they were used to launch an instance.
Instance Attribute Summary collapse
-
#unit ⇒ String
readonly
Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI.
-
#value ⇒ Numeric
readonly
The integer number of units for the time period.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(unit:, value:) ⇒ LastLaunchedProperty
constructor
A new instance of LastLaunchedProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(unit:, value:) ⇒ LastLaunchedProperty
Returns a new instance of LastLaunchedProperty.
892 893 894 895 896 897 |
# File 'image_builder/cfn_lifecycle_policy.rb', line 892 def initialize(unit:, value:) @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") end |
Instance Attribute Details
#unit ⇒ String (readonly)
Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI.
For example: days, weeks, months, or years.
905 906 907 |
# File 'image_builder/cfn_lifecycle_policy.rb', line 905 def unit @unit end |
#value ⇒ Numeric (readonly)
The integer number of units for the time period.
For example 6 (months).
912 913 914 |
# File 'image_builder/cfn_lifecycle_policy.rb', line 912 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
914 915 916 917 918 919 |
# File 'image_builder/cfn_lifecycle_policy.rb', line 914 def self.jsii_properties { :unit => "unit", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
921 922 923 924 925 926 927 928 |
# File 'image_builder/cfn_lifecycle_policy.rb', line 921 def to_jsii result = {} result.merge!({ "unit" => @unit, "value" => @value, }) result.compact end |