The get-bucket-public-access-block command is used to query the Block Public Access configurations of a bucket.
Usage notes
By default, an Alibaba Cloud account has the permission to query the Block Public Access configurations of a bucket. Making query requests as a RAM user or by using Security Token Service (STS) requires oss:GetBucketPublicAccessBlock permission. For more information, see Grant a custom policy.
Command syntax
ossutil api get-bucket-public-access-block --bucket value [flags]
|
Parameter |
Type |
Description |
|
--bucket |
string |
Name of the bucket. |
-
The get-bucket-public-access-block command corresponds to the GetBucketPublicAccessBlock operation. For more information about the parameters within, see GetBucketPublicAccessBlock.
-
For more information about supported global command-line options, see Command-line options.
Examples
-
Query the Block Public Access configurations of
examplebucket.ossutil api get-bucket-public-access-block --bucket examplebucket -
Query the Block Public Access configurations of
examplebucketand display the configurations in the JSON format.ossutil api get-bucket-public-access-block --bucket examplebucket --output-format json -
Query the Block Public Access configurations of
examplebucketand display the configurations in the YAML format.ossutil api get-bucket-public-access-block --bucket examplebucket --output-format yaml