Share via


az notification-hub

Note

This reference is part of the notification-hub extension for the Azure CLI (version 2.49.0 or higher). The extension will automatically install the first time you run an az notification-hub command. Learn more about extensions.

This command group is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage notification hubs.

Commands

Name Description Type Status
az notification-hub authorization-rule

Commands to manage notification hubs authorization rule.

Extension Experimental
az notification-hub authorization-rule create

Create an authorization rule for a notification hub.

Extension Experimental
az notification-hub authorization-rule delete

Delete a notificationHub authorization rule.

Extension Experimental
az notification-hub authorization-rule list

List the authorization rules for a notification hub.

Extension Experimental
az notification-hub authorization-rule list-keys

List the primary and secondary connection strings to the notification hub.

Extension Experimental
az notification-hub authorization-rule regenerate-keys

Regenerates the primary/secondary keys to the notification hub authorization rule.

Extension Experimental
az notification-hub authorization-rule show

Show an authorization rule for a notification hub by name.

Extension Experimental
az notification-hub check-availability

Checks the availability of the given notification hub in a namespace.

Extension Experimental
az notification-hub create

Create a notification hub in a namespace.

Extension Experimental
az notification-hub credential

Commands to manage notification hub credential.

Extension Experimental
az notification-hub credential adm Extension Experimental
az notification-hub credential adm update

Update credential for Amazon(ADM).

Extension Experimental
az notification-hub credential apns Extension Experimental
az notification-hub credential apns update

Update credential for Apple(APNS).

Extension Experimental
az notification-hub credential baidu Extension Experimental
az notification-hub credential baidu update

Update credential for Baidu(Andrioid China).

Extension Experimental
az notification-hub credential gcm Extension Experimental
az notification-hub credential gcm update

Update the Google GCM/FCM API key.

Extension Experimental
az notification-hub credential list

Lists the PNS credentials associated with a notification hub.

Extension Experimental
az notification-hub credential mpns Extension Experimental
az notification-hub credential mpns update

Update credential for Windows Phone(MPNS).

Extension Experimental
az notification-hub credential wns Extension Experimental
az notification-hub credential wns update

Update credential for Windows(WNS).

Extension Experimental
az notification-hub delete

Delete a notification hub associated with a namespace.

Extension Experimental
az notification-hub list

List the notification hubs associated with a namespace.

Extension Experimental
az notification-hub namespace

Commands to manage notification hub namespace.

Extension Experimental
az notification-hub namespace authorization-rule

Commands to manage notification hubs namespace authorization rule.

Extension Experimental
az notification-hub namespace authorization-rule create

Create an authorization rule for a namespace.

Extension Experimental
az notification-hub namespace authorization-rule delete

Delete a namespace authorization rule.

Extension Experimental
az notification-hub namespace authorization-rule list

List the authorization rules for a namespace.

Extension Experimental
az notification-hub namespace authorization-rule list-keys

List the primary and secondary connection strings to the namespace.

Extension Experimental
az notification-hub namespace authorization-rule regenerate-keys

Regenerate the primary/secondary keys to the namespace authorization rule.

Extension Experimental
az notification-hub namespace authorization-rule show

Get an authorization rule for a namespace by name.

Extension Experimental
az notification-hub namespace check-availability

Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name.

Extension Experimental
az notification-hub namespace create

Create a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.

Extension Experimental
az notification-hub namespace delete

Delete an existing namespace. This operation also removes all associated notificationHubs under the namespace.

Extension Experimental
az notification-hub namespace list

List available namespaces.

Extension Experimental
az notification-hub namespace show

Return the description for the specified namespace.

Extension Experimental
az notification-hub namespace update

Update a service namespace. The namespace's resource manifest is immutable and cannot be modified.

Extension Experimental
az notification-hub namespace wait

Place the CLI in a waiting state until a condition is met.

Extension Experimental
az notification-hub show

Show the notification hub information.

Extension Experimental
az notification-hub test-send

Test send a push notification.

Extension Experimental
az notification-hub update

Update a notification hub in a namespace.

Extension Experimental

az notification-hub check-availability

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Checks the availability of the given notification hub in a namespace.

