Skip to main content

azure-functions

azure-functions

Forwards the request to an Azure Function endpoint and returns the function's status, headers, and body as the gateway response. It replaces the upstream: place it where an upstream node would go and wire its success port straight to client.in.

Configuration

KeyTypeDefaultDescription
function_uristringrequiredAzure Function URL to invoke.
authorizationobjectFunction-key credentials (see below).
authorization.apikeystringSent as the x-functions-key header.
authorization.clientidstringSent as the x-functions-clientid header.
ssl_verifybooltrueVerify TLS certificates on the callout.
timeoutinteger (ms)3000Whole-call deadline (connect + request + response body).
type: azure-functions
config:
function_uri: https://app.azurewebsites.net/api/HttpTrigger
authorization:
apikey: ${AZURE_FUNCTION_KEY}
ssl_verify: true
timeout: 3000

Config load fails if function_uri is missing or empty.

Behavior

The plugin forwards the client's method, headers, query string, and body to function_uri, overriding Host with the endpoint's authority. Unless the client already supplied x-functions-key/x-functions-clientid, the configured apikey/clientid are added as those headers. On success it populates context.response with the function's status, headers, and body and exits through the success port — which should be wired to client.in, since this node stands in for the upstream. The function's status is passed through as-is.

A callout failure returns the Context along with an error so the graph engine routes through the error port; the error is appended to context.errors — see Errors.

The plugin does not read or write context.message.

Errors

The node returns the Context with an error, so the graph engine routes through the error port and appends the error to context.errors. The status below is the one prepared on context.response; wire error to client (or an error-handler) for the caller to see it.

CodeStatusWhen
AZURE_FUNCTIONS_CALLOUT_ERROR504The function callout exceeded timeout.
AZURE_FUNCTIONS_CALLOUT_ERROR503Connecting to or exchanging with the endpoint failed.
AZURE_FUNCTIONS_CALLOUT_ERROR502The request could not be built (e.g. an invalid endpoint URI).