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
| Parameter | Required | Description | Default |
|---|---|---|---|
-b, --bucket <bucketId> | Yes | Bucket ID | — |
--prefix <prefix> | No | Path prefix filter | — |
--limit <n> | No | Page size, 1 to 1000; out of range fails with INVALID_PARAM (exit 3) | 20 |
--cursor <cursor> | No | Paging cursor, taken from the previous response nextCursor | — |
--with-delimiter | No | Use / as the folder delimiter | false |
--sort-by <column> | No | Sort column: name / created_at / updated_at | — |
--sort-order <order> | No | Sort direction: asc / desc | asc |
--json | No | Output 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