Skip to main content

tcb storage objects list

List the objects in a bucket, with prefix filtering, paging, and sorting.

v3.4.0+

PG mode storage commands have been available since @cloudbase/cli@3.4.0.

Usage​

tcb storage objects list -b <bucketId> [options]

Parameters​

ParameterRequiredDescriptionDefault
-b, --bucket <bucketId>YesBucket ID—
--prefix <prefix>NoPath prefix filter—
--limit <n>NoPage size, 1 to 1000; out of range fails with INVALID_PARAM (exit 3)20
--cursor <cursor>NoPaging cursor, taken from the previous response nextCursor—
--with-delimiterNoUse / as the folder delimiterfalse
--sort-by <column>NoSort column: name / created_at / updated_at—
--sort-order <order>NoSort direction: asc / descasc
--jsonNoOutput the raw SDK result with folders / objects / hasNext / nextCursor—

list requires a login state and fails with AUTH_FAILED otherwise.

Examples​

tcb storage objects list -b my-bucket --prefix test/
tcb storage objects list -b my-bucket --limit 50 --sort-by created_at --sort-order desc