All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cloudfront.DistributionArgs 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.cloudfront;

import com.pulumi.aws.cloudfront.inputs.DistributionCustomErrorResponseArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionDefaultCacheBehaviorArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionLoggingConfigArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionOrderedCacheBehaviorArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionOriginArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionOriginGroupArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionRestrictionsArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionViewerCertificateArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DistributionArgs extends com.pulumi.resources.ResourceArgs {

    public static final DistributionArgs Empty = new DistributionArgs();

    @Import(name="aliases")
    private @Nullable Output> aliases;

    public Optional>> aliases() {
        return Optional.ofNullable(this.aliases);
    }

    @Import(name="comment")
    private @Nullable Output comment;

    public Optional> comment() {
        return Optional.ofNullable(this.comment);
    }

    @Import(name="continuousDeploymentPolicyId")
    private @Nullable Output continuousDeploymentPolicyId;

    public Optional> continuousDeploymentPolicyId() {
        return Optional.ofNullable(this.continuousDeploymentPolicyId);
    }

    @Import(name="customErrorResponses")
    private @Nullable Output> customErrorResponses;

    public Optional>> customErrorResponses() {
        return Optional.ofNullable(this.customErrorResponses);
    }

    @Import(name="defaultCacheBehavior", required=true)
    private Output defaultCacheBehavior;

    public Output defaultCacheBehavior() {
        return this.defaultCacheBehavior;
    }

    @Import(name="defaultRootObject")
    private @Nullable Output defaultRootObject;

    public Optional> defaultRootObject() {
        return Optional.ofNullable(this.defaultRootObject);
    }

    /**
     * `true` if any of the AWS accounts listed as trusted signers have active CloudFront key pairs
     * 
     */
    @Import(name="enabled", required=true)
    private Output enabled;

    /**
     * @return `true` if any of the AWS accounts listed as trusted signers have active CloudFront key pairs
     * 
     */
    public Output enabled() {
        return this.enabled;
    }

    @Import(name="httpVersion")
    private @Nullable Output httpVersion;

    public Optional> httpVersion() {
        return Optional.ofNullable(this.httpVersion);
    }

    @Import(name="isIpv6Enabled")
    private @Nullable Output isIpv6Enabled;

    public Optional> isIpv6Enabled() {
        return Optional.ofNullable(this.isIpv6Enabled);
    }

    @Import(name="loggingConfig")
    private @Nullable Output loggingConfig;

    public Optional> loggingConfig() {
        return Optional.ofNullable(this.loggingConfig);
    }

    @Import(name="orderedCacheBehaviors")
    private @Nullable Output> orderedCacheBehaviors;

    public Optional>> orderedCacheBehaviors() {
        return Optional.ofNullable(this.orderedCacheBehaviors);
    }

    @Import(name="originGroups")
    private @Nullable Output> originGroups;

    public Optional>> originGroups() {
        return Optional.ofNullable(this.originGroups);
    }

    @Import(name="origins", required=true)
    private Output> origins;

    public Output> origins() {
        return this.origins;
    }

    @Import(name="priceClass")
    private @Nullable Output priceClass;

    public Optional> priceClass() {
        return Optional.ofNullable(this.priceClass);
    }

    @Import(name="restrictions", required=true)
    private Output restrictions;

    public Output restrictions() {
        return this.restrictions;
    }

    @Import(name="retainOnDelete")
    private @Nullable Output retainOnDelete;

    public Optional> retainOnDelete() {
        return Optional.ofNullable(this.retainOnDelete);
    }

    @Import(name="staging")
    private @Nullable Output staging;

    public Optional> staging() {
        return Optional.ofNullable(this.staging);
    }

    @Import(name="tags")
    private @Nullable Output> tags;

    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    @Import(name="viewerCertificate", required=true)
    private Output viewerCertificate;

    public Output viewerCertificate() {
        return this.viewerCertificate;
    }

    @Import(name="waitForDeployment")
    private @Nullable Output waitForDeployment;

    public Optional> waitForDeployment() {
        return Optional.ofNullable(this.waitForDeployment);
    }

    @Import(name="webAclId")
    private @Nullable Output webAclId;

    public Optional> webAclId() {
        return Optional.ofNullable(this.webAclId);
    }

    private DistributionArgs() {}

    private DistributionArgs(DistributionArgs $) {
        this.aliases = $.aliases;
        this.comment = $.comment;
        this.continuousDeploymentPolicyId = $.continuousDeploymentPolicyId;
        this.customErrorResponses = $.customErrorResponses;
        this.defaultCacheBehavior = $.defaultCacheBehavior;
        this.defaultRootObject = $.defaultRootObject;
        this.enabled = $.enabled;
        this.httpVersion = $.httpVersion;
        this.isIpv6Enabled = $.isIpv6Enabled;
        this.loggingConfig = $.loggingConfig;
        this.orderedCacheBehaviors = $.orderedCacheBehaviors;
        this.originGroups = $.originGroups;
        this.origins = $.origins;
        this.priceClass = $.priceClass;
        this.restrictions = $.restrictions;
        this.retainOnDelete = $.retainOnDelete;
        this.staging = $.staging;
        this.tags = $.tags;
        this.viewerCertificate = $.viewerCertificate;
        this.waitForDeployment = $.waitForDeployment;
        this.webAclId = $.webAclId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(DistributionArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private DistributionArgs $;

        public Builder() {
            $ = new DistributionArgs();
        }

        public Builder(DistributionArgs defaults) {
            $ = new DistributionArgs(Objects.requireNonNull(defaults));
        }

        public Builder aliases(@Nullable Output> aliases) {
            $.aliases = aliases;
            return this;
        }

        public Builder aliases(List aliases) {
            return aliases(Output.of(aliases));
        }

        public Builder aliases(String... aliases) {
            return aliases(List.of(aliases));
        }

        public Builder comment(@Nullable Output comment) {
            $.comment = comment;
            return this;
        }

        public Builder comment(String comment) {
            return comment(Output.of(comment));
        }

        public Builder continuousDeploymentPolicyId(@Nullable Output continuousDeploymentPolicyId) {
            $.continuousDeploymentPolicyId = continuousDeploymentPolicyId;
            return this;
        }

        public Builder continuousDeploymentPolicyId(String continuousDeploymentPolicyId) {
            return continuousDeploymentPolicyId(Output.of(continuousDeploymentPolicyId));
        }

        public Builder customErrorResponses(@Nullable Output> customErrorResponses) {
            $.customErrorResponses = customErrorResponses;
            return this;
        }

        public Builder customErrorResponses(List customErrorResponses) {
            return customErrorResponses(Output.of(customErrorResponses));
        }

        public Builder customErrorResponses(DistributionCustomErrorResponseArgs... customErrorResponses) {
            return customErrorResponses(List.of(customErrorResponses));
        }

        public Builder defaultCacheBehavior(Output defaultCacheBehavior) {
            $.defaultCacheBehavior = defaultCacheBehavior;
            return this;
        }

        public Builder defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs defaultCacheBehavior) {
            return defaultCacheBehavior(Output.of(defaultCacheBehavior));
        }

        public Builder defaultRootObject(@Nullable Output defaultRootObject) {
            $.defaultRootObject = defaultRootObject;
            return this;
        }

        public Builder defaultRootObject(String defaultRootObject) {
            return defaultRootObject(Output.of(defaultRootObject));
        }

        /**
         * @param enabled `true` if any of the AWS accounts listed as trusted signers have active CloudFront key pairs
         * 
         * @return builder
         * 
         */
        public Builder enabled(Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled `true` if any of the AWS accounts listed as trusted signers have active CloudFront key pairs
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        public Builder httpVersion(@Nullable Output httpVersion) {
            $.httpVersion = httpVersion;
            return this;
        }

        public Builder httpVersion(String httpVersion) {
            return httpVersion(Output.of(httpVersion));
        }

        public Builder isIpv6Enabled(@Nullable Output isIpv6Enabled) {
            $.isIpv6Enabled = isIpv6Enabled;
            return this;
        }

        public Builder isIpv6Enabled(Boolean isIpv6Enabled) {
            return isIpv6Enabled(Output.of(isIpv6Enabled));
        }

        public Builder loggingConfig(@Nullable Output loggingConfig) {
            $.loggingConfig = loggingConfig;
            return this;
        }

        public Builder loggingConfig(DistributionLoggingConfigArgs loggingConfig) {
            return loggingConfig(Output.of(loggingConfig));
        }

        public Builder orderedCacheBehaviors(@Nullable Output> orderedCacheBehaviors) {
            $.orderedCacheBehaviors = orderedCacheBehaviors;
            return this;
        }

        public Builder orderedCacheBehaviors(List orderedCacheBehaviors) {
            return orderedCacheBehaviors(Output.of(orderedCacheBehaviors));
        }

        public Builder orderedCacheBehaviors(DistributionOrderedCacheBehaviorArgs... orderedCacheBehaviors) {
            return orderedCacheBehaviors(List.of(orderedCacheBehaviors));
        }

        public Builder originGroups(@Nullable Output> originGroups) {
            $.originGroups = originGroups;
            return this;
        }

        public Builder originGroups(List originGroups) {
            return originGroups(Output.of(originGroups));
        }

        public Builder originGroups(DistributionOriginGroupArgs... originGroups) {
            return originGroups(List.of(originGroups));
        }

        public Builder origins(Output> origins) {
            $.origins = origins;
            return this;
        }

        public Builder origins(List origins) {
            return origins(Output.of(origins));
        }

        public Builder origins(DistributionOriginArgs... origins) {
            return origins(List.of(origins));
        }

        public Builder priceClass(@Nullable Output priceClass) {
            $.priceClass = priceClass;
            return this;
        }

        public Builder priceClass(String priceClass) {
            return priceClass(Output.of(priceClass));
        }

        public Builder restrictions(Output restrictions) {
            $.restrictions = restrictions;
            return this;
        }

        public Builder restrictions(DistributionRestrictionsArgs restrictions) {
            return restrictions(Output.of(restrictions));
        }

        public Builder retainOnDelete(@Nullable Output retainOnDelete) {
            $.retainOnDelete = retainOnDelete;
            return this;
        }

        public Builder retainOnDelete(Boolean retainOnDelete) {
            return retainOnDelete(Output.of(retainOnDelete));
        }

        public Builder staging(@Nullable Output staging) {
            $.staging = staging;
            return this;
        }

        public Builder staging(Boolean staging) {
            return staging(Output.of(staging));
        }

        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public Builder viewerCertificate(Output viewerCertificate) {
            $.viewerCertificate = viewerCertificate;
            return this;
        }

        public Builder viewerCertificate(DistributionViewerCertificateArgs viewerCertificate) {
            return viewerCertificate(Output.of(viewerCertificate));
        }

        public Builder waitForDeployment(@Nullable Output waitForDeployment) {
            $.waitForDeployment = waitForDeployment;
            return this;
        }

        public Builder waitForDeployment(Boolean waitForDeployment) {
            return waitForDeployment(Output.of(waitForDeployment));
        }

        public Builder webAclId(@Nullable Output webAclId) {
            $.webAclId = webAclId;
            return this;
        }

        public Builder webAclId(String webAclId) {
            return webAclId(Output.of(webAclId));
        }

        public DistributionArgs build() {
            if ($.defaultCacheBehavior == null) {
                throw new MissingRequiredPropertyException("DistributionArgs", "defaultCacheBehavior");
            }
            if ($.enabled == null) {
                throw new MissingRequiredPropertyException("DistributionArgs", "enabled");
            }
            if ($.origins == null) {
                throw new MissingRequiredPropertyException("DistributionArgs", "origins");
            }
            if ($.restrictions == null) {
                throw new MissingRequiredPropertyException("DistributionArgs", "restrictions");
            }
            if ($.viewerCertificate == null) {
                throw new MissingRequiredPropertyException("DistributionArgs", "viewerCertificate");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy