tcb storage objects stat
查询对象的元信息。
v3.4.0+
PG 模式存储命令自 @cloudbase/cli@3.4.0 起提供。
语法
tcb storage objects stat <key> -b <bucketId> [options]
参数
| 参数 | 必填 | 说明 | 默认值 |
|---|---|---|---|
<key> | 是 | 对象名 | — |
-b, --bucket <bucketId> | 是 | Bucket ID | — |
-m, --method <method> | 否 | GET / HEAD;HEAD 仅认证路径支持 | GET |
--json | 否 | 输出 { status, headers, body },body 即 IObjectInfoHttpPayload | — |
表格输出按以下字段顺序展示:id / name / bucket_id / version / size / content_type / cache_control / etag / last_modified / created_at / metadata。
示例
tcb storage objects stat test/hello.txt -b my-bucket
tcb storage objects stat test/hello.txt -b my-bucket --json