The configuration for the document function
Configuration for defining a document function.
OptionaldisplayName?: stringHuman-readable display name for the function
Optionalenv?: Record<string, string>Environment variables provided to the function
Optionalevent?: BlueprintDocumentFunctionResourceEventEvent configuration specifying when and how the function is triggered
Optionalmemory?: numberMemory allocation in gigabytes
Optionalproject?: stringThe project ID of the project that contains your function.
The project attribute must be defined if your blueprint is scoped to an organization.
OptionalrobotToken?: stringToken provided during function invocation
Optionalruntime?: "node" | "nodejs22.x" | "nodejs24.x"The runtime environment for the function (currently only Node.js is supported)
Optionalsrc?: stringPath to the function source code
Optionaltimeout?: numberExecution timeout in seconds
The validated document function resource
Defines a function that is triggered by document events in Sanity datasets.