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>'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/faas/function/{function_id}/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/faas/function/{function_id}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Updates the specified serverless function with new memory, timeout, environment variables, and code file.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”function_id
required
integer
Function ID
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
memory
required
Memory allocated to the function (in MB)
string
Example
128timeout
required
Timeout for the function (in seconds)
string
Example
15environment_variables
required
JSON string of environment variables
string
Example
{ "env_name": "env_value"}code_file
Zipped function source code (.zip file)
string format: binary
Responses
Section titled “Responses”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"}