Update function
update_functionUpdate a VPSnet Firecracker Function's code or configuration by replacing provided fields, including runtime, resources, environment, and webhook settings; call get_function first.
Instructions
Update a Firecracker Function's code or configuration. This replaces submitted fields and can change or disable a public webhook. Call get_function first. If integrity.unreadable_fields names code or environment, the backend refuses the update unless the user explicitly approves replacing every unavailable value from a trusted copy and acknowledge_unreadable_replacement=true is passed. Leave that flag false for ordinary updates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Function source code | |
| name | No | Function name | |
| vcpus | No | 1-8 vCPUs, default 1 | |
| enabled | No | Whether the function can be invoked | |
| memory_mb | No | 64-8192 MB, default 256 | |
| entrypoint | No | Entrypoint command/handler | |
| description | No | Description (max 2000 chars) | |
| environment | No | Environment variables as JSON object string. Omit during unrelated edits to preserve existing values; never send back redacted placeholders. | |
| function_id | Yes | Function ID from list_functions | |
| runtime_os_id | No | Runtime OS ID (see list_functions response for available runtimes) | |
| timeout_seconds | No | 1-300 seconds, default 30 | |
| webhook_enabled | No | Expose a public webhook URL for this function | |
| private_network_id | No | Private network ID from list_functions privateNetworking discovery. Omit to preserve an existing binding during update; null detaches it. Backend validates ownership and availability. | |
| rotate_webhook_secret | No | Rotate the webhook secret | |
| acknowledge_unreadable_replacement | No | Explicit customer approval to replace code or environment named by integrity.unreadable_fields; default false |