az webpubsub hub
Note
This reference is part of the webpubsub extension for the Azure CLI (version 2.39.0 or higher). The extension will automatically install the first time you run an az webpubsub hub command. Learn more about extensions.
Commands to manage Webpubsub hub settings.
Commands
Name | Description | Type | Status |
---|---|---|---|
az webpubsub hub create |
Create hub settings for WebPubSub Service. |
Extension | GA |
az webpubsub hub delete |
Delete hub settings for WebPubSub Service. |
Extension | GA |
az webpubsub hub list |
List all hub settings for WebPubSub Service. |
Extension | GA |
az webpubsub hub show |
Show hub settings for WebPubSub Service. |
Extension | GA |
az webpubsub hub update |
Update hub settings for WebPubSub Service. |
Extension | GA |
az webpubsub hub create
Create hub settings for WebPubSub Service.
az webpubsub hub create --hub-name
--name
--resource-group
[--allow-anonymous {false, true}]
[--event-handler]
Examples
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"
Create a hub setting with anonymous connection allowed
az webpubsub hub create -n MyWebPubSub -g MyResourceGroup --hub-name MyHub --allow-anonymous true
Required Parameters
The hub to manage.
Name of the Webpubsub.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Set if anonymous connections are allowed for this hub. True means allow and False means deny.
Template item for event handler settings. Use key=value pattern to set properties. Supported keys are "url-template", "user-event-pattern", "system-event", "auth-type" and "auth-resource". Setting multiple "system-event" results in an array and for other properties, only last set takes active.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az webpubsub hub delete
Delete hub settings for WebPubSub Service.
az webpubsub hub delete [--hub-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
Name of the hub.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Webpubsub.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az webpubsub hub list
List all hub settings for WebPubSub Service.
az webpubsub hub list --name
--resource-group
Required Parameters
Name of the Webpubsub.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az webpubsub hub show
Show hub settings for WebPubSub Service.
az webpubsub hub show [--hub-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
Name of the hub.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Webpubsub.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az webpubsub hub update
Update hub settings for WebPubSub Service.
az webpubsub hub update --hub-name
[--add]
[--allow-anonymous {false, true}]
[--event-handler]
[--force-string]
[--ids]
[--name]
[--remove]
[--resource-group]
[--set]
[--subscription]
Examples
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"
Update to allow anonymous connection
az webpubsub hub update -n MyWebPubSub -g MyResourceGroup --hub-name MyHub --allow-anonymous true
Required Parameters
The hub to manage.
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Set if anonymous connections are allowed for this hub. True means allow and False means deny.
Template item for event handler settings. Use key=value pattern to set properties. Supported keys are "url-template", "user-event-pattern", "system-event", "auth-type" and "auth-resource". Setting multiple "system-event" results in an array and for other properties, only last set takes active.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Webpubsub.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.