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

--hub-name

The hub to manage.

--name -n

Name of the Webpubsub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--allow-anonymous

Set if anonymous connections are allowed for this hub. True means allow and False means deny.

accepted values: false, true
default value: False
--event-handler

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
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--hub-name

Name of the hub.

--ids

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 -n

Name of the Webpubsub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -n

Name of the Webpubsub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--hub-name

Name of the hub.

--ids

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 -n

Name of the Webpubsub.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--hub-name

The hub to manage.

Optional Parameters

--add

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>.

default value: []
--allow-anonymous

Set if anonymous connections are allowed for this hub. True means allow and False means deny.

accepted values: false, true
--event-handler

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.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

default value: False
--ids

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 -n

Name of the Webpubsub.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

default value: []
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.