All Products
Search
Document Center

Object Storage Service:get-bucket-referer

Last Updated:Mar 20, 2026

Retrieves the hotlink protection configuration of a bucket.

Usage notes

By default, the owner of an Alibaba Cloud account has permission to query hotlink protection configurations. To query the configuration as a RAM user or using Security Token Service (STS), the caller must have the oss:GetBucketReferer permission. For more information, see Attach a custom policy to a RAM user.

Syntax

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

Parameters

ParameterTypeRequiredDescription
--bucketstringYesThe name of the bucket whose hotlink protection configuration you want to query.

For global flags supported by all ossutil commands, see Global command-line options.

get-bucket-referer maps to the GetBucketReferer API operation. For a full description of the returned fields, see the API reference.

Examples

Query the hotlink protection configuration of examplebucket:

ossutil api get-bucket-referer --bucket examplebucket

Display the output in JSON format:

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

Display the output in YAML format:

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