Skip to main content

tcb storage

tcb storage ships two command sets: PG mode works with buckets and objects in the storage schema, classic mode works with files under the cloudPath path.

Command index​

PG mode​

CommandPurpose
tcb storage buckets listList buckets
tcb storage policies listView RLS policies of the storage schema
tcb storage objects listList objects
tcb storage objects statQuery object metadata
tcb storage objects uploadUpload an object
tcb storage objects downloadDownload an object
tcb storage objects cpCopy an object
tcb storage objects mvMove an object
tcb storage objects signGenerate a temporary download or upload URL
tcb storage objects rmDelete objects

PG mode storage commands have been available since @cloudbase/cli@3.4.0 and require a PG mode environment.

Classic mode​

CommandPurpose
tcb storage listList files
tcb storage searchSearch files
tcb storage uploadUpload a file or directory
tcb storage downloadDownload a file or directory
tcb storage cpCopy or move a file
tcb storage rmDelete files
tcb storage urlGet an access URL
tcb storage detailGet file information
tcb storage rules getGet access rules
tcb storage rules updateUpdate access rules

Notes​

  • The two command sets do not overlap, pick the page that matches the environment mode
  • PG mode object commands need -b <bucketId>, or the TCB_BUCKET_ID environment variable
  • In classic mode a path starting with / means the root directory, anything else is a relative path
  • PG mode controls access with RLS policies, classic mode with tcb storage rules; resource-level permissions use tcb permission

Deprecated​

CommandReplacement
tcb storage:uploadtcb storage upload
tcb storage:downloadtcb storage download
tcb storage:deletetcb storage rm
tcb storage:listtcb storage list
tcb storage:urltcb storage url
tcb storage:detailtcb storage detail
tcb storage get-acltcb permission
tcb storage set-acltcb permission
tcb storage:get-acltcb permission
tcb storage:set-acltcb permission