
com.pulumi.aws.s3.outputs.BucketV2Website 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.s3.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class BucketV2Website {
/**
* @return Absolute path to the document to return in case of a 4XX error.
*
*/
private @Nullable String errorDocument;
/**
* @return Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders.
*
*/
private @Nullable String indexDocument;
/**
* @return Hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (`http://` or `https://`) to use when redirecting requests. The default is the protocol that is used in the original request.
*
*/
private @Nullable String redirectAllRequestsTo;
/**
* @return JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html)
* describing redirect behavior and when redirects are applied.
*
*/
private @Nullable String routingRules;
private BucketV2Website() {}
/**
* @return Absolute path to the document to return in case of a 4XX error.
*
*/
public Optional errorDocument() {
return Optional.ofNullable(this.errorDocument);
}
/**
* @return Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders.
*
*/
public Optional indexDocument() {
return Optional.ofNullable(this.indexDocument);
}
/**
* @return Hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (`http://` or `https://`) to use when redirecting requests. The default is the protocol that is used in the original request.
*
*/
public Optional redirectAllRequestsTo() {
return Optional.ofNullable(this.redirectAllRequestsTo);
}
/**
* @return JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html)
* describing redirect behavior and when redirects are applied.
*
*/
public Optional routingRules() {
return Optional.ofNullable(this.routingRules);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(BucketV2Website defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String errorDocument;
private @Nullable String indexDocument;
private @Nullable String redirectAllRequestsTo;
private @Nullable String routingRules;
public Builder() {}
public Builder(BucketV2Website defaults) {
Objects.requireNonNull(defaults);
this.errorDocument = defaults.errorDocument;
this.indexDocument = defaults.indexDocument;
this.redirectAllRequestsTo = defaults.redirectAllRequestsTo;
this.routingRules = defaults.routingRules;
}
@CustomType.Setter
public Builder errorDocument(@Nullable String errorDocument) {
this.errorDocument = errorDocument;
return this;
}
@CustomType.Setter
public Builder indexDocument(@Nullable String indexDocument) {
this.indexDocument = indexDocument;
return this;
}
@CustomType.Setter
public Builder redirectAllRequestsTo(@Nullable String redirectAllRequestsTo) {
this.redirectAllRequestsTo = redirectAllRequestsTo;
return this;
}
@CustomType.Setter
public Builder routingRules(@Nullable String routingRules) {
this.routingRules = routingRules;
return this;
}
public BucketV2Website build() {
final var _resultValue = new BucketV2Website();
_resultValue.errorDocument = errorDocument;
_resultValue.indexDocument = indexDocument;
_resultValue.redirectAllRequestsTo = redirectAllRequestsTo;
_resultValue.routingRules = routingRules;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy