com.pulumi.aws.cloudfront.outputs.DistributionCustomErrorResponse 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.cloudfront.outputs;
import com.pulumi.core.annotations.CustomType;
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;
@CustomType
public final class DistributionCustomErrorResponse {
/**
* @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.
*
*/
private @Nullable Integer errorCachingMinTtl;
/**
* @return 4xx or 5xx HTTP status code that you want to customize.
*
*/
private Integer errorCode;
/**
* @return HTTP status code that you want CloudFront to return with the custom error page to the viewer.
*
*/
private @Nullable Integer responseCode;
/**
* @return Path of the custom error page (for example, `/custom_404.html`).
*
*/
private @Nullable String responsePagePath;
private DistributionCustomErrorResponse() {}
/**
* @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);
}
/**
* @return 4xx or 5xx HTTP status code that you want to customize.
*
*/
public Integer errorCode() {
return this.errorCode;
}
/**
* @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);
}
/**
* @return Path of the custom error page (for example, `/custom_404.html`).
*
*/
public Optional responsePagePath() {
return Optional.ofNullable(this.responsePagePath);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DistributionCustomErrorResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer errorCachingMinTtl;
private Integer errorCode;
private @Nullable Integer responseCode;
private @Nullable String responsePagePath;
public Builder() {}
public Builder(DistributionCustomErrorResponse defaults) {
Objects.requireNonNull(defaults);
this.errorCachingMinTtl = defaults.errorCachingMinTtl;
this.errorCode = defaults.errorCode;
this.responseCode = defaults.responseCode;
this.responsePagePath = defaults.responsePagePath;
}
@CustomType.Setter
public Builder errorCachingMinTtl(@Nullable Integer errorCachingMinTtl) {
this.errorCachingMinTtl = errorCachingMinTtl;
return this;
}
@CustomType.Setter
public Builder errorCode(Integer errorCode) {
if (errorCode == null) {
throw new MissingRequiredPropertyException("DistributionCustomErrorResponse", "errorCode");
}
this.errorCode = errorCode;
return this;
}
@CustomType.Setter
public Builder responseCode(@Nullable Integer responseCode) {
this.responseCode = responseCode;
return this;
}
@CustomType.Setter
public Builder responsePagePath(@Nullable String responsePagePath) {
this.responsePagePath = responsePagePath;
return this;
}
public DistributionCustomErrorResponse build() {
final var _resultValue = new DistributionCustomErrorResponse();
_resultValue.errorCachingMinTtl = errorCachingMinTtl;
_resultValue.errorCode = errorCode;
_resultValue.responseCode = responseCode;
_resultValue.responsePagePath = responsePagePath;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy