Skip to content

Update Function

PUT
/api/v1/faas/function/{function_id}/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/faas/function/{function_id}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>'

Updates the specified serverless function with new memory, timeout, environment variables, and code file.

function_id
required
integer

Function ID

project_id
required
integer
location
required
string
Allowed values: Delhi Chennai

Deployment region for the resource. Accepted values: Delhi, Chennai.

Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.

Media typemultipart/form-data
object
memory
required

Memory allocated to the function (in MB)

string
Allowed values: 128 256 512 1024

Example

128
timeout
required

Timeout for the function (in seconds)

string

Example

15
environment_variables
required

JSON string of environment variables

string

Example

{
"env_name": "env_value"
}
code_file

Zipped function source code (.zip file)

string format: binary

Function update initiated successfully.

Media typeapplication/json
object
code
integer
data
string
errors
object
message
string

Example

{
"code": 200,
"data": "Function sent to build",
"errors": {},
"message": "Success"
}