1. Packages
  2. Volcengine
  3. API Docs
  4. tos
  5. BucketWebsite
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
volcengine logo
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine

    Provides a resource to manage tos bucket website

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const example = new volcengine.tos.BucketWebsite("example", {
        bucketName: "tflyb7",
        errorDocument: {
            key: "error1.html",
        },
        indexDocument: {
            suffix: "index.html",
            supportSubDir: false,
        },
        routingRules: [{
            condition: {
                httpErrorCodeReturnedEquals: 404,
                keyPrefixEquals: "red/",
            },
            redirect: {
                hostName: "example.com",
                httpRedirectCode: 301,
                protocol: "http",
                replaceKeyPrefixWith: "redirect2/",
            },
        }],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    example = volcengine.tos.BucketWebsite("example",
        bucket_name="tflyb7",
        error_document=volcengine.tos.BucketWebsiteErrorDocumentArgs(
            key="error1.html",
        ),
        index_document=volcengine.tos.BucketWebsiteIndexDocumentArgs(
            suffix="index.html",
            support_sub_dir=False,
        ),
        routing_rules=[volcengine.tos.BucketWebsiteRoutingRuleArgs(
            condition=volcengine.tos.BucketWebsiteRoutingRuleConditionArgs(
                http_error_code_returned_equals=404,
                key_prefix_equals="red/",
            ),
            redirect=volcengine.tos.BucketWebsiteRoutingRuleRedirectArgs(
                host_name="example.com",
                http_redirect_code=301,
                protocol="http",
                replace_key_prefix_with="redirect2/",
            ),
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tos"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tos.NewBucketWebsite(ctx, "example", &tos.BucketWebsiteArgs{
    			BucketName: pulumi.String("tflyb7"),
    			ErrorDocument: &tos.BucketWebsiteErrorDocumentArgs{
    				Key: pulumi.String("error1.html"),
    			},
    			IndexDocument: &tos.BucketWebsiteIndexDocumentArgs{
    				Suffix:        pulumi.String("index.html"),
    				SupportSubDir: pulumi.Bool(false),
    			},
    			RoutingRules: tos.BucketWebsiteRoutingRuleArray{
    				&tos.BucketWebsiteRoutingRuleArgs{
    					Condition: &tos.BucketWebsiteRoutingRuleConditionArgs{
    						HttpErrorCodeReturnedEquals: pulumi.Int(404),
    						KeyPrefixEquals:             pulumi.String("red/"),
    					},
    					Redirect: &tos.BucketWebsiteRoutingRuleRedirectArgs{
    						HostName:             pulumi.String("example.com"),
    						HttpRedirectCode:     pulumi.Int(301),
    						Protocol:             pulumi.String("http"),
    						ReplaceKeyPrefixWith: pulumi.String("redirect2/"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Volcengine.Tos.BucketWebsite("example", new()
        {
            BucketName = "tflyb7",
            ErrorDocument = new Volcengine.Tos.Inputs.BucketWebsiteErrorDocumentArgs
            {
                Key = "error1.html",
            },
            IndexDocument = new Volcengine.Tos.Inputs.BucketWebsiteIndexDocumentArgs
            {
                Suffix = "index.html",
                SupportSubDir = false,
            },
            RoutingRules = new[]
            {
                new Volcengine.Tos.Inputs.BucketWebsiteRoutingRuleArgs
                {
                    Condition = new Volcengine.Tos.Inputs.BucketWebsiteRoutingRuleConditionArgs
                    {
                        HttpErrorCodeReturnedEquals = 404,
                        KeyPrefixEquals = "red/",
                    },
                    Redirect = new Volcengine.Tos.Inputs.BucketWebsiteRoutingRuleRedirectArgs
                    {
                        HostName = "example.com",
                        HttpRedirectCode = 301,
                        Protocol = "http",
                        ReplaceKeyPrefixWith = "redirect2/",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.tos.BucketWebsite;
    import com.pulumi.volcengine.tos.BucketWebsiteArgs;
    import com.pulumi.volcengine.tos.inputs.BucketWebsiteErrorDocumentArgs;
    import com.pulumi.volcengine.tos.inputs.BucketWebsiteIndexDocumentArgs;
    import com.pulumi.volcengine.tos.inputs.BucketWebsiteRoutingRuleArgs;
    import com.pulumi.volcengine.tos.inputs.BucketWebsiteRoutingRuleConditionArgs;
    import com.pulumi.volcengine.tos.inputs.BucketWebsiteRoutingRuleRedirectArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new BucketWebsite("example", BucketWebsiteArgs.builder()        
                .bucketName("tflyb7")
                .errorDocument(BucketWebsiteErrorDocumentArgs.builder()
                    .key("error1.html")
                    .build())
                .indexDocument(BucketWebsiteIndexDocumentArgs.builder()
                    .suffix("index.html")
                    .supportSubDir(false)
                    .build())
                .routingRules(BucketWebsiteRoutingRuleArgs.builder()
                    .condition(BucketWebsiteRoutingRuleConditionArgs.builder()
                        .httpErrorCodeReturnedEquals("404")
                        .keyPrefixEquals("red/")
                        .build())
                    .redirect(BucketWebsiteRoutingRuleRedirectArgs.builder()
                        .hostName("example.com")
                        .httpRedirectCode("301")
                        .protocol("http")
                        .replaceKeyPrefixWith("redirect2/")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: volcengine:tos:BucketWebsite
        properties:
          bucketName: tflyb7
          errorDocument:
            key: error1.html
          indexDocument:
            suffix: index.html
            supportSubDir: false
          routingRules:
            - condition:
                httpErrorCodeReturnedEquals: '404'
                keyPrefixEquals: red/
              redirect:
                hostName: example.com
                httpRedirectCode: '301'
                protocol: http
                replaceKeyPrefixWith: redirect2/
    

    Create BucketWebsite Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BucketWebsite(name: string, args: BucketWebsiteArgs, opts?: CustomResourceOptions);
    @overload
    def BucketWebsite(resource_name: str,
                      args: BucketWebsiteArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def BucketWebsite(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      bucket_name: Optional[str] = None,
                      index_document: Optional[BucketWebsiteIndexDocumentArgs] = None,
                      error_document: Optional[BucketWebsiteErrorDocumentArgs] = None,
                      redirect_all_requests_to: Optional[BucketWebsiteRedirectAllRequestsToArgs] = None,
                      routing_rules: Optional[Sequence[BucketWebsiteRoutingRuleArgs]] = None)
    func NewBucketWebsite(ctx *Context, name string, args BucketWebsiteArgs, opts ...ResourceOption) (*BucketWebsite, error)
    public BucketWebsite(string name, BucketWebsiteArgs args, CustomResourceOptions? opts = null)
    public BucketWebsite(String name, BucketWebsiteArgs args)
    public BucketWebsite(String name, BucketWebsiteArgs args, CustomResourceOptions options)
    
    type: volcengine:tos:BucketWebsite
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BucketWebsiteArgs
    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 BucketWebsiteArgs
    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 BucketWebsiteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketWebsiteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketWebsiteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var bucketWebsiteResource = new Volcengine.Tos.BucketWebsite("bucketWebsiteResource", new()
    {
        BucketName = "string",
        IndexDocument = new Volcengine.Tos.Inputs.BucketWebsiteIndexDocumentArgs
        {
            Suffix = "string",
            SupportSubDir = false,
        },
        ErrorDocument = new Volcengine.Tos.Inputs.BucketWebsiteErrorDocumentArgs
        {
            Key = "string",
        },
        RedirectAllRequestsTo = new Volcengine.Tos.Inputs.BucketWebsiteRedirectAllRequestsToArgs
        {
            HostName = "string",
            Protocol = "string",
        },
        RoutingRules = new[]
        {
            new Volcengine.Tos.Inputs.BucketWebsiteRoutingRuleArgs
            {
                Condition = new Volcengine.Tos.Inputs.BucketWebsiteRoutingRuleConditionArgs
                {
                    HttpErrorCodeReturnedEquals = 0,
                    KeyPrefixEquals = "string",
                },
                Redirect = new Volcengine.Tos.Inputs.BucketWebsiteRoutingRuleRedirectArgs
                {
                    HostName = "string",
                    HttpRedirectCode = 0,
                    Protocol = "string",
                    ReplaceKeyPrefixWith = "string",
                    ReplaceKeyWith = "string",
                },
            },
        },
    });
    
    example, err := tos.NewBucketWebsite(ctx, "bucketWebsiteResource", &tos.BucketWebsiteArgs{
    	BucketName: pulumi.String("string"),
    	IndexDocument: &tos.BucketWebsiteIndexDocumentArgs{
    		Suffix:        pulumi.String("string"),
    		SupportSubDir: pulumi.Bool(false),
    	},
    	ErrorDocument: &tos.BucketWebsiteErrorDocumentArgs{
    		Key: pulumi.String("string"),
    	},
    	RedirectAllRequestsTo: &tos.BucketWebsiteRedirectAllRequestsToArgs{
    		HostName: pulumi.String("string"),
    		Protocol: pulumi.String("string"),
    	},
    	RoutingRules: tos.BucketWebsiteRoutingRuleArray{
    		&tos.BucketWebsiteRoutingRuleArgs{
    			Condition: &tos.BucketWebsiteRoutingRuleConditionArgs{
    				HttpErrorCodeReturnedEquals: pulumi.Int(0),
    				KeyPrefixEquals:             pulumi.String("string"),
    			},
    			Redirect: &tos.BucketWebsiteRoutingRuleRedirectArgs{
    				HostName:             pulumi.String("string"),
    				HttpRedirectCode:     pulumi.Int(0),
    				Protocol:             pulumi.String("string"),
    				ReplaceKeyPrefixWith: pulumi.String("string"),
    				ReplaceKeyWith:       pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var bucketWebsiteResource = new BucketWebsite("bucketWebsiteResource", BucketWebsiteArgs.builder()
        .bucketName("string")
        .indexDocument(BucketWebsiteIndexDocumentArgs.builder()
            .suffix("string")
            .supportSubDir(false)
            .build())
        .errorDocument(BucketWebsiteErrorDocumentArgs.builder()
            .key("string")
            .build())
        .redirectAllRequestsTo(BucketWebsiteRedirectAllRequestsToArgs.builder()
            .hostName("string")
            .protocol("string")
            .build())
        .routingRules(BucketWebsiteRoutingRuleArgs.builder()
            .condition(BucketWebsiteRoutingRuleConditionArgs.builder()
                .httpErrorCodeReturnedEquals(0)
                .keyPrefixEquals("string")
                .build())
            .redirect(BucketWebsiteRoutingRuleRedirectArgs.builder()
                .hostName("string")
                .httpRedirectCode(0)
                .protocol("string")
                .replaceKeyPrefixWith("string")
                .replaceKeyWith("string")
                .build())
            .build())
        .build());
    
    bucket_website_resource = volcengine.tos.BucketWebsite("bucketWebsiteResource",
        bucket_name="string",
        index_document={
            "suffix": "string",
            "support_sub_dir": False,
        },
        error_document={
            "key": "string",
        },
        redirect_all_requests_to={
            "host_name": "string",
            "protocol": "string",
        },
        routing_rules=[{
            "condition": {
                "http_error_code_returned_equals": 0,
                "key_prefix_equals": "string",
            },
            "redirect": {
                "host_name": "string",
                "http_redirect_code": 0,
                "protocol": "string",
                "replace_key_prefix_with": "string",
                "replace_key_with": "string",
            },
        }])
    
    const bucketWebsiteResource = new volcengine.tos.BucketWebsite("bucketWebsiteResource", {
        bucketName: "string",
        indexDocument: {
            suffix: "string",
            supportSubDir: false,
        },
        errorDocument: {
            key: "string",
        },
        redirectAllRequestsTo: {
            hostName: "string",
            protocol: "string",
        },
        routingRules: [{
            condition: {
                httpErrorCodeReturnedEquals: 0,
                keyPrefixEquals: "string",
            },
            redirect: {
                hostName: "string",
                httpRedirectCode: 0,
                protocol: "string",
                replaceKeyPrefixWith: "string",
                replaceKeyWith: "string",
            },
        }],
    });
    
    type: volcengine:tos:BucketWebsite
    properties:
        bucketName: string
        errorDocument:
            key: string
        indexDocument:
            suffix: string
            supportSubDir: false
        redirectAllRequestsTo:
            hostName: string
            protocol: string
        routingRules:
            - condition:
                httpErrorCodeReturnedEquals: 0
                keyPrefixEquals: string
              redirect:
                hostName: string
                httpRedirectCode: 0
                protocol: string
                replaceKeyPrefixWith: string
                replaceKeyWith: string
    

    BucketWebsite Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BucketWebsite resource accepts the following input properties:

    BucketName string
    The name of the TOS bucket.
    IndexDocument BucketWebsiteIndexDocument
    The index document configuration for the website.
    ErrorDocument BucketWebsiteErrorDocument
    The error document configuration for the website.
    RedirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    The redirect configuration for all requests.
    RoutingRules List<BucketWebsiteRoutingRule>
    The routing rules for the website.
    BucketName string
    The name of the TOS bucket.
    IndexDocument BucketWebsiteIndexDocumentArgs
    The index document configuration for the website.
    ErrorDocument BucketWebsiteErrorDocumentArgs
    The error document configuration for the website.
    RedirectAllRequestsTo BucketWebsiteRedirectAllRequestsToArgs
    The redirect configuration for all requests.
    RoutingRules []BucketWebsiteRoutingRuleArgs
    The routing rules for the website.
    bucketName String
    The name of the TOS bucket.
    indexDocument BucketWebsiteIndexDocument
    The index document configuration for the website.
    errorDocument BucketWebsiteErrorDocument
    The error document configuration for the website.
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    The redirect configuration for all requests.
    routingRules List<BucketWebsiteRoutingRule>
    The routing rules for the website.
    bucketName string
    The name of the TOS bucket.
    indexDocument BucketWebsiteIndexDocument
    The index document configuration for the website.
    errorDocument BucketWebsiteErrorDocument
    The error document configuration for the website.
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    The redirect configuration for all requests.
    routingRules BucketWebsiteRoutingRule[]
    The routing rules for the website.
    bucket_name str
    The name of the TOS bucket.
    index_document BucketWebsiteIndexDocumentArgs
    The index document configuration for the website.
    error_document BucketWebsiteErrorDocumentArgs
    The error document configuration for the website.
    redirect_all_requests_to BucketWebsiteRedirectAllRequestsToArgs
    The redirect configuration for all requests.
    routing_rules Sequence[BucketWebsiteRoutingRuleArgs]
    The routing rules for the website.
    bucketName String
    The name of the TOS bucket.
    indexDocument Property Map
    The index document configuration for the website.
    errorDocument Property Map
    The error document configuration for the website.
    redirectAllRequestsTo Property Map
    The redirect configuration for all requests.
    routingRules List<Property Map>
    The routing rules for the website.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BucketWebsite Resource

    Get an existing BucketWebsite 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?: BucketWebsiteState, opts?: CustomResourceOptions): BucketWebsite
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket_name: Optional[str] = None,
            error_document: Optional[BucketWebsiteErrorDocumentArgs] = None,
            index_document: Optional[BucketWebsiteIndexDocumentArgs] = None,
            redirect_all_requests_to: Optional[BucketWebsiteRedirectAllRequestsToArgs] = None,
            routing_rules: Optional[Sequence[BucketWebsiteRoutingRuleArgs]] = None) -> BucketWebsite
    func GetBucketWebsite(ctx *Context, name string, id IDInput, state *BucketWebsiteState, opts ...ResourceOption) (*BucketWebsite, error)
    public static BucketWebsite Get(string name, Input<string> id, BucketWebsiteState? state, CustomResourceOptions? opts = null)
    public static BucketWebsite get(String name, Output<String> id, BucketWebsiteState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:tos:BucketWebsite    get:      id: ${id}
    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:
    BucketName string
    The name of the TOS bucket.
    ErrorDocument BucketWebsiteErrorDocument
    The error document configuration for the website.
    IndexDocument BucketWebsiteIndexDocument
    The index document configuration for the website.
    RedirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    The redirect configuration for all requests.
    RoutingRules List<BucketWebsiteRoutingRule>
    The routing rules for the website.
    BucketName string
    The name of the TOS bucket.
    ErrorDocument BucketWebsiteErrorDocumentArgs
    The error document configuration for the website.
    IndexDocument BucketWebsiteIndexDocumentArgs
    The index document configuration for the website.
    RedirectAllRequestsTo BucketWebsiteRedirectAllRequestsToArgs
    The redirect configuration for all requests.
    RoutingRules []BucketWebsiteRoutingRuleArgs
    The routing rules for the website.
    bucketName String
    The name of the TOS bucket.
    errorDocument BucketWebsiteErrorDocument
    The error document configuration for the website.
    indexDocument BucketWebsiteIndexDocument
    The index document configuration for the website.
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    The redirect configuration for all requests.
    routingRules List<BucketWebsiteRoutingRule>
    The routing rules for the website.
    bucketName string
    The name of the TOS bucket.
    errorDocument BucketWebsiteErrorDocument
    The error document configuration for the website.
    indexDocument BucketWebsiteIndexDocument
    The index document configuration for the website.
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    The redirect configuration for all requests.
    routingRules BucketWebsiteRoutingRule[]
    The routing rules for the website.
    bucket_name str
    The name of the TOS bucket.
    error_document BucketWebsiteErrorDocumentArgs
    The error document configuration for the website.
    index_document BucketWebsiteIndexDocumentArgs
    The index document configuration for the website.
    redirect_all_requests_to BucketWebsiteRedirectAllRequestsToArgs
    The redirect configuration for all requests.
    routing_rules Sequence[BucketWebsiteRoutingRuleArgs]
    The routing rules for the website.
    bucketName String
    The name of the TOS bucket.
    errorDocument Property Map
    The error document configuration for the website.
    indexDocument Property Map
    The index document configuration for the website.
    redirectAllRequestsTo Property Map
    The redirect configuration for all requests.
    routingRules List<Property Map>
    The routing rules for the website.

    Supporting Types

    BucketWebsiteErrorDocument, BucketWebsiteErrorDocumentArgs

    Key string
    The key of the error document object, e.g., error.html.
    Key string
    The key of the error document object, e.g., error.html.
    key String
    The key of the error document object, e.g., error.html.
    key string
    The key of the error document object, e.g., error.html.
    key str
    The key of the error document object, e.g., error.html.
    key String
    The key of the error document object, e.g., error.html.

    BucketWebsiteIndexDocument, BucketWebsiteIndexDocumentArgs

    Suffix string
    The suffix of the index document, e.g., index.html.
    SupportSubDir bool
    Whether to support subdirectory indexing. Default is false.
    Suffix string
    The suffix of the index document, e.g., index.html.
    SupportSubDir bool
    Whether to support subdirectory indexing. Default is false.
    suffix String
    The suffix of the index document, e.g., index.html.
    supportSubDir Boolean
    Whether to support subdirectory indexing. Default is false.
    suffix string
    The suffix of the index document, e.g., index.html.
    supportSubDir boolean
    Whether to support subdirectory indexing. Default is false.
    suffix str
    The suffix of the index document, e.g., index.html.
    support_sub_dir bool
    Whether to support subdirectory indexing. Default is false.
    suffix String
    The suffix of the index document, e.g., index.html.
    supportSubDir Boolean
    Whether to support subdirectory indexing. Default is false.

    BucketWebsiteRedirectAllRequestsTo, BucketWebsiteRedirectAllRequestsToArgs

    HostName string
    The target host name for redirect.
    Protocol string
    The protocol for redirect. Valid values: http, https.
    HostName string
    The target host name for redirect.
    Protocol string
    The protocol for redirect. Valid values: http, https.
    hostName String
    The target host name for redirect.
    protocol String
    The protocol for redirect. Valid values: http, https.
    hostName string
    The target host name for redirect.
    protocol string
    The protocol for redirect. Valid values: http, https.
    host_name str
    The target host name for redirect.
    protocol str
    The protocol for redirect. Valid values: http, https.
    hostName String
    The target host name for redirect.
    protocol String
    The protocol for redirect. Valid values: http, https.

    BucketWebsiteRoutingRule, BucketWebsiteRoutingRuleArgs

    Condition BucketWebsiteRoutingRuleCondition
    The condition for the routing rule.
    Redirect BucketWebsiteRoutingRuleRedirect
    The redirect configuration for the routing rule.
    Condition BucketWebsiteRoutingRuleCondition
    The condition for the routing rule.
    Redirect BucketWebsiteRoutingRuleRedirect
    The redirect configuration for the routing rule.
    condition BucketWebsiteRoutingRuleCondition
    The condition for the routing rule.
    redirect BucketWebsiteRoutingRuleRedirect
    The redirect configuration for the routing rule.
    condition BucketWebsiteRoutingRuleCondition
    The condition for the routing rule.
    redirect BucketWebsiteRoutingRuleRedirect
    The redirect configuration for the routing rule.
    condition BucketWebsiteRoutingRuleCondition
    The condition for the routing rule.
    redirect BucketWebsiteRoutingRuleRedirect
    The redirect configuration for the routing rule.
    condition Property Map
    The condition for the routing rule.
    redirect Property Map
    The redirect configuration for the routing rule.

    BucketWebsiteRoutingRuleCondition, BucketWebsiteRoutingRuleConditionArgs

    HttpErrorCodeReturnedEquals int
    The HTTP error code that must match for the rule to apply, e.g., 404.
    KeyPrefixEquals string
    The key prefix that must match for the rule to apply.
    HttpErrorCodeReturnedEquals int
    The HTTP error code that must match for the rule to apply, e.g., 404.
    KeyPrefixEquals string
    The key prefix that must match for the rule to apply.
    httpErrorCodeReturnedEquals Integer
    The HTTP error code that must match for the rule to apply, e.g., 404.
    keyPrefixEquals String
    The key prefix that must match for the rule to apply.
    httpErrorCodeReturnedEquals number
    The HTTP error code that must match for the rule to apply, e.g., 404.
    keyPrefixEquals string
    The key prefix that must match for the rule to apply.
    http_error_code_returned_equals int
    The HTTP error code that must match for the rule to apply, e.g., 404.
    key_prefix_equals str
    The key prefix that must match for the rule to apply.
    httpErrorCodeReturnedEquals Number
    The HTTP error code that must match for the rule to apply, e.g., 404.
    keyPrefixEquals String
    The key prefix that must match for the rule to apply.

    BucketWebsiteRoutingRuleRedirect, BucketWebsiteRoutingRuleRedirectArgs

    HostName string
    The host name to redirect to.
    HttpRedirectCode int
    The HTTP redirect code to use, e.g., 301, 302.
    Protocol string
    The protocol to use for the redirect. Valid values: http, https.
    ReplaceKeyPrefixWith string
    The key prefix to replace the original key prefix with.
    ReplaceKeyWith string
    The key to replace the original key with.
    HostName string
    The host name to redirect to.
    HttpRedirectCode int
    The HTTP redirect code to use, e.g., 301, 302.
    Protocol string
    The protocol to use for the redirect. Valid values: http, https.
    ReplaceKeyPrefixWith string
    The key prefix to replace the original key prefix with.
    ReplaceKeyWith string
    The key to replace the original key with.
    hostName String
    The host name to redirect to.
    httpRedirectCode Integer
    The HTTP redirect code to use, e.g., 301, 302.
    protocol String
    The protocol to use for the redirect. Valid values: http, https.
    replaceKeyPrefixWith String
    The key prefix to replace the original key prefix with.
    replaceKeyWith String
    The key to replace the original key with.
    hostName string
    The host name to redirect to.
    httpRedirectCode number
    The HTTP redirect code to use, e.g., 301, 302.
    protocol string
    The protocol to use for the redirect. Valid values: http, https.
    replaceKeyPrefixWith string
    The key prefix to replace the original key prefix with.
    replaceKeyWith string
    The key to replace the original key with.
    host_name str
    The host name to redirect to.
    http_redirect_code int
    The HTTP redirect code to use, e.g., 301, 302.
    protocol str
    The protocol to use for the redirect. Valid values: http, https.
    replace_key_prefix_with str
    The key prefix to replace the original key prefix with.
    replace_key_with str
    The key to replace the original key with.
    hostName String
    The host name to redirect to.
    httpRedirectCode Number
    The HTTP redirect code to use, e.g., 301, 302.
    protocol String
    The protocol to use for the redirect. Valid values: http, https.
    replaceKeyPrefixWith String
    The key prefix to replace the original key prefix with.
    replaceKeyWith String
    The key to replace the original key with.

    Import

    TosBucketWebsite can be imported using the bucketName, e.g.

    $ pulumi import volcengine:tos/bucketWebsite:BucketWebsite default bucket_name
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate