The update command is used to update the configuration of a function.

JSON Input Data Format
{
    "id": string,
    "comments": string,
    "gitrepo": string,
    "gitbranch": string,
    "trigger": boolean,
    "queue": string,
    "envars": string,
    "commands": string,
    "testjson": string,
    "memory": integer,
    "timeout": integer,
    "staticport": integer,
    "policy": string
}
id * Specifies the Serverless ID of the function.
comments Specifies additional text for the function, used to provide a brief description.
gitrepo Specifies the Git repository address from which files for the function's code space can be pulled or pushed.
gitbranch Specifies the Git repository branch name from which files for the function's code space can be pulled or pushed. The default value is "main."
trigger Specifies whether the function can be invoked from an Event Hub. If enabled, the function will be triggered as soon as the Event Hub receives a message, which will then be forwarded to the function.
queue Specifies the Event Hub ID that will trigger the function upon receiving a message. Please note that the trigger field must be set to true to enable this functionality.
envars Specifies the environment variables for the function in JSON format.
commands Specifies additional build commands in JSON format for the function, typically used to install extra runtime libraries needed during the build process.
testjson Specifies the JSON input data that will be passed to the function during the test procedure.
memory Specifies the memory size, in megabytes, allocated for the function. This value should be at least 128 MB.
timeout Specifies the function's process timeout, in seconds.
staticport Specifies the static port number for the function. If set to 0, the controller will dynamically assign a port number starting at 32000. Once deployed, the function will retain the dynamically assigned port number until it is deleted.
policy * Specifies the S3 access policy for this function.
* Indicates a mandatory field.

Code Snippets
Here are several code snippets provided for your direct use. Simply select your preferred tool/language by clicking on it.


Successful Response
{
    "result": "OK",
    "payload": "The process was successfully completed"
}

Failed Response
{
    "result": "ERR",
    "message": "Error message ..."
}