Skip to main content

tcb fn

Manages deployment, code, versions, and runtime configuration of cloud functions.

Command index​

Function management​

CommandPurpose
tcb fn listList functions
tcb fn detailShow function details
tcb fn deployDeploy a function, creating it on first deployment
tcb fn code updateUpdate function code only
tcb fn code downloadDownload function code
tcb fn copyCopy a function
tcb fn deleteDelete functions

Invocation and debugging​

CommandPurpose
tcb fn runRun a function locally
tcb fn invokeInvoke a deployed function

Version releases​

CommandPurpose
tcb fn list-function-versionsList published versions
tcb fn publish-versionPublish the current $LATEST as a fixed version
tcb fn get-routeShow traffic configuration
tcb fn config-routeConfigure traffic ratio between versions
tcb fn delete-versionDelete a version

Runtime configuration​

CommandPurpose
tcb fn env pullExport environment variables
tcb fn set-provisioned-concurrencySet provisioned concurrency
tcb fn get-provisioned-concurrencyShow provisioned concurrency
tcb fn delete-provisioned-concurrencyDelete provisioned concurrency

For configuration fields, see Function Configuration.

Function layers​

A layer packages shared dependencies or code once and mounts it to several functions, avoiding repeated uploads and keeping function packages small.

CommandPurpose
tcb fn layer listList layers or the layers bound to a function
tcb fn layer createCreate a layer and publish a version
tcb fn layer bindBind a layer to a function
tcb fn layer unbindUnbind a layer from a function
tcb fn layer sortReorder bound layers
tcb fn layer downloadDownload layer content
tcb fn layer deleteDelete a layer
Layer limits
  • Up to 20 layers per user
  • Up to 5 layers per function
  • 100 MB or less recommended per layer
  • Layer versions are immutable, publish a new version to update content

Triggers​

Triggers are declared in the function configuration of cloudbaserc.json, see Function Configuration · Triggers for the fields.

CommandPurpose
tcb fn trigger createCreate triggers from the configuration
tcb fn trigger deleteDelete triggers

Deprecated​

CommandReplacement
tcb fn configtcb config
tcb fn logtcb logs search