@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-19T23:09:24.517Z") @Stability(value=Stable) public interface LifecycleRule extends software.amazon.jsii.JsiiSerializable
Example:
Repository repository; repository.addLifecycleRule(LifecycleRule.builder().tagPrefixList(List.of("prod")).maxImageCount(9999).build()); repository.addLifecycleRule(LifecycleRule.builder().maxImageAge(Duration.days(30)).build());
Modifier and Type | Interface and Description |
---|---|
static class |
LifecycleRule.Builder
A builder for
LifecycleRule |
static class |
LifecycleRule.Jsii$Proxy
An implementation for
LifecycleRule |
Modifier and Type | Method and Description |
---|---|
static LifecycleRule.Builder |
builder() |
default String |
getDescription()
Describes the purpose of the rule.
|
default Duration |
getMaxImageAge()
The maximum age of images to retain.
|
default Number |
getMaxImageCount()
The maximum number of images to retain.
|
default Number |
getRulePriority()
Controls the order in which rules are evaluated (low to high).
|
default List<String> |
getTagPrefixList()
Select images that have ALL the given prefixes in their tag.
|
default TagStatus |
getTagStatus()
Select images based on tags.
|
@Stability(value=Stable) @Nullable default String getDescription()
Default: No description
@Stability(value=Stable) @Nullable default Duration getMaxImageAge()
Specify exactly one of maxImageCount and maxImageAge.
@Stability(value=Stable) @Nullable default Number getMaxImageCount()
Specify exactly one of maxImageCount and maxImageAge.
@Stability(value=Stable) @Nullable default Number getRulePriority()
All rules must have a unique priority, where lower numbers have higher precedence. The first rule that matches is applied to an image.
There can only be one rule with a tagStatus of Any, and it must have the highest rulePriority.
All rules without a specified priority will have incrementing priorities automatically assigned to them, higher than any rules that DO have priorities.
Default: Automatically assigned
@Stability(value=Stable) @Nullable default List<String> getTagPrefixList()
Only if tagStatus == TagStatus.Tagged
@Stability(value=Stable) @Nullable default TagStatus getTagStatus()
Only one rule is allowed to select untagged images, and it must have the highest rulePriority.
Default: TagStatus.Tagged if tagPrefixList is given, TagStatus.Any otherwise
@Stability(value=Stable) static LifecycleRule.Builder builder()
LifecycleRule.Builder
of LifecycleRule
Copyright © 2023. All rights reserved.