AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

BucketWebsiteConfigurationV2

Provides an S3 bucket website configuration resource. For more information, see Hosting Websites on S3.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.S3.BucketWebsiteConfigurationV2("example", new Aws.S3.BucketWebsiteConfigurationV2Args
        {
            Bucket = aws_s3_bucket.Example.Bucket,
            IndexDocument = new Aws.S3.Inputs.BucketWebsiteConfigurationV2IndexDocumentArgs
            {
                Suffix = "index.html",
            },
            ErrorDocument = new Aws.S3.Inputs.BucketWebsiteConfigurationV2ErrorDocumentArgs
            {
                Key = "error.html",
            },
            RoutingRules = 
            {
                new Aws.S3.Inputs.BucketWebsiteConfigurationV2RoutingRuleArgs
                {
                    Condition = new Aws.S3.Inputs.BucketWebsiteConfigurationV2RoutingRuleConditionArgs
                    {
                        KeyPrefixEquals = "docs/",
                    },
                    Redirect = new Aws.S3.Inputs.BucketWebsiteConfigurationV2RoutingRuleRedirectArgs
                    {
                        ReplaceKeyPrefixWith = "documents/",
                    },
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := s3.NewBucketWebsiteConfigurationV2(ctx, "example", &s3.BucketWebsiteConfigurationV2Args{
			Bucket: pulumi.Any(aws_s3_bucket.Example.Bucket),
			IndexDocument: &s3.BucketWebsiteConfigurationV2IndexDocumentArgs{
				Suffix: pulumi.String("index.html"),
			},
			ErrorDocument: &s3.BucketWebsiteConfigurationV2ErrorDocumentArgs{
				Key: pulumi.String("error.html"),
			},
			RoutingRules: s3.BucketWebsiteConfigurationV2RoutingRuleArray{
				&s3.BucketWebsiteConfigurationV2RoutingRuleArgs{
					Condition: &s3.BucketWebsiteConfigurationV2RoutingRuleConditionArgs{
						KeyPrefixEquals: pulumi.String("docs/"),
					},
					Redirect: &s3.BucketWebsiteConfigurationV2RoutingRuleRedirectArgs{
						ReplaceKeyPrefixWith: pulumi.String("documents/"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new BucketWebsiteConfigurationV2("example", BucketWebsiteConfigurationV2Args.builder()        
            .bucket(aws_s3_bucket.getExample().getBucket())
            .indexDocument(BucketWebsiteConfigurationV2IndexDocument.builder()
                .suffix("index.html")
                .build())
            .errorDocument(BucketWebsiteConfigurationV2ErrorDocument.builder()
                .key("error.html")
                .build())
            .routingRules(BucketWebsiteConfigurationV2RoutingRule.builder()
                .condition(BucketWebsiteConfigurationV2RoutingRuleCondition.builder()
                    .keyPrefixEquals("docs/")
                    .build())
                .redirect(BucketWebsiteConfigurationV2RoutingRuleRedirect.builder()
                    .replaceKeyPrefixWith("documents/")
                    .build())
                .build())
            .build());

        }
}
import pulumi
import pulumi_aws as aws

example = aws.s3.BucketWebsiteConfigurationV2("example",
    bucket=aws_s3_bucket["example"]["bucket"],
    index_document=aws.s3.BucketWebsiteConfigurationV2IndexDocumentArgs(
        suffix="index.html",
    ),
    error_document=aws.s3.BucketWebsiteConfigurationV2ErrorDocumentArgs(
        key="error.html",
    ),
    routing_rules=[aws.s3.BucketWebsiteConfigurationV2RoutingRuleArgs(
        condition=aws.s3.BucketWebsiteConfigurationV2RoutingRuleConditionArgs(
            key_prefix_equals="docs/",
        ),
        redirect=aws.s3.BucketWebsiteConfigurationV2RoutingRuleRedirectArgs(
            replace_key_prefix_with="documents/",
        ),
    )])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.s3.BucketWebsiteConfigurationV2("example", {
    bucket: aws_s3_bucket.example.bucket,
    indexDocument: {
        suffix: "index.html",
    },
    errorDocument: {
        key: "error.html",
    },
    routingRules: [{
        condition: {
            keyPrefixEquals: "docs/",
        },
        redirect: {
            replaceKeyPrefixWith: "documents/",
        },
    }],
});
resources:
  example:
    type: aws:s3:BucketWebsiteConfigurationV2
    properties:
      bucket: ${aws_s3_bucket.example.bucket}
      indexDocument:
        suffix: index.html
      errorDocument:
        key: error.html
      routingRules:
        - condition:
            keyPrefixEquals: docs/
          redirect:
            replaceKeyPrefixWith: documents/

Create a BucketWebsiteConfigurationV2 Resource

new BucketWebsiteConfigurationV2(name: string, args: BucketWebsiteConfigurationV2Args, opts?: CustomResourceOptions);
@overload
def BucketWebsiteConfigurationV2(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 bucket: Optional[str] = None,
                                 error_document: Optional[BucketWebsiteConfigurationV2ErrorDocumentArgs] = None,
                                 expected_bucket_owner: Optional[str] = None,
                                 index_document: Optional[BucketWebsiteConfigurationV2IndexDocumentArgs] = None,
                                 redirect_all_requests_to: Optional[BucketWebsiteConfigurationV2RedirectAllRequestsToArgs] = None,
                                 routing_rules: Optional[Sequence[BucketWebsiteConfigurationV2RoutingRuleArgs]] = None)
@overload
def BucketWebsiteConfigurationV2(resource_name: str,
                                 args: BucketWebsiteConfigurationV2Args,
                                 opts: Optional[ResourceOptions] = None)
func NewBucketWebsiteConfigurationV2(ctx *Context, name string, args BucketWebsiteConfigurationV2Args, opts ...ResourceOption) (*BucketWebsiteConfigurationV2, error)
public BucketWebsiteConfigurationV2(string name, BucketWebsiteConfigurationV2Args args, CustomResourceOptions? opts = null)
public BucketWebsiteConfigurationV2(String name, BucketWebsiteConfigurationV2Args args)
public BucketWebsiteConfigurationV2(String name, BucketWebsiteConfigurationV2Args args, CustomResourceOptions options)
type: aws:s3:BucketWebsiteConfigurationV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BucketWebsiteConfigurationV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args BucketWebsiteConfigurationV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BucketWebsiteConfigurationV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BucketWebsiteConfigurationV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BucketWebsiteConfigurationV2Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BucketWebsiteConfigurationV2 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BucketWebsiteConfigurationV2 resource accepts the following input properties:

Bucket string

The name of the bucket.

ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

ExpectedBucketOwner string

The account ID of the expected bucket owner.

IndexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

RoutingRules List<BucketWebsiteConfigurationV2RoutingRuleArgs>

List of rules that define when a redirect is applied and the redirect behavior detailed below.

Bucket string

The name of the bucket.

ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

ExpectedBucketOwner string

The account ID of the expected bucket owner.

IndexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

RoutingRules []BucketWebsiteConfigurationV2RoutingRuleArgs

List of rules that define when a redirect is applied and the redirect behavior detailed below.

bucket String

The name of the bucket.

errorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

expectedBucketOwner String

The account ID of the expected bucket owner.

indexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

redirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routingRules ListWebsiteConfigurationV2RoutingRuleArgs>

List of rules that define when a redirect is applied and the redirect behavior detailed below.

bucket string

The name of the bucket.

errorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

expectedBucketOwner string

The account ID of the expected bucket owner.

indexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

redirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routingRules BucketWebsiteConfigurationV2RoutingRuleArgs[]

List of rules that define when a redirect is applied and the redirect behavior detailed below.

bucket str

The name of the bucket.

error_document BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

expected_bucket_owner str

The account ID of the expected bucket owner.

index_document BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

redirect_all_requests_to BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routing_rules Sequence[BucketWebsiteConfigurationV2RoutingRuleArgs]

List of rules that define when a redirect is applied and the redirect behavior detailed below.

bucket String

The name of the bucket.

errorDocument Property Map

The name of the error document for the website detailed below.

expectedBucketOwner String

The account ID of the expected bucket owner.

indexDocument Property Map

The name of the index document for the website detailed below.

redirectAllRequestsTo Property Map

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routingRules List

List of rules that define when a redirect is applied and the redirect behavior detailed below.

Outputs

All input properties are implicitly available as output properties. Additionally, the BucketWebsiteConfigurationV2 resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

WebsiteDomain string

The domain of the website endpoint. This is used to create Route 53 alias records.

WebsiteEndpoint string

The website endpoint.

Id string

The provider-assigned unique ID for this managed resource.

WebsiteDomain string

The domain of the website endpoint. This is used to create Route 53 alias records.

WebsiteEndpoint string

The website endpoint.

id String

The provider-assigned unique ID for this managed resource.

websiteDomain String

The domain of the website endpoint. This is used to create Route 53 alias records.

websiteEndpoint String

The website endpoint.

id string

The provider-assigned unique ID for this managed resource.

websiteDomain string

The domain of the website endpoint. This is used to create Route 53 alias records.

websiteEndpoint string

The website endpoint.

id str

The provider-assigned unique ID for this managed resource.

website_domain str

The domain of the website endpoint. This is used to create Route 53 alias records.

website_endpoint str

The website endpoint.

id String

The provider-assigned unique ID for this managed resource.

websiteDomain String

The domain of the website endpoint. This is used to create Route 53 alias records.

websiteEndpoint String

The website endpoint.

Look up an Existing BucketWebsiteConfigurationV2 Resource

Get an existing BucketWebsiteConfigurationV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BucketWebsiteConfigurationV2State, opts?: CustomResourceOptions): BucketWebsiteConfigurationV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket: Optional[str] = None,
        error_document: Optional[BucketWebsiteConfigurationV2ErrorDocumentArgs] = None,
        expected_bucket_owner: Optional[str] = None,
        index_document: Optional[BucketWebsiteConfigurationV2IndexDocumentArgs] = None,
        redirect_all_requests_to: Optional[BucketWebsiteConfigurationV2RedirectAllRequestsToArgs] = None,
        routing_rules: Optional[Sequence[BucketWebsiteConfigurationV2RoutingRuleArgs]] = None,
        website_domain: Optional[str] = None,
        website_endpoint: Optional[str] = None) -> BucketWebsiteConfigurationV2
func GetBucketWebsiteConfigurationV2(ctx *Context, name string, id IDInput, state *BucketWebsiteConfigurationV2State, opts ...ResourceOption) (*BucketWebsiteConfigurationV2, error)
public static BucketWebsiteConfigurationV2 Get(string name, Input<string> id, BucketWebsiteConfigurationV2State? state, CustomResourceOptions? opts = null)
public static BucketWebsiteConfigurationV2 get(String name, Output<String> id, BucketWebsiteConfigurationV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Bucket string

The name of the bucket.

ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

ExpectedBucketOwner string

The account ID of the expected bucket owner.

IndexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

RoutingRules List<BucketWebsiteConfigurationV2RoutingRuleArgs>

List of rules that define when a redirect is applied and the redirect behavior detailed below.

WebsiteDomain string

The domain of the website endpoint. This is used to create Route 53 alias records.

WebsiteEndpoint string

The website endpoint.

Bucket string

The name of the bucket.

ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

ExpectedBucketOwner string

The account ID of the expected bucket owner.

IndexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

RoutingRules []BucketWebsiteConfigurationV2RoutingRuleArgs

List of rules that define when a redirect is applied and the redirect behavior detailed below.

WebsiteDomain string

The domain of the website endpoint. This is used to create Route 53 alias records.

WebsiteEndpoint string

The website endpoint.

bucket String

The name of the bucket.

errorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

expectedBucketOwner String

The account ID of the expected bucket owner.

indexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

redirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routingRules ListWebsiteConfigurationV2RoutingRuleArgs>

List of rules that define when a redirect is applied and the redirect behavior detailed below.

websiteDomain String

The domain of the website endpoint. This is used to create Route 53 alias records.

websiteEndpoint String

The website endpoint.

bucket string

The name of the bucket.

errorDocument BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

expectedBucketOwner string

The account ID of the expected bucket owner.

indexDocument BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

redirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routingRules BucketWebsiteConfigurationV2RoutingRuleArgs[]

List of rules that define when a redirect is applied and the redirect behavior detailed below.

websiteDomain string

The domain of the website endpoint. This is used to create Route 53 alias records.

websiteEndpoint string

The website endpoint.

bucket str

The name of the bucket.

error_document BucketWebsiteConfigurationV2ErrorDocumentArgs

The name of the error document for the website detailed below.

expected_bucket_owner str

The account ID of the expected bucket owner.

index_document BucketWebsiteConfigurationV2IndexDocumentArgs

The name of the index document for the website detailed below.

redirect_all_requests_to BucketWebsiteConfigurationV2RedirectAllRequestsToArgs

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routing_rules Sequence[BucketWebsiteConfigurationV2RoutingRuleArgs]

List of rules that define when a redirect is applied and the redirect behavior detailed below.

website_domain str

The domain of the website endpoint. This is used to create Route 53 alias records.

website_endpoint str

The website endpoint.

bucket String

The name of the bucket.

errorDocument Property Map

The name of the error document for the website detailed below.

expectedBucketOwner String

The account ID of the expected bucket owner.

indexDocument Property Map

The name of the index document for the website detailed below.

redirectAllRequestsTo Property Map

The redirect behavior for every request to this bucket's website endpoint detailed below. Conflicts with error_document, index_document, and routing_rule.

routingRules List

List of rules that define when a redirect is applied and the redirect behavior detailed below.

websiteDomain String

The domain of the website endpoint. This is used to create Route 53 alias records.

websiteEndpoint String

The website endpoint.

Supporting Types

BucketWebsiteConfigurationV2ErrorDocument

Key string

The object key name to use when a 4XX class error occurs.

Key string

The object key name to use when a 4XX class error occurs.

key String

The object key name to use when a 4XX class error occurs.

key string

The object key name to use when a 4XX class error occurs.

key str

The object key name to use when a 4XX class error occurs.

key String

The object key name to use when a 4XX class error occurs.

BucketWebsiteConfigurationV2IndexDocument

Suffix string

A suffix that is appended to a request that is for a directory on the website endpoint. For example, if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be for the object with the key name images/index.html. The suffix must not be empty and must not include a slash character.

Suffix string

A suffix that is appended to a request that is for a directory on the website endpoint. For example, if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be for the object with the key name images/index.html. The suffix must not be empty and must not include a slash character.

suffix String

A suffix that is appended to a request that is for a directory on the website endpoint. For example, if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be for the object with the key name images/index.html. The suffix must not be empty and must not include a slash character.

suffix string

A suffix that is appended to a request that is for a directory on the website endpoint. For example, if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be for the object with the key name images/index.html. The suffix must not be empty and must not include a slash character.

suffix str

A suffix that is appended to a request that is for a directory on the website endpoint. For example, if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be for the object with the key name images/index.html. The suffix must not be empty and must not include a slash character.

suffix String

A suffix that is appended to a request that is for a directory on the website endpoint. For example, if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be for the object with the key name images/index.html. The suffix must not be empty and must not include a slash character.

BucketWebsiteConfigurationV2RedirectAllRequestsTo

HostName string

Name of the host where requests are redirected.

Protocol string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

HostName string

Name of the host where requests are redirected.

Protocol string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

hostName String

Name of the host where requests are redirected.

protocol String

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

hostName string

Name of the host where requests are redirected.

protocol string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

host_name str

Name of the host where requests are redirected.

protocol str

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

hostName String

Name of the host where requests are redirected.

protocol String

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

BucketWebsiteConfigurationV2RoutingRule

Redirect BucketWebsiteConfigurationV2RoutingRuleRedirect

A configuration block for redirect information detailed below.

Condition BucketWebsiteConfigurationV2RoutingRuleCondition

A configuration block for describing a condition that must be met for the specified redirect to apply detailed below.

Redirect BucketWebsiteConfigurationV2RoutingRuleRedirect

A configuration block for redirect information detailed below.

Condition BucketWebsiteConfigurationV2RoutingRuleCondition

A configuration block for describing a condition that must be met for the specified redirect to apply detailed below.

redirect BucketWebsiteConfigurationV2RoutingRuleRedirect

A configuration block for redirect information detailed below.

condition BucketWebsiteConfigurationV2RoutingRuleCondition

A configuration block for describing a condition that must be met for the specified redirect to apply detailed below.

redirect BucketWebsiteConfigurationV2RoutingRuleRedirect

A configuration block for redirect information detailed below.

condition BucketWebsiteConfigurationV2RoutingRuleCondition

A configuration block for describing a condition that must be met for the specified redirect to apply detailed below.

redirect BucketWebsiteConfigurationV2RoutingRuleRedirect

A configuration block for redirect information detailed below.

condition BucketWebsiteConfigurationV2RoutingRuleCondition

A configuration block for describing a condition that must be met for the specified redirect to apply detailed below.

redirect Property Map

A configuration block for redirect information detailed below.

condition Property Map

A configuration block for describing a condition that must be met for the specified redirect to apply detailed below.

BucketWebsiteConfigurationV2RoutingRuleCondition

HttpErrorCodeReturnedEquals string

The HTTP error code when the redirect is applied. If specified with key_prefix_equals, then both must be true for the redirect to be applied.

KeyPrefixEquals string

The object key name prefix when the redirect is applied. If specified with http_error_code_returned_equals, then both must be true for the redirect to be applied.

HttpErrorCodeReturnedEquals string

The HTTP error code when the redirect is applied. If specified with key_prefix_equals, then both must be true for the redirect to be applied.

KeyPrefixEquals string

The object key name prefix when the redirect is applied. If specified with http_error_code_returned_equals, then both must be true for the redirect to be applied.

httpErrorCodeReturnedEquals String

The HTTP error code when the redirect is applied. If specified with key_prefix_equals, then both must be true for the redirect to be applied.

keyPrefixEquals String

The object key name prefix when the redirect is applied. If specified with http_error_code_returned_equals, then both must be true for the redirect to be applied.

httpErrorCodeReturnedEquals string

The HTTP error code when the redirect is applied. If specified with key_prefix_equals, then both must be true for the redirect to be applied.

keyPrefixEquals string

The object key name prefix when the redirect is applied. If specified with http_error_code_returned_equals, then both must be true for the redirect to be applied.

http_error_code_returned_equals str

The HTTP error code when the redirect is applied. If specified with key_prefix_equals, then both must be true for the redirect to be applied.

key_prefix_equals str

The object key name prefix when the redirect is applied. If specified with http_error_code_returned_equals, then both must be true for the redirect to be applied.

httpErrorCodeReturnedEquals String

The HTTP error code when the redirect is applied. If specified with key_prefix_equals, then both must be true for the redirect to be applied.

keyPrefixEquals String

The object key name prefix when the redirect is applied. If specified with http_error_code_returned_equals, then both must be true for the redirect to be applied.

BucketWebsiteConfigurationV2RoutingRuleRedirect

HostName string

The host name to use in the redirect request.

HttpRedirectCode string

The HTTP redirect code to use on the response.

Protocol string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

ReplaceKeyPrefixWith string

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with key_prefix_equals set to docs/ and in the redirect set replace_key_prefix_with to /documents.

ReplaceKeyWith string

The specific object key to use in the redirect request. For example, redirect request to error.html.

HostName string

The host name to use in the redirect request.

HttpRedirectCode string

The HTTP redirect code to use on the response.

Protocol string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

ReplaceKeyPrefixWith string

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with key_prefix_equals set to docs/ and in the redirect set replace_key_prefix_with to /documents.

ReplaceKeyWith string

The specific object key to use in the redirect request. For example, redirect request to error.html.

hostName String

The host name to use in the redirect request.

httpRedirectCode String

The HTTP redirect code to use on the response.

protocol String

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

replaceKeyPrefixWith String

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with key_prefix_equals set to docs/ and in the redirect set replace_key_prefix_with to /documents.

replaceKeyWith String

The specific object key to use in the redirect request. For example, redirect request to error.html.

hostName string

The host name to use in the redirect request.

httpRedirectCode string

The HTTP redirect code to use on the response.

protocol string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

replaceKeyPrefixWith string

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with key_prefix_equals set to docs/ and in the redirect set replace_key_prefix_with to /documents.

replaceKeyWith string

The specific object key to use in the redirect request. For example, redirect request to error.html.

host_name str

The host name to use in the redirect request.

http_redirect_code str

The HTTP redirect code to use on the response.

protocol str

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

replace_key_prefix_with str

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with key_prefix_equals set to docs/ and in the redirect set replace_key_prefix_with to /documents.

replace_key_with str

The specific object key to use in the redirect request. For example, redirect request to error.html.

hostName String

The host name to use in the redirect request.

httpRedirectCode String

The HTTP redirect code to use on the response.

protocol String

Protocol to use when redirecting requests. The default is the protocol that is used in the original request. Valid values: http, https.

replaceKeyPrefixWith String

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with key_prefix_equals set to docs/ and in the redirect set replace_key_prefix_with to /documents.

replaceKeyWith String

The specific object key to use in the redirect request. For example, redirect request to error.html.

Import

S3 bucket website configuration can be imported in one of two ways. If the owner (account ID) of the source bucket is the same account used to configure the Terraform AWS Provider, the S3 bucket website configuration resource should be imported using the bucket e.g.,

 $ pulumi import aws:s3/bucketWebsiteConfigurationV2:BucketWebsiteConfigurationV2 example bucket-name

If the owner (account ID) of the source bucket differs from the account used to configure the Terraform AWS Provider, the S3 bucket website configuration resource should be imported using the bucket and expected_bucket_owner separated by a comma (,) e.g.,

 $ pulumi import aws:s3/bucketWebsiteConfigurationV2:BucketWebsiteConfigurationV2 example bucket-name,123456789012

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.