fbpx
PUThttps://api.spotinst.io/functions/function/{FUNCTION_ID}?accountId={ACCOUNT_ID}

Update one or more parameters in your function. Use the balancer Json in the body to update the function. Only the specified fields will be affected.

Parameter Type Description
FUNCTION_ID * String

The function ID you want to update.

ACCOUNT_ID String

The account ID.

Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${TOKEN}"
}
Body
Copied!
Downloaded!
{
  "function": {
    "code": {
      "handler": "hello.HelloJava",
      "source": "{{base64}}"
    },
    "runtime": "java8",
    "limits": {
      "timeout": 60,
      "memory": 128
    },
    "environmentVariables": {
      "envTest": "efg"
    }
  }
}

Body Attributes


  • function.code.handler String
    A pointer to the function main handler, should be in the format: ‘fileName.handlerName’. In Java - The class name including your main function, should be in the format: ‘className’.
  • function.code.source String
    Base64 representation of the archived user code. More inf
  • function.runtime String
    The type of requested runtime.
  • function.limits.timeout Integer
    The timeout of the function invocation in seconds (max: 300)
  • function.limits.memory Integer
    The memory of the function in units of 64Mb (max: 2496)
  • functions.environmentVariables String
    map Environment variables as key-value to be set on function context
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "status": {
        "code": 200,
        "message": "OK"
    }
}