CmdID

CmdID / az / az webpubsub / az webpubsub hub

az webpubsub hub update

Update hub settings for WebPubSub Service or Web PubSub for Socket.IO in Serverless Mode. Azure CLI extensions reference

3 examples 4 options Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Update event handler settings of a hub

az webpubsub hub update -n MyWebPubSub -g MyResourceGroup --hub-name MyHub --event-handler url-template="http://host.com" user-event-pattern="MyEvent" --event-handler url-template="http://host2.com" system-event="connected" system-event="disconnected" auth-type="ManagedIdentity" auth-resource="uri://myUri"Identify
-nName of the webpubsub.
-gName of resource group.
--hub-nameThe hub to manage
--event-handlerTemplate item for event handler settings.

Update to allow anonymous connection

az webpubsub hub update -n MyWebPubSub -g MyResourceGroup --hub-name MyHub --allow-anonymous trueIdentify
-nName of the webpubsub.
-gName of resource group.
--hub-nameThe hub to manage
--allow-anonymousSet if anonymous connections are allowed for this hub.

Update to web socket keep alive interval in seconds (default is 20 seconds, minimum is 1, maximum is 120)

az webpubsub hub update -n MyWebPubSub -g MyResourceGroup --hub-name MyHub --websocket-keepalive 30Identify
-nName of the webpubsub.
-gName of resource group.
--hub-nameThe hub to manage
--websocket-keepaliveThe WebSocket keep-alive interval in seconds for all clients in the hub.

Options

4 in the Azure CLI extensions reference
--allow-anonymousSet if anonymous connections are allowed for this hub.
--event-handlerTemplate item for event handler settings.
--hub-nameThe hub to manage
--websocket-keepaliveThe WebSocket keep-alive interval in seconds for all clients in the hub.