get-bucket-referer
Queries the hotlink protection configurations of a bucket.
Usage notes
By default, an Alibaba Cloud account has the permissions to query the hotlink protection configurations of a bucket. If you want to query the hotlink protection configurations of a bucket by using a RAM user or Security Token Service (STS), you must have the oss:GetBucketReferer permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-referer --bucket value [flags]
|
Parameter |
Type |
Description |
|
--bucket |
string |
The name of the bucket whose hotlink protection configurations you want to query. |
-
The get-bucket-referer command corresponds to the GetBucketReferer operation. For more information about the parameters in the GetBucketReferer operation, see GetBucketReferer.
-
For more information about supported global command-line options, see Global command-line options.
Examples
-
Run the following command to query the hotlink protection configurations of a bucket named examplebucket:
ossutil api get-bucket-referer --bucket examplebucket -
Run the following command to query the hotlink protection configurations of a bucket named examplebucket and display the query results in the JSON format:
ossutil api get-bucket-referer --bucket examplebucket --output-format json -
Run the following command to query the hotlink protection configurations of a bucket named examplebucket and display the query results in the YAML format:
ossutil api get-bucket-referer --bucket examplebucket --output-format yaml