CmdID

CmdID / az / az webpubsub / az webpubsub hub

az webpubsub hub create

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

2 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

Create a hub setting with two event handler settings

az webpubsub hub create -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.

Create a hub setting with anonymous connection allowed

az webpubsub hub create -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.

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.