跳到主要内容

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