az notification-hub check-availability --name
                                       [--ids]
                                       [--namespace-name]
                                       [--resource-group]
                                       [--subscription]

Examples

Check the availability of the given notification hub name

az notification-hub check-availability --resource-group MyResourceGroup --namespace-name "locp-newns" --name my-hub

Required Parameters

--name -n

Resource name.

Optional Parameters

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

--namespace-name

The namespace name.

--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 notification-hub create

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a notification hub in a namespace.

az notification-hub create --name
                           --namespace-name
                           --resource-group
                           [--location]
                           [--registration-ttl]
                           [--tags]

Examples

Create a notification hub

az notification-hub create --resource-group MyResourceGroup --namespace-name my-namespace --name my-hub --location "South Central US"

Required Parameters

--name -n

The notification hub name.

--namespace-name

The namespace name.

--resource-group -g

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

Optional Parameters

--location -l

Resource location When not specified, the location of the resource group will be used.

--registration-ttl

The RegistrationTtl of the created NotificationHub.

--tags

Resource tags Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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 notification-hub delete

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a notification hub associated with a namespace.

az notification-hub delete [--ids]
                           [--name]
                           [--namespace-name]
                           [--resource-group]
                           [--subscription]
                           [--yes]

Examples

Delete a notification hub

az notification-hub delete --resource-group MyResourceGroup --namespace-name my-namespace --name my-hub

Optional Parameters

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

The notification hub name.

--namespace-name

The namespace name.

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

--yes -y

Do not prompt for confirmation.

Default value: False
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 notification-hub list

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List the notification hubs associated with a namespace.

az notification-hub list --namespace-name
                         --resource-group
                         [--max-items]
                         [--next-token]

Examples

List the notification hubs

az notification-hub list --resource-group MyResourceGroup --namespace-name my-namespace

Required Parameters

--namespace-name

The namespace name.

--resource-group -g

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

Optional Parameters

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

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 notification-hub show

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show the notification hub information.

az notification-hub show [--ids]
                         [--name]
                         [--namespace-name]
                         [--resource-group]
                         [--subscription]

Optional Parameters

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

The notification hub name.

--namespace-name

The namespace name.

--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 notification-hub test-send

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Test send a push notification.

az notification-hub test-send --namespace-name
                              --notification-format {apple, baidu, gcm, template, windows, windowsphone}
                              --notification-hub-name
                              --resource-group
                              [--message]
                              [--payload]
                              [--tag]
                              [--title]

Examples

test send notification with message body

az notification-hub test-send --resource-group MyResourceGroup --namespace-name \
my-namespace --notification-hub-name my-hub --notification-format gcm \
--message "test notification"

test send notification from file

az notification-hub test-send --resource-group MyResourceGroup --namespace-name \
my-namespace --notification-hub-name my-hub --notification-format gcm \
--payload @path/to/file

test send notification with json string

az notification-hub test-send --resource-group MyResourceGroup --namespace-name \
my-namespace --notification-hub-name my-hub --notification-format gcm \
--payload "{\"data\":{\"message\":\"test notification\"}}"

Required Parameters

--namespace-name

The namespace name.

--notification-format

The format of notification message.

Accepted values: apple, baidu, gcm, template, windows, windowsphone
--notification-hub-name

The notification hub name.

--resource-group -g

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

Optional Parameters

--message

The message body to send. If not None, payload will be ignored.

--payload

The payload for the message in JSON format.

--tag

You can send test notifications to a specific set of registrations using this option. Leave this field empty if you like to send push notifications to 10 random registrations on the selected platform.

--title

The title of the notification.

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 notification-hub update

Experimental

Command group 'notification-hub' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a notification hub in a namespace.

az notification-hub update [--add]
                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                           [--ids]
                           [--location]
                           [--name]
                           [--namespace-name]
                           [--remove]
                           [--resource-group]
                           [--set]
                           [--subscription]
                           [--tags]

Examples

Update the notification hub

az notification-hub update --resource-group MyResourceGroup --namespace-name my-namespace --name "sdk-notificationHubs-8708"

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

--force-string

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

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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.

--location -l

Resource location.

--name --notification-hub-name -n

The notification hub name.

--namespace-name

The namespace name.

--remove

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

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

--subscription

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

--tags

Resource tags Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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.