---
title: "Update a function."
method: PUT
path: "/functions"
---

# Update a function.

`PUT /functions`

## Request body

- FunctionDefinition
  - `name` string, required — Name of deployed function
  - `image` string, required — Docker image in accessible registry
  - `script` string, required — Script to be executed inside the function coded in base64
  - `envVars` object — Overrides to environmental variables
  - `labels` object — An dictionary of labels used by the back-end for making scheduling or routing decisions
  - `annotations` object — An dictionary of annotations used by the back-end for management, orchestration, events and build tasks
  - `constraints` string[]
  - `network` string — Docker swarm network, usually func_functions
  - `secrets` string[]
  - `registryAuth` string — Private registry base64-encoded basic auth (as present in ~/.docker/config.json)
  - `limits` FunctionDefinitionLimits
    - `memory` string
    - `cpu` string
  - `requests` FunctionDefinitionLimits
    - `memory` string
    - `cpu` string

## Response `200`

Accepted

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/grycap/apis/on-premises-serverless-container-aware-architectures-api-gat.md) · [All operations](https://skmtc.dev/grycap/apis/on-premises-serverless-container-aware-architectures-api-gat/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/grycap/on-premises-serverless-container-aware-architectures-api-gat/revisions/833085524378/schema)
