Updated on 2022-05-18 GMT+08:00

Querying Bucket Properties

Function

You can use this command to query the basic properties of a bucket, including its default storage class, region, version ID, storage usage, bucket quota, whether it supports POSIX, and the number of objects in the bucket.

Command Line Structure

  • In Windows
    obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] 
  • In Linux or macOS
    ./obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] 

Examples

  • Take the Windows OS as an example. Run the obsutil stat obs://bucket-test command to query the basic properties of bucket bucket-test.
    obsutil stat obs://bucket-test
    
    Bucket:
      obs://bucket-test
    StorageClass:
      standard
    Location:
       ae-ad-1
    ObsVersion:
      3.0
    FSStatus:
      disabled
    ObjectNumber:
      8005
    Size:
      320076506
    Quota:
      0

Parameter Description

Parameter

Optional or Mandatory

Description

bucket

Mandatory

Bucket name

acl

Optional

Queries the access control policies of the bucket while querying bucket properties.

bf

Optional (additional parameter)

Display format of the used bucket capacity (in bytes) Possible values are:

  • human-readable
  • raw
NOTE:

If this parameter is not configured, the display format of the used bucket capacity (in bytes) is determined by the humanReadableFormat parameter in the configuration file.

config

Optional (additional parameter)

User-defined configuration file for executing a command. For details about parameters that can be configured, see Parameter Description.

Response

Field

Description

Bucket

Bucket name

StorageClass

Default storage class of the bucket

Location

Region where the bucket resides

ObsVersion

Version of the bucket

BucketType

Type of a bucket. OBJECT indicates a bucket for object storage. POSIX indicates a bucket used as a parallel file system.

ObjectNumber

Number of objects in the bucket

Size

Storage usage of the bucket, in bytes

Quota

Bucket quota. Value 0 indicates that no upper limit is set for the bucket quota.

Acl

Access control policy of the bucket