ArmWebPubSubModelFactory.WebPubSubEventHandler Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
- "*", it matches any event name
- Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
- 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.