# Function, Revision and Invocation spec and handler API

URL: /docs/develop/workloads/function/spec

Every field of Function, Revision and Invocation, then the methods a handler calls on ctx.

This page lists the spec and status fields of Function, Revision and Invocation, each with its type, its limits and its description. The [Platform page](/docs/platform/workloads/function.md) explains the concept, and the `metadata` of every kind is [the same](/docs/develop/common-definitions.md#objectmeta).

## Function [#function]

```yaml
apiVersion: funcd.io/v1alpha1
kind: Function
metadata:
  name: pdf-render
  namespace: default
  resourceGroup: rg1
spec:
  runtime: nodejs22
  handler: handle
  image: registry.example.com/pdf-render:1.0.0
  scaling:
    idleTimeout: 5m
```

| apiVersion | kind |
| --- | --- |
| `funcd.io/v1alpha1` | `Function` |

### `Function.spec` [#functionspec]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`Function.spec.bindings`](#functionspecbindings) | What the code may use: KV tables, Bucket prefixes, SQL databases, Lakes and other Functions, each under an alias, and ConfigMaps and Secrets. A binding is the grant: a call on an alias with no binding is refused with 403. Each store, Lake, ConfigMap and Secret it names must be declared at the root, in this spec's kv, buckets, sql, lakes, configMaps or secrets, or in the App's for an App's part. |
| `buckets` | array of [`Function.spec.buckets[]`](#functionspecbuckets) | The Buckets the Function declares: by name it creates and owns one, and a Bucket of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.blob binds only a declared Bucket, and a prefix with no owner gets the Function as its owner. An App's part declares none and binds those that the App declares. |
| `configMaps` | array of [`Function.spec.configMaps[]`](#functionspecconfigmaps) | The ConfigMaps the Function declares: by name it defines one from its data, which goes with the Function, by ref it uses an existing one. spec.bindings.config binds only a declared ConfigMap, and a defined one that the spec no longer defines is deleted once the Function is Ready again and nothing else names it. An App's part declares none. |
| `handler` | string, matching `^[A-Za-z_][A-Za-z0-9_.]*$` | The name of the export that the shim calls in the code, such as handle. A Function without one, or whose code has no such export, fails with ShapeInvalid. |
| `image` | string | The OCI reference of the code's artifact: a registry reference with a tag or a digest, or an oci-layout:// reference to a layout on the server's disk. A Function whose image is missing, or cannot be resolved or pulled, starts no worker. |
| `imageDigest` | string, a sha256 digest | The sha256 digest that funcd pulls the image by and checks it against. Unset, funcd resolves the image to its digest when it creates the Revision of a new spec and keeps that digest, so a tag that moves later changes nothing. |
| `ingress` | object, [`Function.spec.ingress`](#functionspecingress) | The Function's own address at the edge. With no host and no path, it answers by name at /function/&lt;name&gt;; a host or a path gives it a Route of its own in place of that address, which its IngressReady condition reports. Its path may not be /function or under it. |
| `kv` | array of [`Function.spec.kv[]`](#functionspeckv) | The KVStores the Function declares: by name it creates and owns one, and a store of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.kv binds only a declared store. An App's part declares none and binds those that the App declares. |
| `lakes` | array of [`Function.spec.lakes[]`](#functionspeclakes) | The Lakes the Function declares: by name it creates one that goes with the Function, by ref it uses an existing one. spec.bindings.lake binds only a declared Lake, and a Lake declared by name declares nothing at its own root: it binds the Function's buckets, configMaps and secrets. An App's part declares none. |
| `pooling` | object, [`Function.spec.pooling`](#functionspecpooling) | Whether the Function shares a worker with other Functions; unset, it runs in workers of its own. |
| `protocol` | string, one of `""`, `cloudevent`, `http` | How funcd calls the code. cloudevent, the default, passes each call to the handler as a CloudEvent. http passes each edge request to the handler, an http(app) export: only the edge and another Function's ctx.fetch over a link reach it, and it needs a node runtime and no pooling.worker. |
| `replicas` | integer, 0 to 15 | How many workers run while the Function is awake: at least 1 once a call wakes it, and at least scaling.minReplicas. Every call goes to the lowest listening replica, and the others are spares. With minReplicas 0, replicas above 0 also starts workers before the first call, but not after a sleep. A local volume allows at most 1. |
| `resources` | object, [`Function.spec.resources`](#functionspecresources) | The CPU and memory caps of each of the Function's workers; a field left empty takes functions.defaultResources. Only the containerd runtime enforces them, and they cannot be set with pooling.worker. |
| `runtime` | string, a DNS-1123 label | The runtime that runs the code, such as nodejs22 or python314, or one that an Addon ships for Functions. A Function without one fails with ShapeInvalid, and one whose runtime this node cannot run fails with RuntimeUnavailable. |
| `scaling` | object, [`Function.spec.scaling`](#functionspecscaling) | Scale to zero: with minReplicas 0, the default, and an idleTimeout, a Function with no traffic goes Idle and its workers stop until the next call wakes it. |
| `secrets` | array of [`Function.spec.secrets[]`](#functionspecsecrets) | The Secrets of the namespace that the bindings may name, each with the keys the code reads; spec.bindings.secret names only a declared Secret. The Function waits in Pending, with SecretNotFound or SecretKeyMissing, until each one exists with every declared key. An App's part declares none and binds those that the App declares. |
| `sql` | array of [`Function.spec.sql[]`](#functionspecsql) | The SQLDatabases the Function declares: by name it creates and owns one, and a database of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.sql binds only a declared database, and a database with no owner gets the Function as its owner. An App's part declares none and binds those that the App declares. |
| `timeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | Bounds an external invoke until its response starts: 0s to 1h; 0s or unset means invoke.defaultTimeout. |
| `volumes` | array of [`Function.spec.volumes[]`](#functionspecvolumes) | The directories the Function's workers mount. Apply refuses a Function with one unless runtime.mode is containerd and volumes.capacity or volumes.capacityBytes is set. A Function with a volume runs solo, even with pooling.worker. |

### `Function.spec.bindings` [#functionspecbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `addon` | array of [`Function.spec.bindings.addon[]`](#functionspecbindingsaddon) | The add-on objects whose engines the code calls, each under its alias: through ctx.addon.fetch, or with any HTTP client at FUNCD_ADDON\_&lt;ALIAS&gt;\_URL with the header X-Funcd-Addon-Token set to FUNCD_ADDON\_&lt;ALIAS&gt;\_TOKEN. Each call goes through funcd, which asks Cedar for addon::call and serves only the paths that the object's edge entry serves. |
| `blob` | array of [`Function.spec.bindings.blob[]`](#functionspecbindingsblob) | The Bucket prefixes the code reaches through ctx.blob, and over S3 while the S3 gateway is on, each under its alias. The binding grants reads; only the prefix's owner and the writers that a RolesAssignment names may write. A Bucket or prefix that does not exist yet holds the Function in Pending with BucketNotFound. |
| `config` | array of string values, each a DNS-1123 label | ConfigMaps whose keys each worker gets as environment variables when it starts, a later ConfigMap's value winning for a key that both hold. A key that starts with FUNCD\_, or that a bound Secret holds, is left out; and while the S3 gateway is on, a Function that binds a Bucket gets the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY that funcd issues it, in place of a ConfigMap's. A missing ConfigMap holds the Function Failed with ConfigResolveFailed. |
| `job` | array of [`Function.spec.bindings.job[]`](#functionspecbindingsjob) | The Jobs whose runs the code starts with ctx.job.start and reads with ctx.job.get, each under its alias. The binding grants both, and a namespace Policy that forbids job::start or job::read to the Function revokes one. A run that the code starts passes the checks of a run that a person starts, and a Job's own spec refuses this list. |
| `kv` | array of [`Function.spec.bindings.kv[]`](#functionspecbindingskv) | The KV tables the code reaches through ctx.kv, each under its alias. The binding grants reads; only the table's owner and the writers that a RolesAssignment names may write. A store or table that does not exist yet holds the Function in Pending with KVStoreNotFound. |
| `lake` | array of [`Function.spec.bindings.lake[]`](#functionspecbindingslake) | The Lakes the code queries, each under its alias. The Function waits in Pending with LakeNotReady until every bound Lake is Ready. |
| `links` | array of [`Function.spec.bindings.links[]`](#functionspecbindingslinks) | The Functions the code calls, each under its alias: through ctx.invoke one whose protocol is cloudevent, through ctx.fetch one whose protocol is http. Each target must exist in the namespace when this Function is applied, the namespace's links form no cycle, and a Function that a link targets cannot be deleted until the link goes. |
| `secret` | array of string values, each a DNS-1123 label | Secrets whose keys the code reads through ctx.secret, on each read and with no cache, a later Secret's value winning for a key that both hold. No value reaches the worker's environment. No worker starts while a bound Secret is missing, and a worker whose Function a Policy forbids to read one is not ready. |
| `sql` | array of [`Function.spec.bindings.sql[]`](#functionspecbindingssql) | The SQLDatabases the code queries through ctx.sql, each under its alias. The binding grants reads; only the database's owner and the writers that a RolesAssignment names may write. A database that does not exist yet holds the Function in Pending with SQLDatabaseNotFound. |

### `Function.spec.bindings.addon[]` [#functionspecbindingsaddon]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The name the handler calls the object by: ctx.addon.fetch takes it, and the worker gets FUNCD_ADDON\_&lt;ALIAS&gt;\_URL and FUNCD_ADDON\_&lt;ALIAS&gt;\_TOKEN for an HTTP SDK. Unique in the list. |
| `object` | string, required, a DNS-1123 label | An add-on object of the Function's namespace, declared by its App when an App holds the Function. A missing one holds the Function in Pending with AddonObjectNotFound. |

### `Function.spec.bindings.blob[]` [#functionspecbindingsblob]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it. |
| `bucket` | string, required, a DNS-1123 label | The Bucket, in the same namespace, that holds the prefix. |
| `prefix` | string, required, a DNS-1123 label | The prefix, by its name in the Bucket's prefixes. |

### `Function.spec.bindings.job[]` [#functionspecbindingsjob]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The name that the code passes to ctx.job.start and ctx.job.get. Unique in the list. |
| `job` | string, required, a DNS-1123 label | A Job of the Function's namespace. While the Job is missing, a start on its alias answers 404, and a read still answers each run that a deleted Job left, until job.retention removes it. |

### `Function.spec.bindings.kv[]` [#functionspecbindingskv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list, which the code passes to ctx.kv. |
| `store` | string, required, a DNS-1123 label | The KVStore, in the same namespace, that holds the table. |
| `table` | string, required, a DNS-1123 label | The table, by its name in the store's tables. |

### `Function.spec.bindings.lake[]` [#functionspecbindingslake]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list. Each worker reads the Lake's address and its token from FUNCD_LAKE\_&lt;ALIAS&gt;\_URL and FUNCD_LAKE\_&lt;ALIAS&gt;\_TOKEN, the alias upper-cased. |
| `lake` | string, required, a DNS-1123 label | The Lake to query, in the same namespace. |

### `Function.spec.bindings.links[]` [#functionspecbindingslinks]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The link's name, unique in the list, which the code passes to ctx.invoke or ctx.fetch. |
| `target` | string, required, a DNS-1123 label | The Function to call, in the same namespace. |
| `timeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | Bounds the synchronous call, a cold-start wake included: 0s to 5m; 0s or unset means the 30s link default. |

### `Function.spec.bindings.sql[]` [#functionspecbindingssql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list, which the code passes to ctx.sql. |
| `database` | string, required, a DNS-1123 label | The SQLDatabase to query, in the same namespace. |

### `Function.spec.buckets[]` [#functionspecbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`Function.spec.buckets[].prefixes[]`](#functionspecbucketsprefixes) | The Bucket's prefixes, each a key space with its own owner and cap. Prefix names are unique within the Bucket. A Function or a Lake that binds a prefix the Bucket does not list waits, with the reason BucketNotFound. |
| `quota` | object, [`Function.spec.buckets[].quota`](#functionspecbucketsquota) | Caps on the Bucket's total size and on each object. While the Bucket has a size cap, funcd refuses to sign a presigned PUT URL for it, with 403. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `Function.spec.buckets[].prefixes[]` [#functionspecbucketsprefixes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `name` | string, required, a DNS-1123 label | The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key. |
| `owner` | object, [`Function.spec.buckets[].prefixes[].owner`](#functionspecbucketsprefixesowner) | The one Function, Lake or Job that may write the prefix, named with its kind, besides the writers that a RolesAssignment names. In a Bucket that a Function, a Lake or a Job declares by name, an omitted owner is that workload. In a Workflow's buckets, a Function owner names a step and a Lake owner a lake that the Workflow declares. The prefix that a Site serves its bundle from must have no owner, since the Site writes its builds there; the prefixes of a Site's ingress rules may have one. |
| `quota` | object, [`Function.spec.buckets[].prefixes[].quota`](#functionspecbucketsprefixesquota) | A cap on the prefix's total size: a write into the prefix must fit both this cap and the Bucket's, and while it is set funcd refuses to sign a presigned PUT URL into the prefix, with 403. It also caps a Lake's files under the prefix, though not the Lake's catalog. |

### `Function.spec.buckets[].prefixes[].owner` [#functionspecbucketsprefixesowner]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required, one of `Function`, `Lake`, `Job` | The workload's kind. A Function, a Lake and a Job may share a name, so the kind says which one it is; each field names the kinds it accepts. |
| `name` | string, required, a DNS-1123 label | The workload's name, in the object's namespace. |

### `Function.spec.buckets[].prefixes[].quota` [#functionspecbucketsprefixesquota]

| Field | Type and limits | Description |
| --- | --- | --- |
| `maxBytes` | integer, at least 0 | The same cap as a number of bytes. Set maxSize or maxBytes, not both. |
| `maxSize` | string, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB) | The cap on the total size held, above zero. Set maxSize or maxBytes, not both; neither means no cap. A write that would pass the cap gets 507 in a KV store or a Bucket; a SQL execute call gets 507 once the database holds the cap. |

### `Function.spec.buckets[].quota` [#functionspecbucketsquota]

| Field | Type and limits | Description |
| --- | --- | --- |
| `maxBytes` | integer, at least 0 | The same cap as a number of bytes. Set maxSize or maxBytes, not both. |
| `maxObjectBytes` | integer, at least 0 | The largest object a write may store, in bytes. A larger write gets 413, or EntityTooLarge over S3, and while it is set funcd refuses to sign a presigned PUT URL for the Bucket, with 403. 0 sets no cap of the Bucket's own, so only funcd's upload limits apply, such as s3gateway.maxUploadBytes. |
| `maxSize` | string, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB) | The cap on the total size held, above zero. Set maxSize or maxBytes, not both; neither means no cap. A write that would pass the cap gets 507 in a KV store or a Bucket; a SQL execute call gets 507 once the database holds the cap. |

### `Function.spec.configMaps[]` [#functionspecconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys and their string values, for settings that are not secret. Each key is an environment variable name: ASCII letters, digits and \_, not starting with a digit. Each value must be UTF-8 text with no NUL byte: a Function or a Lake that binds a ConfigMap holding another value does not start. Each worker of a Function that lists the ConfigMap in bindings.config gets each key as an environment variable when it starts, except a key that starts with FUNCD\_ or that a bound Secret also holds; and while the S3 gateway is on, a Function that binds a Bucket gets the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY that funcd issues it, in place of the ConfigMap's. A Lake that lists it gives its engine only the keys that the Lake's bindings.config lets through. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `Function.spec.ingress` [#functionspecingress]

| Field | Type and limits | Description |
| --- | --- | --- |
| `auth` | object, [`Function.spec.ingress.auth`](#functionspecingressauth) | How the edge checks callers at the resource's own address; unset, the namespace's spec.edgeDefaults.auth decides, else open. A Lake refuses it, since the Lake gateway checks each caller. |
| `enabled` | boolean | Turns the resource's own address on or off. Unset, it is on unless the namespace's spec.defaultExposure is explicit; a Lake's address is on only when this is true. |
| `host` | string | The exact host of the resource's own address. Empty is the namespace's host, &lt;namespace&gt;.&lt;server.baseDomain&gt;, or, in the default namespace, any host that no other namespace reserves. |
| `path` | string | The edge path of the resource's own address, which begins with / and does not end with / unless it is /. Empty is / when host is set, else /function/&lt;name&gt;, /site/&lt;name&gt; or /lake/&lt;name&gt; by kind. |

### `Function.spec.ingress.auth` [#functionspecingressauth]

| Field | Type and limits | Description |
| --- | --- | --- |
| `mode` | string, one of `""`, `authenticated`, `open`, `oidc` | How the edge checks callers. authenticated requires a bearer token, or an X-Api-Key header, of an identity that RBAC lets get Functions in the namespace: 401 without a valid one, 403 when it may not; while server.auth.edge is off, every caller gets 401. open lets anonymous callers in. oidc signs callers in with the OIDCProvider that provider names, and passes the signed-in user to the code behind it in the X-Funcd-Principal headers. Empty takes the enclosing stance, if any, else the namespace's spec.edgeDefaults.auth.mode, else open. |
| `provider` | string, a DNS-1123 label | With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode. |
| `unauthenticated` | string, one of `""`, `redirect`, `401`, `allow` | With mode oidc, what a call that is not signed in gets: redirect, the default, sends a GET or HEAD navigation to the provider with 302 and gives any other call 401; 401 gives every such call 401; allow passes every call, with no principal. Refused with another mode. |

### `Function.spec.kv[]` [#functionspeckv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `quota` | object, [`Function.spec.kv[].quota`](#functionspeckvquota) | Caps on the store's total size, on each value and on each key. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `tables` | array of [`Function.spec.kv[].tables[]`](#functionspeckvtables) | The store's tables. A table is a key space that only its owner and the writers that a RolesAssignment names may write. Table names are unique within the store, and a store with no table has nothing a Function can write. |

### `Function.spec.kv[].quota` [#functionspeckvquota]

| Field | Type and limits | Description |
| --- | --- | --- |
| `maxBytes` | integer, at least 0 | The same cap as a number of bytes. Set maxSize or maxBytes, not both. |
| `maxKeyBytes` | integer, 0 to 64000 | The longest key, in bytes. 0 means 1024 (1 KiB). |
| `maxSize` | string, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB) | The cap on the total size held, above zero. Set maxSize or maxBytes, not both; neither means no cap. A write that would pass the cap gets 507 in a KV store or a Bucket; a SQL execute call gets 507 once the database holds the cap. |
| `maxValueBytes` | integer, 0 to 1048576 | The largest value a write may store, in bytes. 0 means 1048576 (1 MiB). |

### `Function.spec.kv[].tables[]` [#functionspeckvtables]

| Field | Type and limits | Description |
| --- | --- | --- |
| `name` | string, required, a DNS-1123 label | The table's name, unique within the store. |
| `owner` | object, [`Function.spec.buckets[].prefixes[].owner`](#functionspecbucketsprefixesowner) | The Function or Job that owns the table, in the store's namespace, named with its kind. The owner writes the table, and so does a principal that a RolesAssignment grants kv::write on the table, its store or its namespace, such as the KV Data Writer role. In a store that a Function or a Job declares, the owner defaults to that workload; in one that a Workflow declares, a Function owner names a step, and the Function that funcd creates for that step is the owner; in a KVStore applied on its own, a table with no owner is written only through such a grant. Every workload, the owner included, reaches the table through an entry of its spec.bindings.kv. |

### `Function.spec.lakes[]` [#functionspeclakes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`Function.spec.lakes[].bindings`](#functionspeclakesbindings) | What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment. |
| `buckets` | array of [`Function.spec.lakes[].buckets[]`](#functionspeclakesbuckets) | The Buckets that a Lake applied on its own declares: by name the Lake creates the Bucket, an omitted prefix owner being the Lake, and a Bucket of that name that is not the Lake's holds it in Pending with StoreNotOwned; by ref it binds an existing one. Each Bucket that the Lake's bindings.blob names must be declared here. A lake that another resource declares sets none. |
| `configMaps` | array of [`Function.spec.lakes[].configMaps[]`](#functionspeclakesconfigmaps) | The ConfigMaps that a Lake applied on its own declares: by name the Lake defines one, and a ConfigMap of its stored name that is not the Lake's holds it in Pending with StoreNotOwned; by ref it binds an existing one. Each ConfigMap that the Lake's bindings.config names must be declared here. A lake that another resource declares sets none. |
| `ingress` | object, [`Function.spec.ingress`](#functionspecingress) | Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/&lt;name&gt;, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself. |
| `location` | object, [`Function.spec.lakes[].location`](#functionspeclakeslocation) | The Bucket prefix that holds the Lake's files, one of the Lake's bindings.blob. The Lake waits in Pending, with the reason PrefixNotOwned, until the prefix's owner is this Lake. The Lake's catalog is kept outside the Bucket, under the same location, so a Lake located where another was finds that Lake's files and catalog. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`Function.spec.resources`](#functionspecresources) | The cpu and memory of the Lake's engine. An empty cpu or memory sets no limit on it, and a change replaces the running engine. |
| `secrets` | array of [`Function.spec.lakes[].secrets[]`](#functionspeclakessecrets) | The Secrets that a Lake applied on its own declares, with the keys its engine reads. Each Secret that the Lake's bindings.secret names must be declared here, and the Lake waits in Pending, with SecretNotFound or SecretKeyMissing, while one is missing or lacks a key. A lake that another resource declares sets none. |

### `Function.spec.lakes[].bindings` [#functionspeclakesbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `blob` | array of [`Function.spec.bindings.blob[]`](#functionspecbindingsblob), required | The Bucket prefixes the engine may read, each under an alias. It writes only a prefix whose owner is this Lake, and the Lake's location must be one of them. |
| `config` | array of string values, each a DNS-1123 label | ConfigMaps whose data the engine gets as environment variables. Only QUACK_TOKEN and the DUCKDB\_ keys pass, DUCKDB_EXTENSION_DIRECTORY excepted, and a bound Secret's value wins over a ConfigMap's for the same key. A missing ConfigMap holds the Lake in Pending, with the reason BindingResolveFailed. |
| `secret` | array of string values, each a DNS-1123 label | Secrets whose data the engine gets as environment variables, such as its QUACK_TOKEN; the same keys pass as for config. funcd asks Cedar, as the Lake, for secret::read on each: a forbidden Secret holds the Lake in Pending, with the reason BindingResolveFailed, as does a missing one in a lake that another resource declares. A changed value replaces the engine. |

### `Function.spec.lakes[].buckets[]` [#functionspeclakesbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`Function.spec.buckets[].prefixes[]`](#functionspecbucketsprefixes) | The Bucket's prefixes, each a key space with its own owner and cap. Prefix names are unique within the Bucket. A Function or a Lake that binds a prefix the Bucket does not list waits, with the reason BucketNotFound. |
| `quota` | object, [`Function.spec.buckets[].quota`](#functionspecbucketsquota) | Caps on the Bucket's total size and on each object. While the Bucket has a size cap, funcd refuses to sign a presigned PUT URL for it, with 403. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `Function.spec.lakes[].configMaps[]` [#functionspeclakesconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys and their string values, for settings that are not secret. Each key is an environment variable name: ASCII letters, digits and \_, not starting with a digit. Each value must be UTF-8 text with no NUL byte: a Function or a Lake that binds a ConfigMap holding another value does not start. Each worker of a Function that lists the ConfigMap in bindings.config gets each key as an environment variable when it starts, except a key that starts with FUNCD\_ or that a bound Secret also holds; and while the S3 gateway is on, a Function that binds a Bucket gets the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY that funcd issues it, in place of the ConfigMap's. A Lake that lists it gives its engine only the keys that the Lake's bindings.config lets through. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `Function.spec.lakes[].location` [#functionspeclakeslocation]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bucket` | string, required, a DNS-1123 label | A Bucket of the same namespace. |
| `prefix` | string, required, a DNS-1123 label | A prefix of that Bucket. |

### `Function.spec.lakes[].secrets[]` [#functionspeclakessecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array of string values, required, each matching `^[A-Za-z_][A-Za-z0-9_]*$` | The keys read from the Secret: its data must hold each of them. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `Function.spec.pooling` [#functionspecpooling]

| Field | Type and limits | Description |
| --- | --- | --- |
| `worker` | string | A worker id, a DNS-1123 label: Functions of the namespace that name it, run the same runtime, are in the same resource group and have the same bindings, owned data and grants share one worker, which status.pool names. Empty, the default, runs the Function solo. Only the process runtime pools, for node runtimes and, when the server's Python is 3.14 or later, python ones; anywhere else the Function runs solo too. A pool takes the first 16 Functions by name, and the others wait in Pending with PoolFull. |

### `Function.spec.resources` [#functionspecresources]

| Field | Type and limits | Description |
| --- | --- | --- |
| `cpu` | string | The CPU cap of the worker or engine it sizes, as a number of cores of at least 0.01, such as 0.5 or 2. Empty takes the default of the resource that declares it, or no cap when there is none. Only the containerd runtime enforces it. |
| `memory` | string | The memory cap of the worker or engine it sizes, such as 256Mi or 4GiB: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B, above zero. Empty takes the default of the resource that declares it, or no cap when there is none. Only the containerd runtime enforces it, and there a worker that uses more memory than the cap is killed. |

### `Function.spec.scaling` [#functionspecscaling]

| Field | Type and limits | Description |
| --- | --- | --- |
| `idleTimeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | The idle time before a worker is reclaimed: 0s to 24h; 0s or unset disables reclaim. |
| `maxReplicas` | integer, 0 to 15 | Above 0, the most that minReplicas may be; 0, the default, sets no bound. It starts no worker: replicas and minReplicas alone decide how many run. |
| `minReplicas` | integer, 0 to 15 | The fewest workers the Function keeps. 0, the default, lets idleTimeout scale it to zero; above 0, it never sleeps. It may not exceed maxReplicas when that is above 0, and a local volume allows at most 1. |

### `Function.spec.secrets[]` [#functionspecsecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array of string values, required, each matching `^[A-Za-z_][A-Za-z0-9_]*$` | The keys read from the Secret: its data must hold each of them. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `Function.spec.sql[]` [#functionspecsql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `owner` | object, [`Function.spec.buckets[].prefixes[].owner`](#functionspecbucketsprefixesowner) | The one Function, Lake or Job that may write the database, in its namespace, named with its kind, besides the writers that a RolesAssignment names. In a database that a Function or a Job declares by name, it defaults to that workload, and in a Workflow's sql a Function owner names a step and a Lake owner a lake that the Workflow declares. A Lake writes no SQL, so a database a Lake owns is written by those writers only. With no owner, only those writers can write it. |
| `quota` | object, [`Function.spec.buckets[].prefixes[].quota`](#functionspecbucketsprefixesquota) | A cap on the database's total size, the bytes of its pages in use. Once it is reached, an execute gets 507 unless each of its statements is a DELETE or a DROP. A change keeps the engine running. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`Function.spec.resources`](#functionspecresources) | The cpu and memory of the database's engine. An empty memory means 256Mi, and an empty cpu sets no cpu limit. A change replaces the running engine. |

### `Function.spec.volumes[]` [#functionspecvolumes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | Only for a local volume declared by name: retain, the default, keeps the volume and its files with no owner when the Function drops it or is deleted, so that a ref can take it again; delete removes them. |
| `name` | string, a DNS-1123 label | The volume's name, unique in the list; set name or ref, not both. The code reads the directory's path from FUNCD_VOLUME\_&lt;NAME&gt;, the name or ref upper-cased. |
| `ref` | string, a DNS-1123 label | Instead of name: a retained local volume that this Function, or an earlier Function of the same name, dropped with retain, and that the Function takes over; with no such volume, it waits in Pending with VolumeNotFound. Only a local volume takes a ref; it sets no deletion and states the retained volume's own size, since apply refuses another size. |
| `size` | string, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB) | The volume's size, the most its directory may hold, above zero; set size or sizeBytes, not both. Apply refuses a local volume whose size changes, or that does not fit both the capacity that volumes.capacity or volumes.capacityBytes sets and the namespace's spec.volumeBudget. |
| `sizeBytes` | integer, at least 1 | The same size as a number of bytes. Set size or sizeBytes, not both. |
| `type` | string, required, one of `emptyDir`, `local` | emptyDir is a new empty directory for each worker, removed with it; local is one durable directory that keeps its files through a crash, a redeploy and a scale to zero. A Function with a local volume runs at most 1 replica, and while it redeploys, its old and new workers hold the volume at once. |

### `Function.status` [#functionstatus]

| Field | Type and limits | Description |
| --- | --- | --- |
| `conditions` | array of [Condition](/docs/develop/common-definitions.md#condition) | The conditions that explain the phase. |
| `currentRevision` | string | The Revision of the latest spec, named after the Function and its generation. While it differs from servingRevision, its workers come up beside the serving ones. |
| `drainingRevision` | string | The Revision that the last switch moved the calls from, while any of its workers still drain: each stops once it is idle, no sooner than runtime.handOutSettle after the switch, or at runtime.drainGrace with its calls cut. Cleared with drainingSince once none drains. A worker that an open workflow run pins is not counted and stays until the run ends. A pooled Function leaves it empty. |
| `drainingSince` | string, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When the last switch moved the calls off drainingRevision; cleared with it. |
| `observedGeneration` | integer | The generation of the spec that funcd last acted on. |
| `phase` | string, one of `Pending`, `Deploying`, `Ready`, `Idle`, `Degraded`, `Failed`, `Terminating` | Where the object is in its lifecycle. |
| `pool` | string | The pool worker the Function runs in, as &lt;runtime&gt;/&lt;worker&gt;/&lt;access&gt;, where access is a hash of its bindings, owned data, grants and resource group. Empty when it runs solo. |
| `replicas` | integer | How many of the serving revision's workers are ready. |
| `servingRevision` | string | The Revision whose workers take the calls; calls move to currentRevision once its workers are ready. Empty until a first worker is ready, and again while the Function wants no worker, such as while it sleeps. |

## Revision [#revision]

| apiVersion | kind |
| --- | --- |
| `funcd.io/v1alpha1` | `Revision` |

### `Revision.spec` [#revisionspec]

| Field | Type and limits | Description |
| --- | --- | --- |
| `function` | object, [`Revision.spec.function`](#revisionspecfunction) | The Function whose spec this Revision snapshots; unset on a Job's Revision. Exactly one of function and job is set. |
| `handler` | string, matching `^[A-Za-z_][A-Za-z0-9_.]*$` | The export that the Revision's workers call: the spec.handler of its Function or Job when funcd created the Revision. |
| `image` | string | The artifact that the Revision's workers run: the spec.image of its Function or Job when funcd created the Revision. |
| `imageDigest` | string, a sha256 digest | The digest that the Revision's workers pull the image by: the spec.imageDigest of its Function or Job, or the digest that its image resolved to when funcd created the Revision. It never changes, even when a tag moves. |
| `job` | string, a DNS-1123 label | The Job whose spec this Revision snapshots, in the Revision's namespace; unset on a Function's Revision. A Job's Revision is named &lt;job&gt;-v&lt;generation&gt;. Exactly one of function and job is set. |
| `number` | integer, required, at least 1 | The generation of the spec that this Revision snapshots. |
| `runtime` | string, a DNS-1123 label | The runtime that the Revision's workers run: the spec.runtime of its Function or Job when funcd created the Revision. |
| `runtimeImage` | string | The image of the Addon runtime that serves the Revision, which its workers run: the image of the Addon's entry when funcd created the Revision, or, for a Revision created before its runtime served it, when a pass first found the entry while no worker of the Revision ran. It never changes after: an Addon update moves no Revision. Empty for any other runtime. |

### `Revision.spec.function` [#revisionspecfunction]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required | The kind of the object it names. |
| `name` | string, required, a DNS-1123 label | The name of the object it names. |
| `namespace` | string, a DNS-1123 label | The namespace of the object it names. |

### `Revision.status` [#revisionstatus]

| Field | Type and limits | Description |
| --- | --- | --- |
| `conditions` | array of [Condition](/docs/develop/common-definitions.md#condition) | The conditions that explain the phase. |
| `observedGeneration` | integer | The generation of the spec that funcd last acted on. |
| `phase` | string, one of `Pending`, `Deploying`, `Ready`, `Idle`, `Degraded`, `Failed`, `Terminating` | Where the object is in its lifecycle. |

## Invocation [#invocation]

| apiVersion | kind |
| --- | --- |
| `funcd.io/v1alpha1` | `Invocation` |

### `Invocation.status` [#invocationstatus]

| Field | Type and limits | Description |
| --- | --- | --- |
| `conditions` | array of [Condition](/docs/develop/common-definitions.md#condition) | The conditions that explain the phase. |
| `endTime` | string, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When the call ended, after its last attempt. |
| `error` | string | Why the call failed, on a Failed record; empty when it succeeded. |
| `observedGeneration` | integer | The generation of the spec that funcd last acted on. |
| `phase` | string, one of `Pending`, `Deploying`, `Ready`, `Idle`, `Degraded`, `Failed`, `Terminating` | Where the object is in its lifecycle. |
| `startTime` | string, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When the call started; for a Sensor's action, its first attempt. |

## Handler API [#handler-api]

The methods a handler calls on its context's clients, in each language funcd ships a shim for.

### `ctx` [#ctx]

#### TypeScript [#typescript]

The per-invocation context the shim passes to the handler.

| Method | What it does |
| --- | --- |
| `log(...args: unknown[]): void` | Writes the arguments as one log line at level INFO, as console.log does. |
| `invoke<I = unknown, O = unknown>(alias: string, input: I): Promise<O>` | Calls the function that the link named alias targets, and returns its result parsed from JSON, or null when it returns nothing. The target's event.data is input, except that an object with a top-level `data` or `specversion` key is taken as the whole CloudEvent, so event.data is only its `data`: send such an object inside an envelope, as `{ specversion: '1.0', data: { data: [1], page: 2 } }`. The link's timeout, 30 seconds by default, bounds the call. Fails with the HTTP status 403 when the function declares no link named alias, 409 when the target serves HTTP, 422 when input does not match the target's contract, and the target's status when its handler fails, such as 500. |
| `fetch(alias: string, path: string, init?: RequestInit): Promise<Response>` | Sends an HTTP request to the function that the link named alias targets, which serves HTTP, and returns its reply as a Response, whatever its status. path starts with "/" and may carry a query; init sets the method, the headers and the body, as for the global fetch. The request body and the reply are each at most 1 MiB, and the link's timeout, 30 seconds by default, bounds the call. Fails with the HTTP status 403 when the function declares no link named alias, and 409 when the target does not serve HTTP. |
| `remainingMs(): number \| null` | The whole milliseconds left before the call's deadline, 0 once it has passed, or null when the call has none. |

Each method here that calls funcd can also fail with the status 500 and the problem type `urn:funcd:problem:internal`, when funcd meets an error that it did not expect; funcd logs its cause.

When funcd refuses a call, the method fails with an error that holds funcd's status and problem type. This table gives them for each method, with when each happens and what to do.

| Method | Status | Problem type | When | What to do |
| --- | --- | --- | --- | --- |
| `invoke` | 403 | `urn:funcd:problem:forbidden` | The Function's spec.bindings.links has no entry for the alias. | Add the link to spec.bindings.links, or call an alias that the Function links. |
| `invoke` | 403 | `urn:funcd:problem:forbidden` | A Policy forbids the Function to call the link's target. | Change or remove the Policy that forbids link::invoke on the target. |
| `invoke` | 404 | `urn:funcd:problem:not-found` | The Function that the link targets no longer exists, as when its App deleted it before the Function that links it. | Create the Function again, or link one that exists. |
| `invoke` | 409 | `urn:funcd:problem:conflict` | The link's target serves HTTP, which ctx.invoke does not call. | Call it with ctx.fetch, which only the TypeScript shim has, or link a Function whose protocol is cloudevent. |
| `invoke` | 413 | `urn:funcd:problem:payload-too-large` | The request's body is larger than the local API takes for the call. | Send a smaller body. |
| `invoke` | 413 | `urn:funcd:problem:payload-too-large` | The target's reply is larger than 1 MiB, the most that a call carries back. | Return a smaller reply, or pass the data through a Bucket. |
| `invoke` | 429 | `urn:funcd:problem:resource-exhausted` | The target already has as many calls from Functions in flight as invoke.maxNestedInFlight allows. | Retry once a call to the target returns, or raise invoke.maxNestedInFlight. |
| `invoke` | 503 | `urn:funcd:problem:unavailable` | The target's reply broke off before its end: its worker failed during the call, or the link's timeout ended it. | Retry the call, and raise the link's timeout if the target needs longer. |
| `fetch` | 403 | `urn:funcd:problem:forbidden` | The Function's spec.bindings.links has no entry for the alias. | Add the link to spec.bindings.links, or call an alias that the Function links. |
| `fetch` | 403 | `urn:funcd:problem:forbidden` | A Policy forbids the Function to call the link's target. | Change or remove the Policy that forbids link::invoke on the target. |
| `fetch` | 404 | `urn:funcd:problem:not-found` | The path names no alias: it is not /fetch/&lt;alias&gt;/&lt;path&gt;. | Pass the alias of a link, and a path that starts with /. |
| `fetch` | 404 | `urn:funcd:problem:not-found` | The Function that the link targets no longer exists, as when its App deleted it before the Function that links it. | Create the Function again, or link one that exists. |
| `fetch` | 409 | `urn:funcd:problem:conflict` | The link's target does not serve HTTP, which ctx.fetch needs. | Call it with ctx.invoke, or link a Function whose protocol is http. |
| `fetch` | 413 | `urn:funcd:problem:payload-too-large` | The request's body is larger than the local API takes for the call. | Send a smaller body. |
| `fetch` | 413 | `urn:funcd:problem:payload-too-large` | The target's reply is larger than 1 MiB, the most that a call carries back. | Return a smaller reply, or pass the data through a Bucket. |
| `fetch` | 429 | `urn:funcd:problem:resource-exhausted` | The target already has as many calls from Functions in flight as invoke.maxNestedInFlight allows. | Retry once a call to the target returns, or raise invoke.maxNestedInFlight. |
| `fetch` | 503 | `urn:funcd:problem:unavailable` | The target's reply broke off before its end: its worker failed during the call, or the link's timeout ended it. | Retry the call, and raise the link's timeout if the target needs longer. |

#### Python [#python]

The per-invocation context the shim passes to the handler.

| Method | What it does |
| --- | --- |
| `log(*args: object) -> None` | Prints the arguments, separated by spaces, as one line on standard output, which funcd keeps as a log line at level INFO. |
| `invoke(alias: str, payload: Any) -> Any` | Calls the function that the link named ``alias`` targets, and returns its result parsed from JSON, or ``None`` when it returns nothing. The target's ``event["data"]`` is ``payload``, except that a dict with a top-level ``"data"`` or ``"specversion"`` key is taken as the whole CloudEvent, so ``event["data"]`` is only its ``"data"`` value: send such a dict inside an envelope, as ``{"specversion": "1.0", "data": payload}``. The link's timeout, 30 seconds by default, bounds the call. Fails with the HTTP status 403 when the function declares no link named ``alias``, 409 when the target serves HTTP, 422 when ``payload`` does not match the target's contract, and the target's status when its handler fails, such as 500. |
| `remaining_ms() -> int \| None` | The whole milliseconds left before the call's deadline, 0 once it has passed, or ``None`` when the call has none. |

Each method here that calls funcd can also fail with the status 500 and the problem type `urn:funcd:problem:internal`, when funcd meets an error that it did not expect; funcd logs its cause.

When funcd refuses a call, the method fails with an error that holds funcd's status and problem type. This table gives them for each method, with when each happens and what to do.

| Method | Status | Problem type | When | What to do |
| --- | --- | --- | --- | --- |
| `invoke` | 403 | `urn:funcd:problem:forbidden` | The Function's spec.bindings.links has no entry for the alias. | Add the link to spec.bindings.links, or call an alias that the Function links. |
| `invoke` | 403 | `urn:funcd:problem:forbidden` | A Policy forbids the Function to call the link's target. | Change or remove the Policy that forbids link::invoke on the target. |
| `invoke` | 404 | `urn:funcd:problem:not-found` | The Function that the link targets no longer exists, as when its App deleted it before the Function that links it. | Create the Function again, or link one that exists. |
| `invoke` | 409 | `urn:funcd:problem:conflict` | The link's target serves HTTP, which ctx.invoke does not call. | Call it with ctx.fetch, which only the TypeScript shim has, or link a Function whose protocol is cloudevent. |
| `invoke` | 413 | `urn:funcd:problem:payload-too-large` | The request's body is larger than the local API takes for the call. | Send a smaller body. |
| `invoke` | 413 | `urn:funcd:problem:payload-too-large` | The target's reply is larger than 1 MiB, the most that a call carries back. | Return a smaller reply, or pass the data through a Bucket. |
| `invoke` | 429 | `urn:funcd:problem:resource-exhausted` | The target already has as many calls from Functions in flight as invoke.maxNestedInFlight allows. | Retry once a call to the target returns, or raise invoke.maxNestedInFlight. |
| `invoke` | 503 | `urn:funcd:problem:unavailable` | The target's reply broke off before its end: its worker failed during the call, or the link's timeout ended it. | Retry the call, and raise the link's timeout if the target needs longer. |

## HTTP API [#http-api]

The table lists each described operation of these kinds, with its method and path. The operation's page in the API reference gives its parameters, its body, its authentication and every answer, with when it happens and what to do.

| Method | Path | Operation |
| --- | --- | --- |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/functions` | [List the Functions of a namespace](/docs/api/workloads/function/list.md) |
| `POST` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/functions` | [Create a Function](/docs/api/workloads/function/create.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/functions/{name}` | [Read a Function](/docs/api/workloads/function/get.md) |
| `PUT` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/functions/{name}` | [Replace a Function](/docs/api/workloads/function/replace.md) |
| `DELETE` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/functions/{name}` | [Delete a Function](/docs/api/workloads/function/delete.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/functions/{name}/logs` | [Read the logs of a Function](/docs/api/workloads/function/get-logs.md) |
| `DELETE` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/volumes/{function}/{name}` | [Delete a retained volume of a Function](/docs/api/workloads/function/delete-volume.md) |
| `POST` | `/function/{name}` | [Call a Function](/docs/api/workloads/function/invoke.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/revisions` | [List the Revisions of a namespace](/docs/api/workloads/revision/list.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/revisions/{name}` | [Read a Revision](/docs/api/workloads/revision/get.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/invocations` | [List the Invocations of a namespace](/docs/api/workloads/invocation/list.md) |
| `POST` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/invocations` | [Create an Invocation](/docs/api/workloads/invocation/create.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/invocations/{name}` | [Read an Invocation](/docs/api/workloads/invocation/get.md) |
| `PUT` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/invocations/{name}` | [Replace an Invocation](/docs/api/workloads/invocation/replace.md) |
| `DELETE` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/invocations/{name}` | [Delete an Invocation](/docs/api/workloads/invocation/delete.md) |
