AWS::ImageBuilder::LifecyclePolicy Filter
Defines filters that the lifecycle policy uses to determine impacted resource.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "RetainAtLeast" :
Integer
, "Type" :String
, "Unit" :String
, "Value" :Integer
}
YAML
RetainAtLeast:
Integer
Type:String
Unit:String
Value:Integer
Properties
RetainAtLeast
-
For age-based filters, this is the number of resources to keep on hand after the lifecycle
DELETE
action is applied. Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted.Required: No
Type: Integer
Minimum:
1
Maximum:
10
Update requires: No interruption
Type
-
Filter resources based on either
age
orcount
.Required: Yes
Type: String
Allowed values:
AGE | COUNT
Update requires: No interruption
Unit
-
Defines the unit of time that the lifecycle policy uses to determine impacted resources. This is required for age-based rules.
Required: No
Type: String
Allowed values:
DAYS | WEEKS | MONTHS | YEARS
Update requires: No interruption
Value
-
The number of units for the time period or for the count. For example, a value of
6
might refer to six months or six AMIs.Note
For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions.
Required: Yes
Type: Integer
Minimum:
1
Maximum:
1000
Update requires: No interruption