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, AZ, 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 AvailableZone: multi-az BucketType: OBJECTObjectNumber: 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:
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 the current command. To learn the parameters that can be configured in this file, see Configuration Parameters. |
e |
Optional (additional parameter) |
Specifies the endpoint. |
i |
Optional (additional parameter) |
Specifies the user's AK. |
k |
Optional (additional parameter) |
Specifies the user's SK. |
t |
Optional (additional parameter) |
Specifies the user's security token. |
Response
Field |
Description |
---|---|
Bucket |
Bucket name |
StorageClass |
Default storage class of the bucket |
Location |
Region where the bucket resides |
ObsVersion |
Version of the bucket |
AvailableZone |
AZ where the bucket is located |
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 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot