published on Thursday, Jul 16, 2026 by Volcengine
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
- Error
Document Volcengine.Bucket Website Error Document - Error page configuration
- Index
Document Volcengine.Bucket Website Index Document - Default homepage configuration
- Redirect
All Volcengine.Requests To Bucket Website Redirect All Requests To - Rule for redirecting all requests
- Routing
Rules List<Volcengine.Bucket Website Routing Rule> - 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 BucketWebsite Error Document Args - Error page configuration
- Index
Document BucketWebsite Index Document Args - Default homepage configuration
- Redirect
All BucketRequests To Website Redirect All Requests To Args - Rule for redirecting all requests
- Routing
Rules []BucketWebsite Routing Rule Args - 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_ objectrequests_ to - 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
- error
Document BucketWebsite Error Document - Error page configuration
- index
Document BucketWebsite Index Document - Default homepage configuration
- redirect
All BucketRequests To Website Redirect All Requests To - Rule for redirecting all requests
- routing
Rules List<BucketWebsite Routing Rule> - 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 BucketWebsite Error Document - Error page configuration
- index
Document BucketWebsite Index Document - Default homepage configuration
- redirect
All BucketRequests To Website Redirect All Requests To - Rule for redirecting all requests
- routing
Rules BucketWebsite Routing Rule[] - 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 BucketWebsite Error Document Args - Error page configuration
- index_
document BucketWebsite Index Document Args - Default homepage configuration
- redirect_
all_ Bucketrequests_ to Website Redirect All Requests To Args - Rule for redirecting all requests
- routing_
rules Sequence[BucketWebsite Routing Rule Args] - 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 Property Map - Error page configuration
- index
Document Property Map - Default homepage configuration
- redirect
All Property MapRequests To - Rule for redirecting all requests
- routing
Rules 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) -> BucketWebsitefunc 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.
- Bucket string
- Bucket name
- Error
Document Volcengine.Bucket Website Error Document - Error page configuration
- Index
Document Volcengine.Bucket Website Index Document - Default homepage configuration
- Redirect
All Volcengine.Requests To Bucket Website Redirect All Requests To - Rule for redirecting all requests
- Routing
Rules List<Volcengine.Bucket Website Routing Rule> - 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 BucketWebsite Error Document Args - Error page configuration
- Index
Document BucketWebsite Index Document Args - Default homepage configuration
- Redirect
All BucketRequests To Website Redirect All Requests To Args - Rule for redirecting all requests
- Routing
Rules []BucketWebsite Routing Rule Args - 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_ objectrequests_ to - 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
- error
Document BucketWebsite Error Document - Error page configuration
- index
Document BucketWebsite Index Document - Default homepage configuration
- redirect
All BucketRequests To Website Redirect All Requests To - Rule for redirecting all requests
- routing
Rules List<BucketWebsite Routing Rule> - 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 BucketWebsite Error Document - Error page configuration
- index
Document BucketWebsite Index Document - Default homepage configuration
- redirect
All BucketRequests To Website Redirect All Requests To - Rule for redirecting all requests
- routing
Rules BucketWebsite Routing Rule[] - 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 BucketWebsite Error Document Args - Error page configuration
- index_
document BucketWebsite Index Document Args - Default homepage configuration
- redirect_
all_ Bucketrequests_ to Website Redirect All Requests To Args - Rule for redirecting all requests
- routing_
rules Sequence[BucketWebsite Routing Rule Args] - 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 Property Map - Error page configuration
- index
Document Property Map - Default homepage configuration
- redirect
All Property MapRequests To - Rule for redirecting all requests
- routing
Rules 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
- Forbidden
Sub boolDir - 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 boolDir - 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_ booldir - 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 BooleanDir - 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 booleanDir - 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_ booldir - 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
- forbidden
Sub BooleanDir - 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
BucketWebsiteRoutingRule, BucketWebsiteRoutingRuleArgs
- Condition
Volcengine.
Bucket Website Routing Rule Condition - Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
- Redirect
Volcengine.
Bucket Website Routing Rule Redirect - Set redirect rule
- Condition
Bucket
Website Routing Rule Condition - Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
- Redirect
Bucket
Website Routing Rule Redirect - Set redirect rule
- condition
Bucket
Website Routing Rule Condition - Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
- redirect
Bucket
Website Routing Rule Redirect - Set redirect rule
- condition
Bucket
Website Routing Rule Condition - Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
- redirect
Bucket
Website Routing Rule Redirect - Set redirect rule
- condition
Bucket
Website Routing Rule Condition - Set the matching conditions for the redirect rule. The redirect rule only takes effect when all specified conditions are met
- redirect
Bucket
Website Routing Rule Redirect - 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
- Http
Error intCode Returned Equals - 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 stringEquals - 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 intCode Returned Equals - 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 stringEquals - 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_ numbercode_ returned_ equals - 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_ stringequals - 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 IntegerCode Returned Equals - 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 StringEquals - 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 numberCode Returned Equals - 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 stringEquals - 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_ intcode_ returned_ equals - 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_ strequals - 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 NumberCode Returned Equals - 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 StringEquals - 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
- Host
Name string - Set the redirect site name
- Http
Redirect intCode - 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 stringPrefix With - Object name prefix used for redirect
- Replace
Key stringWith - Object name used for redirect
- Host
Name string - Set the redirect site name
- Http
Redirect intCode - 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 stringPrefix With - Object name prefix used for redirect
- Replace
Key stringWith - Object name used for redirect
- host_
name string - Set the redirect site name
- http_
redirect_ numbercode - 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_ stringprefix_ with - Object name prefix used for redirect
- replace_
key_ stringwith - Object name used for redirect
- host
Name String - Set the redirect site name
- http
Redirect IntegerCode - 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 StringPrefix With - Object name prefix used for redirect
- replace
Key StringWith - Object name used for redirect
- host
Name string - Set the redirect site name
- http
Redirect numberCode - 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 stringPrefix With - Object name prefix used for redirect
- replace
Key stringWith - Object name used for redirect
- host_
name str - Set the redirect site name
- http_
redirect_ intcode - 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_ strprefix_ with - Object name prefix used for redirect
- replace_
key_ strwith - Object name used for redirect
- host
Name String - Set the redirect site name
- http
Redirect NumberCode - 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 StringPrefix With - Object name prefix used for redirect
- replace
Key StringWith - 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
volcengineccTerraform Provider.
published on Thursday, Jul 16, 2026 by Volcengine