All Products
Search
Document Center

Object Storage Service:get-public-access-block

Last Updated:Mar 20, 2026

Query the Block Public Access configuration of your Alibaba Cloud OSS resources at the user (account) level.

Prerequisites

Before you begin, ensure that you have:

  • ossutil installed and configured

  • The oss:GetPublicAccessBlock permission (if running as a RAM user or using Security Token Service (STS))

An Alibaba Cloud account has the oss:GetPublicAccessBlock permission by default. For RAM users and STS credentials, attach the permission to the RAM user first. See Attach a custom policy to a RAM user.

Syntax

ossutil api get-public-access-block [flags]

This command maps to the GetPublicAccessBlock API operation. For all supported global flags, see Command-line options.

Examples

Query the Block Public Access configuration

ossutil api get-public-access-block

Query in JSON format

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

Query in YAML format

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