ArmWebPubSubModelFactory.WebPubSubEventHandler Method

Definition

Properties of event handler.

public static Azure.ResourceManager.WebPubSub.Models.WebPubSubEventHandler WebPubSubEventHandler(string urlTemplate = default, string userEventPattern = default, System.Collections.Generic.IEnumerable<string> systemEvents = default, Azure.ResourceManager.WebPubSub.Models.UpstreamAuthSettings auth = default, Azure.ResourceManager.WebPubSub.Models.WebPubSubGroupPresenceEventFilters groupPresenceEvents = default);
static member WebPubSubEventHandler : string * string * seq<string> * Azure.ResourceManager.WebPubSub.Models.UpstreamAuthSettings * Azure.ResourceManager.WebPubSub.Models.WebPubSubGroupPresenceEventFilters -> Azure.ResourceManager.WebPubSub.Models.WebPubSubEventHandler
Public Shared Function WebPubSubEventHandler (Optional urlTemplate As String = Nothing, Optional userEventPattern As String = Nothing, Optional systemEvents As IEnumerable(Of String) = Nothing, Optional auth As UpstreamAuthSettings = Nothing, Optional groupPresenceEvents As WebPubSubGroupPresenceEventFilters = Nothing) As WebPubSubEventHandler

Parameters

urlTemplate
String

Gets or sets the URL template for the event handler. The actual URL is calculated when the corresponding event is triggered. The template supports predefined parameters syntax: {event}, {hub}, and KeyVault reference syntax {@Microsoft.KeyVault(SecretUri=_your_secret_identifier_)} For example, if the template is http://example.com/api/{event}, when connect event is triggered, a POST request will be sent to the URL http://example.com/chat/api/connect. Note: Parameters are not allowed in the hostname of the URL, and curly brackets {} are reserved for parameter syntax only. If your URL path contains literal curly brackets, please URL-encode them to ensure proper handling.

userEventPattern
String

Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported:

  1. "*", it matches any event name
  2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
  3. A single event name, for example, "event1", it matches "event1"
systemEvents
IEnumerable<String>

Gets or sets the list of system events.

auth
UpstreamAuthSettings

Upstream auth settings. If not set, no auth is used for upstream messages.

groupPresenceEvents
WebPubSubGroupPresenceEventFilters

The group presence events that this event handler is concerned with. Group presence events are triggered when connections join or leave groups in the hub. If the value is null, no presence events will be sent to this event handler.

Returns

A new WebPubSubEventHandler instance for mocking.

Applies to