com.pulumi.aws.ecr.LifecyclePolicyArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** 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;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
public final class LifecyclePolicyArgs extends com.pulumi.resources.ResourceArgs {
public static final LifecyclePolicyArgs Empty = new LifecyclePolicyArgs();
/**
* The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs. Consider using the `aws.ecr.getLifecyclePolicyDocument` data_source to generate/manage the JSON document used for the `policy` argument.
*
*/
@Import(name="policy", required=true)
private Output policy;
/**
* @return The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs. Consider using the `aws.ecr.getLifecyclePolicyDocument` data_source to generate/manage the JSON document used for the `policy` argument.
*
*/
public Output policy() {
return this.policy;
}
/**
* Name of the repository to apply the policy.
*
*/
@Import(name="repository", required=true)
private Output repository;
/**
* @return Name of the repository to apply the policy.
*
*/
public Output repository() {
return this.repository;
}
private LifecyclePolicyArgs() {}
private LifecyclePolicyArgs(LifecyclePolicyArgs $) {
this.policy = $.policy;
this.repository = $.repository;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(LifecyclePolicyArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private LifecyclePolicyArgs $;
public Builder() {
$ = new LifecyclePolicyArgs();
}
public Builder(LifecyclePolicyArgs defaults) {
$ = new LifecyclePolicyArgs(Objects.requireNonNull(defaults));
}
/**
* @param policy The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs. Consider using the `aws.ecr.getLifecyclePolicyDocument` data_source to generate/manage the JSON document used for the `policy` argument.
*
* @return builder
*
*/
public Builder policy(Output policy) {
$.policy = policy;
return this;
}
/**
* @param policy The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs. Consider using the `aws.ecr.getLifecyclePolicyDocument` data_source to generate/manage the JSON document used for the `policy` argument.
*
* @return builder
*
*/
public Builder policy(String policy) {
return policy(Output.of(policy));
}
/**
* @param repository Name of the repository to apply the policy.
*
* @return builder
*
*/
public Builder repository(Output repository) {
$.repository = repository;
return this;
}
/**
* @param repository Name of the repository to apply the policy.
*
* @return builder
*
*/
public Builder repository(String repository) {
return repository(Output.of(repository));
}
public LifecyclePolicyArgs build() {
if ($.policy == null) {
throw new MissingRequiredPropertyException("LifecyclePolicyArgs", "policy");
}
if ($.repository == null) {
throw new MissingRequiredPropertyException("LifecyclePolicyArgs", "repository");
}
return $;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy