
com.pulumi.aws.ecr.outputs.GetLifecyclePolicyDocumentRuleSelection Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.ecr.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class GetLifecyclePolicyDocumentRuleSelection {
/**
* @return Specify a count number. If the `count_type` used is "imageCountMoreThan", then the value is the maximum number of images that you want to retain in your repository. If the `count_type` used is "sinceImagePushed", then the value is the maximum age limit for your images.
*
*/
private Integer countNumber;
/**
* @return Specify a count type to apply to the images. If `count_type` is set to "imageCountMoreThan", you also specify `count_number` to create a rule that sets a limit on the number of images that exist in your repository. If `count_type` is set to "sinceImagePushed", you also specify `count_unit` and `count_number` to specify a time limit on the images that exist in your repository.
*
*/
private String countType;
/**
* @return Specify a count unit of days to indicate that as the unit of time, in addition to `count_number`, which is the number of days.
*
*/
private @Nullable String countUnit;
/**
* @return You must specify a comma-separated list of image tag patterns that may contain wildcards (\*) on which to take action with your lifecycle policy. For example, if your images are tagged as `prod`, `prod1`, `prod2`, and so on, you would use the tag pattern list `["prod\*"]` to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (\*) per string. For example, `["*test*1*2*3", "test*1*2*3*"]` is valid but `["test*1*2*3*4*5*6"]` is invalid.
*
*/
private @Nullable List tagPatternLists;
/**
* @return You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as `prod`, `prod1`, `prod2`, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
*
*/
private @Nullable List tagPrefixLists;
/**
* @return Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are "tagged", "untagged", or "any". If you specify "any", then all images have the rule applied to them. If you specify "tagged", then you must also specify a `tag_prefix_list` value. If you specify "untagged", then you must omit `tag_prefix_list`.
*
*/
private String tagStatus;
private GetLifecyclePolicyDocumentRuleSelection() {}
/**
* @return Specify a count number. If the `count_type` used is "imageCountMoreThan", then the value is the maximum number of images that you want to retain in your repository. If the `count_type` used is "sinceImagePushed", then the value is the maximum age limit for your images.
*
*/
public Integer countNumber() {
return this.countNumber;
}
/**
* @return Specify a count type to apply to the images. If `count_type` is set to "imageCountMoreThan", you also specify `count_number` to create a rule that sets a limit on the number of images that exist in your repository. If `count_type` is set to "sinceImagePushed", you also specify `count_unit` and `count_number` to specify a time limit on the images that exist in your repository.
*
*/
public String countType() {
return this.countType;
}
/**
* @return Specify a count unit of days to indicate that as the unit of time, in addition to `count_number`, which is the number of days.
*
*/
public Optional countUnit() {
return Optional.ofNullable(this.countUnit);
}
/**
* @return You must specify a comma-separated list of image tag patterns that may contain wildcards (\*) on which to take action with your lifecycle policy. For example, if your images are tagged as `prod`, `prod1`, `prod2`, and so on, you would use the tag pattern list `["prod\*"]` to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (\*) per string. For example, `["*test*1*2*3", "test*1*2*3*"]` is valid but `["test*1*2*3*4*5*6"]` is invalid.
*
*/
public List tagPatternLists() {
return this.tagPatternLists == null ? List.of() : this.tagPatternLists;
}
/**
* @return You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as `prod`, `prod1`, `prod2`, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
*
*/
public List tagPrefixLists() {
return this.tagPrefixLists == null ? List.of() : this.tagPrefixLists;
}
/**
* @return Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are "tagged", "untagged", or "any". If you specify "any", then all images have the rule applied to them. If you specify "tagged", then you must also specify a `tag_prefix_list` value. If you specify "untagged", then you must omit `tag_prefix_list`.
*
*/
public String tagStatus() {
return this.tagStatus;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetLifecyclePolicyDocumentRuleSelection defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private Integer countNumber;
private String countType;
private @Nullable String countUnit;
private @Nullable List tagPatternLists;
private @Nullable List tagPrefixLists;
private String tagStatus;
public Builder() {}
public Builder(GetLifecyclePolicyDocumentRuleSelection defaults) {
Objects.requireNonNull(defaults);
this.countNumber = defaults.countNumber;
this.countType = defaults.countType;
this.countUnit = defaults.countUnit;
this.tagPatternLists = defaults.tagPatternLists;
this.tagPrefixLists = defaults.tagPrefixLists;
this.tagStatus = defaults.tagStatus;
}
@CustomType.Setter
public Builder countNumber(Integer countNumber) {
if (countNumber == null) {
throw new MissingRequiredPropertyException("GetLifecyclePolicyDocumentRuleSelection", "countNumber");
}
this.countNumber = countNumber;
return this;
}
@CustomType.Setter
public Builder countType(String countType) {
if (countType == null) {
throw new MissingRequiredPropertyException("GetLifecyclePolicyDocumentRuleSelection", "countType");
}
this.countType = countType;
return this;
}
@CustomType.Setter
public Builder countUnit(@Nullable String countUnit) {
this.countUnit = countUnit;
return this;
}
@CustomType.Setter
public Builder tagPatternLists(@Nullable List tagPatternLists) {
this.tagPatternLists = tagPatternLists;
return this;
}
public Builder tagPatternLists(String... tagPatternLists) {
return tagPatternLists(List.of(tagPatternLists));
}
@CustomType.Setter
public Builder tagPrefixLists(@Nullable List tagPrefixLists) {
this.tagPrefixLists = tagPrefixLists;
return this;
}
public Builder tagPrefixLists(String... tagPrefixLists) {
return tagPrefixLists(List.of(tagPrefixLists));
}
@CustomType.Setter
public Builder tagStatus(String tagStatus) {
if (tagStatus == null) {
throw new MissingRequiredPropertyException("GetLifecyclePolicyDocumentRuleSelection", "tagStatus");
}
this.tagStatus = tagStatus;
return this;
}
public GetLifecyclePolicyDocumentRuleSelection build() {
final var _resultValue = new GetLifecyclePolicyDocumentRuleSelection();
_resultValue.countNumber = countNumber;
_resultValue.countType = countType;
_resultValue.countUnit = countUnit;
_resultValue.tagPatternLists = tagPatternLists;
_resultValue.tagPrefixLists = tagPrefixLists;
_resultValue.tagStatus = tagStatus;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy