WebPubSubFunctionOptions interface

Extends

Properties

handler

The code that will be executed when your function is triggered

trigger

Configuration for the primary input to the function, aka the reason it will be triggered This is the only input that is passed as an argument to the function handler during invocation

Inherited Properties

clientProtocols

Optional - Specifies which client protocol can trigger the Web PubSub trigger functions Default is 'all'

connection

Optional - The name of the app setting that contains the Web PubSub Service connection string. Defaults to "WebPubSubConnectionString" if not specified.

connections

Optional - The names of app settings or setting collections that specify the upstream Azure Web PubSub services Used for signature validation Defaults to "WebPubSubConnectionString" if not specified

eventName

Required - The name of the event to which the function should respond For system event type: 'connect', 'connected', or 'disconnected' For user-defined subprotocols: 'message' For system supported subprotocol json.webpubsub.azure.v1: user-defined event name

eventType

Required - The type of event to which the function should respond Must be either 'user' or 'system'

extraInputs

Configuration for an optional set of secondary inputs During invocation, get these values with context.extraInputs.get()

extraOutputs

Configuration for an optional set of secondary outputs During invocation, set these values with context.extraOutputs.set()

hub

Required - The name of the hub to which the function is bound

name

Required - The variable name used in function code for the parameter that receives the event data

return

Configuration for the optional primary output of the function This is the main output that you should set as the return value of the function handler during invocation

Property Details

handler

The code that will be executed when your function is triggered

handler: WebPubSubHandler<T>

Property Value

trigger

Configuration for the primary input to the function, aka the reason it will be triggered This is the only input that is passed as an argument to the function handler during invocation

trigger?: WebPubSubTrigger

Property Value

Inherited Property Details

clientProtocols

Optional - Specifies which client protocol can trigger the Web PubSub trigger functions Default is 'all'

clientProtocols?: "all" | "webPubSub" | "mqtt"

Property Value

"all" | "webPubSub" | "mqtt"

Inherited From WebPubSubTriggerOptions.clientProtocols

connection

Warning

This API is now deprecated.

Use connections instead.

Optional - The name of the app setting that contains the Web PubSub Service connection string. Defaults to "WebPubSubConnectionString" if not specified.

connection?: string

Property Value

string

Inherited From WebPubSubTriggerOptions.connection

connections

Optional - The names of app settings or setting collections that specify the upstream Azure Web PubSub services Used for signature validation Defaults to "WebPubSubConnectionString" if not specified

connections?: string[]

Property Value

string[]

Inherited From WebPubSubTriggerOptions.connections

eventName

Required - The name of the event to which the function should respond For system event type: 'connect', 'connected', or 'disconnected' For user-defined subprotocols: 'message' For system supported subprotocol json.webpubsub.azure.v1: user-defined event name

eventName: string

Property Value

string

Inherited From WebPubSubTriggerOptions.eventName

eventType

Required - The type of event to which the function should respond Must be either 'user' or 'system'

eventType: "user" | "system"

Property Value

"user" | "system"

Inherited From WebPubSubTriggerOptions.eventType

extraInputs

Configuration for an optional set of secondary inputs During invocation, get these values with context.extraInputs.get()

extraInputs?: FunctionInput[]

Property Value

Inherited From Partial.extraInputs

extraOutputs

Configuration for an optional set of secondary outputs During invocation, set these values with context.extraOutputs.set()

extraOutputs?: FunctionOutput[]

Property Value

Inherited From Partial.extraOutputs

hub

Required - The name of the hub to which the function is bound

hub: string

Property Value

string

Inherited From WebPubSubTriggerOptions.hub

name

Required - The variable name used in function code for the parameter that receives the event data

name: string

Property Value

string

Inherited From WebPubSubTriggerOptions.name

return

Configuration for the optional primary output of the function This is the main output that you should set as the return value of the function handler during invocation

return?: FunctionOutput

Property Value

Inherited From Partial.return