All Products
Search
Document Center

Object Storage Service:get-public-access-block

Last Updated:Nov 14, 2024

The get-public-access-block command is used to query the Block Public Access configurations of OSS resources on a user level.

Usage notes

By default, an Alibaba Cloud account has the permissions to query the Block Public Access configurations of OSS resources on a user level. Making query requests as a RAM user or by using Security Token Service (STS) requires oss:GetPublicAccessBlock permission. For more information, see Attach a custom policy to a RAM user.

Command syntax

ossutil api get-public-access-block [flags]
Note
  • The get-public-access-block command corresponds to the GetPublicAccessBlock operation. For more information about the parameters within, see GetPublicAccessBlock.

  • For more information about supported global command-line options, see Command-line options.

Examples

  • Query the Block Public Access configurations of OSS resources.

    ossutil api get-public-access-block
  • Query the Block Public Access configurations of OSS resources and display the configurations in the JSON format.

    ossutil api get-public-access-block --output-format json
  • Query the Block Public Access configurations of OSS resources and display the configurations in the YAML format.

    ossutil api get-public-access-block --output-format yaml