All Products
Search
Document Center

Object Storage Service:get-bucket-website

Last Updated:Mar 20, 2026

Retrieves the static website hosting status and redirection rules of a bucket.

Usage notes

By default, an Alibaba Cloud account has the permissions to call this command. To call it as a RAM user or using Security Token Service (STS), you must have the oss:GetBucketWebsite permission. For more information, see Attach a custom policy to a RAM user.

Syntax

ossutil api get-bucket-website --bucket <value> [flags]

Parameters

ParameterTypeRequiredDescription
--bucketstringYesThe name of the bucket to query.

For supported global flags, see Global command-line options.

Examples

Query the static website hosting status and redirection rules of a bucket named examplebucket:

ossutil api get-bucket-website --bucket examplebucket

Query and return the results in JSON format:

ossutil api get-bucket-website --bucket examplebucket --output-format json

Query and return the results in YAML format:

ossutil api get-bucket-website --bucket examplebucket --output-format yaml

What's next