Interface LifecycleRule

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.430Z") @Stability(Stable) public interface LifecycleRule extends
An ECR life cycle rule.


 Repository repository;
  • Method Details

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      Describes the purpose of the rule.

      Default: No description

    • getMaxImageAge

      @Stability(Stable) @Nullable default Duration getMaxImageAge()
      The maximum age of images to retain. The value must represent a number of days.

      Specify exactly one of maxImageCount and maxImageAge.

    • getMaxImageCount

      @Stability(Stable) @Nullable default Number getMaxImageCount()
      The maximum number of images to retain.

      Specify exactly one of maxImageCount and maxImageAge.

    • getRulePriority

      @Stability(Stable) @Nullable default Number getRulePriority()
      Controls the order in which rules are evaluated (low to high).

      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

    • getTagPrefixList

      @Stability(Stable) @Nullable default List<String> getTagPrefixList()
      Select images that have ALL the given prefixes in their tag.

      Only if tagStatus == TagStatus.Tagged

    • getTagStatus

      @Stability(Stable) @Nullable default TagStatus getTagStatus()
      Select images based on tags.

      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

    • builder

      @Stability(Stable) static LifecycleRule.Builder builder()
      a LifecycleRule.Builder of LifecycleRule