com.pulumi.aws.ecr.RepositoryPolicyArgs 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;
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 RepositoryPolicyArgs extends com.pulumi.resources.ResourceArgs {
public static final RepositoryPolicyArgs Empty = new RepositoryPolicyArgs();
/**
* The policy document. This is a JSON formatted string.
*
*/
@Import(name="policy", required=true)
private Output policy;
/**
* @return The policy document. This is a JSON formatted string.
*
*/
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 RepositoryPolicyArgs() {}
private RepositoryPolicyArgs(RepositoryPolicyArgs $) {
this.policy = $.policy;
this.repository = $.repository;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(RepositoryPolicyArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private RepositoryPolicyArgs $;
public Builder() {
$ = new RepositoryPolicyArgs();
}
public Builder(RepositoryPolicyArgs defaults) {
$ = new RepositoryPolicyArgs(Objects.requireNonNull(defaults));
}
/**
* @param policy The policy document. This is a JSON formatted string.
*
* @return builder
*
*/
public Builder policy(Output policy) {
$.policy = policy;
return this;
}
/**
* @param policy The policy document. This is a JSON formatted string.
*
* @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 RepositoryPolicyArgs build() {
if ($.policy == null) {
throw new MissingRequiredPropertyException("RepositoryPolicyArgs", "policy");
}
if ($.repository == null) {
throw new MissingRequiredPropertyException("RepositoryPolicyArgs", "repository");
}
return $;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy