Skip to main content

Type Alias: CreateFunctionRequest

type CreateFunctionRequest: components["schemas"]["CreateFunctionRequest"];

Properties

PropertyTypeRequiredDescription
namestringYesFunction name (example: "process-webhook")
slugstringNoURL-friendly slug (auto-generated if not provided) (example: "process-webhook")
descriptionstringNoFunction description
codestringYesInitial source code (example: "exports.handler = async (event, ctx) => { return { statusCode: 200, body: \"Hello\" }; };")
entrypointstringNoEntrypoint function name. Defaults to "handler" when omitted.
runtime"nodejs20" | "nodejs22"NoRuntime environment. Defaults to "nodejs20" when omitted.
authMode"public" | "api_key" | "signed"NoAuthentication mode. Defaults to "api_key" when omitted.
timeoutnumberNoExecution timeout in ms (1000-300000). Defaults to 30000 when omitted.
memorynumberNoMemory limit in MB (128-1024). Defaults to 256 when omitted.
envVarsSetEnvVarRequest[]NoInitial environment variables

Defined in

4Players/cortex-typescript-sdk/src/resources/functions.ts:32