tcb fn
Manages deployment, code, versions, and runtime configuration of cloud functions.
Command index
Function management
| Command | Purpose |
|---|---|
tcb fn list | List functions |
tcb fn detail | Show function details |
tcb fn deploy | Deploy a function, creating it on first deployment |
tcb fn code update | Update function code only |
tcb fn code download | Download function code |
tcb fn copy | Copy a function |
tcb fn delete | Delete functions |
Invocation and debugging
| Command | Purpose |
|---|---|
tcb fn run | Run a function locally |
tcb fn invoke | Invoke a deployed function |
Version releases
| Command | Purpose |
|---|---|
tcb fn list-function-versions | List published versions |
tcb fn publish-version | Publish the current $LATEST as a fixed version |
tcb fn get-route | Show traffic configuration |
tcb fn config-route | Configure traffic ratio between versions |
tcb fn delete-version | Delete a version |
Runtime configuration
| Command | Purpose |
|---|---|
tcb fn env pull | Export environment variables |
tcb fn set-provisioned-concurrency | Set provisioned concurrency |
tcb fn get-provisioned-concurrency | Show provisioned concurrency |
tcb fn delete-provisioned-concurrency | Delete 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.
| Command | Purpose |
|---|---|
tcb fn layer list | List layers or the layers bound to a function |
tcb fn layer create | Create a layer and publish a version |
tcb fn layer bind | Bind a layer to a function |
tcb fn layer unbind | Unbind a layer from a function |
tcb fn layer sort | Reorder bound layers |
tcb fn layer download | Download layer content |
tcb fn layer delete | Delete 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.
| Command | Purpose |
|---|---|
tcb fn trigger create | Create triggers from the configuration |
tcb fn trigger delete | Delete triggers |
Deprecated
| Command | Replacement |
|---|---|
tcb fn config | tcb config |
tcb fn log | tcb logs search |