1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. tos
  6. BucketWebsite
Viewing docs for volcenginecc v0.0.49
published on Thursday, Jul 16, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.49
published on Thursday, Jul 16, 2026 by Volcengine

    Static website hosting configuration for TOS bucket. You can configure the bucket for static website hosting mode and access the static website via the bucket domain name

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
    
    const tOSBucketWebsiteDemo = new volcenginecc.tos.BucketWebsite("TOSBucketWebsiteDemo", {
        bucket: "ccapi-test",
        indexDocument: {
            suffix: "index.html",
            forbidden_sub_dir: false,
        },
        errorDocument: {
            key: "error.html",
        },
        routingRules: [{
            condition: {
                httpErrorCodeReturnedEquals: 404,
                keyPrefixEquals: "red/",
            },
            redirect: {
                hostName: "example.com",
                httpRedirectCode: 302,
                protocol: "https",
                replaceKeyPrefixWith: "redirect/",
            },
        }],
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    t_os_bucket_website_demo = volcenginecc.tos.BucketWebsite("TOSBucketWebsiteDemo",
        bucket="ccapi-test",
        index_document={
            "suffix": "index.html",
            "forbidden_sub_dir": False,
        },
        error_document={
            "key": "error.html",
        },
        routing_rules=[{
            "condition": {
                "http_error_code_returned_equals": 404,
                "key_prefix_equals": "red/",
            },
            "redirect": {
                "host_name": "example.com",
                "http_redirect_code": 302,
                "protocol": "https",
                "replace_key_prefix_with": "redirect/",
            },
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/tos"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tos.NewBucketWebsite(ctx, "TOSBucketWebsiteDemo", &tos.BucketWebsiteArgs{
    			Bucket: pulumi.String("ccapi-test"),
    			IndexDocument: &tos.BucketWebsiteIndexDocumentArgs{
    				Suffix:            pulumi.String("index.html"),
    				Forbidden_sub_dir: false,
    			},
    			ErrorDocument: &tos.BucketWebsiteErrorDocumentArgs{
    				Key: pulumi.String("error.html"),
    			},
    			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(302),
    						Protocol:             pulumi.String("https"),
    						ReplaceKeyPrefixWith: pulumi.String("redirect/"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var tOSBucketWebsiteDemo = new Volcenginecc.Tos.BucketWebsite("TOSBucketWebsiteDemo", new()
        {
            Bucket = "ccapi-test",
            IndexDocument = new Volcenginecc.Tos.Inputs.BucketWebsiteIndexDocumentArgs
            {
                Suffix = "index.html",
                Forbidden_sub_dir = false,
            },
            ErrorDocument = new Volcenginecc.Tos.Inputs.BucketWebsiteErrorDocumentArgs
            {
                Key = "error.html",
            },
            RoutingRules = new[]
            {
                new Volcenginecc.Tos.Inputs.BucketWebsiteRoutingRuleArgs
                {
                    Condition = new Volcenginecc.Tos.Inputs.BucketWebsiteRoutingRuleConditionArgs
                    {
                        HttpErrorCodeReturnedEquals = 404,
                        KeyPrefixEquals = "red/",
                    },
                    Redirect = new Volcenginecc.Tos.Inputs.BucketWebsiteRoutingRuleRedirectArgs
                    {
                        HostName = "example.com",
                        HttpRedirectCode = 302,
                        Protocol = "https",
                        ReplaceKeyPrefixWith = "redirect/",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.volcengine.volcenginecc.tos.BucketWebsite;
    import com.volcengine.volcenginecc.tos.BucketWebsiteArgs;
    import com.pulumi.volcenginecc.tos.inputs.BucketWebsiteIndexDocumentArgs;
    import com.pulumi.volcenginecc.tos.inputs.BucketWebsiteErrorDocumentArgs;
    import com.pulumi.volcenginecc.tos.inputs.BucketWebsiteRoutingRuleArgs;
    import com.pulumi.volcenginecc.tos.inputs.BucketWebsiteRoutingRuleConditionArgs;
    import com.pulumi.volcenginecc.tos.inputs.BucketWebsiteRoutingRuleRedirectArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 tOSBucketWebsiteDemo = new BucketWebsite("tOSBucketWebsiteDemo", BucketWebsiteArgs.builder()
                .bucket("ccapi-test")
                .indexDocument(BucketWebsiteIndexDocumentArgs.builder()
                    .suffix("index.html")
                    .forbidden_sub_dir(false)
                    .build())
                .errorDocument(BucketWebsiteErrorDocumentArgs.builder()
                    .key("error.html")
                    .build())
                .routingRules(BucketWebsiteRoutingRuleArgs.builder()
                    .condition(BucketWebsiteRoutingRuleConditionArgs.builder()
                        .httpErrorCodeReturnedEquals(404)
                        .keyPrefixEquals("red/")
                        .build())
                    .redirect(BucketWebsiteRoutingRuleRedirectArgs.builder()
                        .hostName("example.com")
                        .httpRedirectCode(302)
                        .protocol("https")
                        .replaceKeyPrefixWith("redirect/")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      tOSBucketWebsiteDemo:
        type: volcenginecc:tos:BucketWebsite
        name: TOSBucketWebsiteDemo
        properties:
          bucket: ccapi-test
          indexDocument:
            suffix: index.html
            forbidden_sub_dir: false
          errorDocument:
            key: error.html
          routingRules:
            - condition:
                httpErrorCodeReturnedEquals: 404
                keyPrefixEquals: red/
              redirect:
                hostName: example.com
                httpRedirectCode: 302
                protocol: https
                replaceKeyPrefixWith: redirect/
    
    pulumi {
      required_providers {
        volcenginecc = {
          source = "pulumi/volcenginecc"
        }
      }
    }
    
    resource "volcenginecc_tos_bucketwebsite" "TOSBucketWebsiteDemo" {
      bucket = "ccapi-test"
      index_document = {
        suffix            = "index.html"
        forbidden_sub_dir = false
      }
      error_document = {
        key = "error.html"
      }
      routing_rules {
        condition = {
          http_error_code_returned_equals = 404
          key_prefix_equals               = "red/"
        }
        redirect = {
          host_name               = "example.com"
          http_redirect_code      = 302
          protocol                = "https"
          replace_key_prefix_with = "redirect/"
        }
      }
    }
    

    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: 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)
    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: volcenginecc:tos:BucketWebsite
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "volcenginecc_tos_bucketwebsite" "name" {
        # resource properties
    }

    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 Volcenginecc.Tos.BucketWebsite("bucketWebsiteResource", new()
    {
        Bucket = "string",
        ErrorDocument = new Volcenginecc.Tos.Inputs.BucketWebsiteErrorDocumentArgs
        {
            Key = "string",
        },
        IndexDocument = new Volcenginecc.Tos.Inputs.BucketWebsiteIndexDocumentArgs
        {
            ForbiddenSubDir = false,
            Suffix = "string",
        },
        RedirectAllRequestsTo = new Volcenginecc.Tos.Inputs.BucketWebsiteRedirectAllRequestsToArgs
        {
            HostName = "string",
            Protocol = "string",
        },
        RoutingRules = new[]
        {
            new Volcenginecc.Tos.Inputs.BucketWebsiteRoutingRuleArgs
            {
                Condition = new Volcenginecc.Tos.Inputs.BucketWebsiteRoutingRuleConditionArgs
                {
                    HttpErrorCodeReturnedEquals = 0,
                    KeyPrefixEquals = "string",
                },
                Redirect = new Volcenginecc.Tos.Inputs.BucketWebsiteRoutingRuleRedirectArgs
                {
                    HostName = "string",
                    HttpRedirectCode = 0,
                    Protocol = "string",
                    ReplaceKeyPrefixWith = "string",
                    ReplaceKeyWith = "string",
                },
            },
        },
    });
    
    example, err := tos.NewBucketWebsite(ctx, "bucketWebsiteResource", &tos.BucketWebsiteArgs{
    	Bucket: pulumi.String("string"),
    	ErrorDocument: &tos.BucketWebsiteErrorDocumentArgs{
    		Key: pulumi.String("string"),
    	},
    	IndexDocument: &tos.BucketWebsiteIndexDocumentArgs{
    		ForbiddenSubDir: pulumi.Bool(false),
    		Suffix:          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"),
    			},
    		},
    	},
    })
    
    resource "volcenginecc_tos_bucketwebsite" "bucketWebsiteResource" {
      bucket = "string"
      error_document = {
        key = "string"
      }
      index_document = {
        forbidden_sub_dir = false
        suffix            = "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"
        }
      }
    }
    
    var bucketWebsiteResource = new BucketWebsite("bucketWebsiteResource", BucketWebsiteArgs.builder()
        .bucket("string")
        .errorDocument(BucketWebsiteErrorDocumentArgs.builder()
            .key("string")
            .build())
        .indexDocument(BucketWebsiteIndexDocumentArgs.builder()
            .forbiddenSubDir(false)
            .suffix("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 = volcenginecc.tos.BucketWebsite("bucketWebsiteResource",
        bucket="string",
        error_document={
            "key": "string",
        },
        index_document={
            "forbidden_sub_dir": False,
            "suffix": "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 volcenginecc.tos.BucketWebsite("bucketWebsiteResource", {
        bucket: "string",
        errorDocument: {
            key: "string",
        },
        indexDocument: {
            forbiddenSubDir: false,
            suffix: "string",
        },
        redirectAllRequestsTo: {
            hostName: "string",
            protocol: "string",
        },
        routingRules: [{
            condition: {
                httpErrorCodeReturnedEquals: 0,
                keyPrefixEquals: "string",
            },
            redirect: {
                hostName: "string",
                httpRedirectCode: 0,
                protocol: "string",
                replaceKeyPrefixWith: "string",
                replaceKeyWith: "string",
            },
        }],
    });
    
    type: volcenginecc:tos:BucketWebsite
    properties:
        bucket: string
        errorDocument:
            key: string
        indexDocument:
            forbiddenSubDir: false
            suffix: string
        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:

    Bucket string
    Bucket name
    ErrorDocument Volcengine.BucketWebsiteErrorDocument
    Error page configuration
    IndexDocument Volcengine.BucketWebsiteIndexDocument
    Default homepage configuration
    RedirectAllRequestsTo Volcengine.BucketWebsiteRedirectAllRequestsTo
    Rule for redirecting all requests
    RoutingRules List<Volcengine.BucketWebsiteRoutingRule>
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    Bucket string
    Bucket name
    ErrorDocument BucketWebsiteErrorDocumentArgs
    Error page configuration
    IndexDocument BucketWebsiteIndexDocumentArgs
    Default homepage configuration
    RedirectAllRequestsTo BucketWebsiteRedirectAllRequestsToArgs
    Rule for redirecting all requests
    RoutingRules []BucketWebsiteRoutingRuleArgs
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket string
    Bucket name
    error_document object
    Error page configuration
    index_document object
    Default homepage configuration
    redirect_all_requests_to object
    Rule for redirecting all requests
    routing_rules list(object)
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket String
    Bucket name
    errorDocument BucketWebsiteErrorDocument
    Error page configuration
    indexDocument BucketWebsiteIndexDocument
    Default homepage configuration
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    Rule for redirecting all requests
    routingRules List<BucketWebsiteRoutingRule>
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket string
    Bucket name
    errorDocument BucketWebsiteErrorDocument
    Error page configuration
    indexDocument BucketWebsiteIndexDocument
    Default homepage configuration
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    Rule for redirecting all requests
    routingRules BucketWebsiteRoutingRule[]
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket str
    Bucket name
    error_document BucketWebsiteErrorDocumentArgs
    Error page configuration
    index_document BucketWebsiteIndexDocumentArgs
    Default homepage configuration
    redirect_all_requests_to BucketWebsiteRedirectAllRequestsToArgs
    Rule for redirecting all requests
    routing_rules Sequence[BucketWebsiteRoutingRuleArgs]
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket String
    Bucket name
    errorDocument Property Map
    Error page configuration
    indexDocument Property Map
    Default homepage configuration
    redirectAllRequestsTo Property Map
    Rule for redirecting all requests
    routingRules List<Property Map>
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.

    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 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: 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: volcenginecc:tos:BucketWebsite    get:      id: ${id}
    import {
      to = volcenginecc_tos_bucketwebsite.example
      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:
    Bucket string
    Bucket name
    ErrorDocument Volcengine.BucketWebsiteErrorDocument
    Error page configuration
    IndexDocument Volcengine.BucketWebsiteIndexDocument
    Default homepage configuration
    RedirectAllRequestsTo Volcengine.BucketWebsiteRedirectAllRequestsTo
    Rule for redirecting all requests
    RoutingRules List<Volcengine.BucketWebsiteRoutingRule>
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    Bucket string
    Bucket name
    ErrorDocument BucketWebsiteErrorDocumentArgs
    Error page configuration
    IndexDocument BucketWebsiteIndexDocumentArgs
    Default homepage configuration
    RedirectAllRequestsTo BucketWebsiteRedirectAllRequestsToArgs
    Rule for redirecting all requests
    RoutingRules []BucketWebsiteRoutingRuleArgs
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket string
    Bucket name
    error_document object
    Error page configuration
    index_document object
    Default homepage configuration
    redirect_all_requests_to object
    Rule for redirecting all requests
    routing_rules list(object)
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket String
    Bucket name
    errorDocument BucketWebsiteErrorDocument
    Error page configuration
    indexDocument BucketWebsiteIndexDocument
    Default homepage configuration
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    Rule for redirecting all requests
    routingRules List<BucketWebsiteRoutingRule>
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket string
    Bucket name
    errorDocument BucketWebsiteErrorDocument
    Error page configuration
    indexDocument BucketWebsiteIndexDocument
    Default homepage configuration
    redirectAllRequestsTo BucketWebsiteRedirectAllRequestsTo
    Rule for redirecting all requests
    routingRules BucketWebsiteRoutingRule[]
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket str
    Bucket name
    error_document BucketWebsiteErrorDocumentArgs
    Error page configuration
    index_document BucketWebsiteIndexDocumentArgs
    Default homepage configuration
    redirect_all_requests_to BucketWebsiteRedirectAllRequestsToArgs
    Rule for redirecting all requests
    routing_rules Sequence[BucketWebsiteRoutingRuleArgs]
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    bucket String
    Bucket name
    errorDocument Property Map
    Error page configuration
    indexDocument Property Map
    Default homepage configuration
    redirectAllRequestsTo Property Map
    Rule for redirecting all requests
    routingRules List<Property Map>
    Redirect rule Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.

    Supporting Types

    BucketWebsiteErrorDocument, BucketWebsiteErrorDocumentArgs

    Key string
    When a 4xx error occurs, this page is returned
    Key string
    When a 4xx error occurs, this page is returned
    key string
    When a 4xx error occurs, this page is returned
    key String
    When a 4xx error occurs, this page is returned
    key string
    When a 4xx error occurs, this page is returned
    key str
    When a 4xx error occurs, this page is returned
    key String
    When a 4xx error occurs, this page is returned

    BucketWebsiteIndexDocument, BucketWebsiteIndexDocumentArgs

    ForbiddenSubDir bool
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    Suffix string
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html
    ForbiddenSubDir bool
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    Suffix string
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html
    forbidden_sub_dir bool
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    suffix string
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html
    forbiddenSubDir Boolean
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    suffix String
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html
    forbiddenSubDir boolean
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    suffix string
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html
    forbidden_sub_dir bool
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    suffix str
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html
    forbiddenSubDir Boolean
    Whether to support redirecting to the default homepage of a subdirectory. Value description: false (default): Does not support redirecting to the default homepage of a subdirectory. true: Supports redirecting to the default homepage of a subdirectory
    suffix String
    When requesting a directory (ending with /), returns the object specified by Suffix in that directory. For example, if Suffix is set to index.html, accessing document/ returns document/index.html

    BucketWebsiteRedirectAllRequestsTo, BucketWebsiteRedirectAllRequestsToArgs

    HostName string
    Redirect site name
    Protocol string
    Protocol used for redirect requests. Supports http and https. Default is http
    HostName string
    Redirect site name
    Protocol string
    Protocol used for redirect requests. Supports http and https. Default is http
    host_name string
    Redirect site name
    protocol string
    Protocol used for redirect requests. Supports http and https. Default is http
    hostName String
    Redirect site name
    protocol String
    Protocol used for redirect requests. Supports http and https. Default is http
    hostName string
    Redirect site name
    protocol string
    Protocol used for redirect requests. Supports http and https. Default is http
    host_name str
    Redirect site name
    protocol str
    Protocol used for redirect requests. Supports http and https. Default is http
    hostName String
    Redirect site name
    protocol String
    Protocol used for redirect requests. Supports http and https. Default is http

    BucketWebsiteRoutingRule, BucketWebsiteRoutingRuleArgs

    Condition Volcengine.BucketWebsiteRoutingRuleCondition
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    Redirect Volcengine.BucketWebsiteRoutingRuleRedirect
    Set redirect rule
    Condition BucketWebsiteRoutingRuleCondition
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    Redirect BucketWebsiteRoutingRuleRedirect
    Set redirect rule
    condition object
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    redirect object
    Set redirect rule
    condition BucketWebsiteRoutingRuleCondition
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    redirect BucketWebsiteRoutingRuleRedirect
    Set redirect rule
    condition BucketWebsiteRoutingRuleCondition
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    redirect BucketWebsiteRoutingRuleRedirect
    Set redirect rule
    condition BucketWebsiteRoutingRuleCondition
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    redirect BucketWebsiteRoutingRuleRedirect
    Set redirect rule
    condition Property Map
    Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
    redirect Property Map
    Set redirect rule

    BucketWebsiteRoutingRuleCondition, BucketWebsiteRoutingRuleConditionArgs

    HttpErrorCodeReturnedEquals int
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    KeyPrefixEquals string
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    HttpErrorCodeReturnedEquals int
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    KeyPrefixEquals string
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    http_error_code_returned_equals number
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    key_prefix_equals string
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    httpErrorCodeReturnedEquals Integer
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    keyPrefixEquals String
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    httpErrorCodeReturnedEquals number
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    keyPrefixEquals string
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    http_error_code_returned_equals int
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    key_prefix_equals str
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    httpErrorCodeReturnedEquals Number
    Set the HTTP error code that triggers the redirect rule. For example, if HttpErrorCodeReturnedEquals is set to 404, the rule takes effect when the specified object does not exist. If KeyPrefixEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met
    keyPrefixEquals String
    Set the object name prefix for the redirect rule to take effect. If HttpErrorCodeReturnedEquals is set, the redirect rule only takes effect when both HttpErrorCodeReturnedEquals and KeyPrefixEquals conditions are met

    BucketWebsiteRoutingRuleRedirect, BucketWebsiteRoutingRuleRedirectArgs

    HostName string
    Set the redirect site name
    HttpRedirectCode int
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    Protocol string
    Protocol used for redirect requests, including http and https. Default is http
    ReplaceKeyPrefixWith string
    Object name prefix used for redirect
    ReplaceKeyWith string
    Object name used for redirect
    HostName string
    Set the redirect site name
    HttpRedirectCode int
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    Protocol string
    Protocol used for redirect requests, including http and https. Default is http
    ReplaceKeyPrefixWith string
    Object name prefix used for redirect
    ReplaceKeyWith string
    Object name used for redirect
    host_name string
    Set the redirect site name
    http_redirect_code number
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    protocol string
    Protocol used for redirect requests, including http and https. Default is http
    replace_key_prefix_with string
    Object name prefix used for redirect
    replace_key_with string
    Object name used for redirect
    hostName String
    Set the redirect site name
    httpRedirectCode Integer
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    protocol String
    Protocol used for redirect requests, including http and https. Default is http
    replaceKeyPrefixWith String
    Object name prefix used for redirect
    replaceKeyWith String
    Object name used for redirect
    hostName string
    Set the redirect site name
    httpRedirectCode number
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    protocol string
    Protocol used for redirect requests, including http and https. Default is http
    replaceKeyPrefixWith string
    Object name prefix used for redirect
    replaceKeyWith string
    Object name used for redirect
    host_name str
    Set the redirect site name
    http_redirect_code int
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    protocol str
    Protocol used for redirect requests, including http and https. Default is http
    replace_key_prefix_with str
    Object name prefix used for redirect
    replace_key_with str
    Object name used for redirect
    hostName String
    Set the redirect site name
    httpRedirectCode Number
    Status code returned during redirect. Only 3XX status codes can be set; 300 cannot be set. Default is 301
    protocol String
    Protocol used for redirect requests, including http and https. Default is http
    replaceKeyPrefixWith String
    Object name prefix used for redirect
    replaceKeyWith String
    Object name used for redirect

    Import

    $ pulumi import volcenginecc:tos/bucketWebsite:BucketWebsite example "bucket"
    

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

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.49
    published on Thursday, Jul 16, 2026 by Volcengine

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial