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
| Parameter | Type | Required | Description |
|---|---|---|---|
--bucket | string | Yes | The 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 examplebucketQuery and return the results in JSON format:
ossutil api get-bucket-website --bucket examplebucket --output-format jsonQuery and return the results in YAML format:
ossutil api get-bucket-website --bucket examplebucket --output-format yamlWhat's next
To configure static website hosting for a bucket, see put-bucket-website.
For the full parameter reference of the underlying API operation, see GetBucketWebsite.