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

com.pulumi.aws.cloudfront.inputs.DistributionCustomErrorResponseArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** 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.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DistributionCustomErrorResponseArgs Empty = new DistributionCustomErrorResponseArgs();

    /**
     * Minimum amount of time you want HTTP error codes to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated.
     * 
     */
    @Import(name="errorCachingMinTtl")
    private @Nullable Output errorCachingMinTtl;

    /**
     * @return Minimum amount of time you want HTTP error codes to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated.
     * 
     */
    public Optional> errorCachingMinTtl() {
        return Optional.ofNullable(this.errorCachingMinTtl);
    }

    /**
     * 4xx or 5xx HTTP status code that you want to customize.
     * 
     */
    @Import(name="errorCode", required=true)
    private Output errorCode;

    /**
     * @return 4xx or 5xx HTTP status code that you want to customize.
     * 
     */
    public Output errorCode() {
        return this.errorCode;
    }

    /**
     * HTTP status code that you want CloudFront to return with the custom error page to the viewer.
     * 
     */
    @Import(name="responseCode")
    private @Nullable Output responseCode;

    /**
     * @return HTTP status code that you want CloudFront to return with the custom error page to the viewer.
     * 
     */
    public Optional> responseCode() {
        return Optional.ofNullable(this.responseCode);
    }

    /**
     * Path of the custom error page (for example, `/custom_404.html`).
     * 
     */
    @Import(name="responsePagePath")
    private @Nullable Output responsePagePath;

    /**
     * @return Path of the custom error page (for example, `/custom_404.html`).
     * 
     */
    public Optional> responsePagePath() {
        return Optional.ofNullable(this.responsePagePath);
    }

    private DistributionCustomErrorResponseArgs() {}

    private DistributionCustomErrorResponseArgs(DistributionCustomErrorResponseArgs $) {
        this.errorCachingMinTtl = $.errorCachingMinTtl;
        this.errorCode = $.errorCode;
        this.responseCode = $.responseCode;
        this.responsePagePath = $.responsePagePath;
    }

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

    public static final class Builder {
        private DistributionCustomErrorResponseArgs $;

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

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

        /**
         * @param errorCachingMinTtl Minimum amount of time you want HTTP error codes to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated.
         * 
         * @return builder
         * 
         */
        public Builder errorCachingMinTtl(@Nullable Output errorCachingMinTtl) {
            $.errorCachingMinTtl = errorCachingMinTtl;
            return this;
        }

        /**
         * @param errorCachingMinTtl Minimum amount of time you want HTTP error codes to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated.
         * 
         * @return builder
         * 
         */
        public Builder errorCachingMinTtl(Integer errorCachingMinTtl) {
            return errorCachingMinTtl(Output.of(errorCachingMinTtl));
        }

        /**
         * @param errorCode 4xx or 5xx HTTP status code that you want to customize.
         * 
         * @return builder
         * 
         */
        public Builder errorCode(Output errorCode) {
            $.errorCode = errorCode;
            return this;
        }

        /**
         * @param errorCode 4xx or 5xx HTTP status code that you want to customize.
         * 
         * @return builder
         * 
         */
        public Builder errorCode(Integer errorCode) {
            return errorCode(Output.of(errorCode));
        }

        /**
         * @param responseCode HTTP status code that you want CloudFront to return with the custom error page to the viewer.
         * 
         * @return builder
         * 
         */
        public Builder responseCode(@Nullable Output responseCode) {
            $.responseCode = responseCode;
            return this;
        }

        /**
         * @param responseCode HTTP status code that you want CloudFront to return with the custom error page to the viewer.
         * 
         * @return builder
         * 
         */
        public Builder responseCode(Integer responseCode) {
            return responseCode(Output.of(responseCode));
        }

        /**
         * @param responsePagePath Path of the custom error page (for example, `/custom_404.html`).
         * 
         * @return builder
         * 
         */
        public Builder responsePagePath(@Nullable Output responsePagePath) {
            $.responsePagePath = responsePagePath;
            return this;
        }

        /**
         * @param responsePagePath Path of the custom error page (for example, `/custom_404.html`).
         * 
         * @return builder
         * 
         */
        public Builder responsePagePath(String responsePagePath) {
            return responsePagePath(Output.of(responsePagePath));
        }

        public DistributionCustomErrorResponseArgs build() {
            if ($.errorCode == null) {
                throw new MissingRequiredPropertyException("DistributionCustomErrorResponseArgs", "errorCode");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy