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] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- In Linux or macOS
./obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=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 Start at 2024-09-29 07:58:46.0506904 +0000 UTC Bucket: obs://bucket-test StorageClass: standard ObsVersion: 3.0 BucketType: OBJECTObjectNumber: 8005 Size: 320076506 Quota: 0
Parameter Description
Parameter | Optional or Mandatory | Description |
|---|---|---|
bucket | Mandatory | The bucket name |
acl | Optional | Queries the access control policies of the bucket while querying bucket properties. |
bf | Optional (additional parameter) | The display format of the used bucket capacity (in bytes). Possible values are:
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) | The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. |
e | Optional (additional parameter) | The endpoint |
i | Optional (additional parameter) | The user's AK |
k | Optional (additional parameter) | The user's SK |
t | Optional (additional parameter) | The user's security token |
Response
Field | Description |
|---|---|
Bucket | The bucket name |
StorageClass | The default storage class of the bucket |
Location | The region where the bucket resides |
ObsVersion | The version of the bucket |
BucketType | The type of the bucket. OBJECT indicates a bucket for object storage. POSIX indicates a bucket used as a parallel file system. |
ObjectNumber | The number of objects in the bucket |
Size | The storage usage of the bucket, in bytes |
Quota | The bucket quota. Value 0 indicates that no upper limit is set for the bucket quota. |
Acl | The access control policy of the bucket |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

