az notification-hub

Manage Notification Hubs.

Commands

az notification-hub authorization-rule

Commands to manage notification hubs authorization rule.

az notification-hub authorization-rule create

Create an authorization rule for a NotificationHub.

az notification-hub authorization-rule delete

Delete a notificationHub authorization rule.

az notification-hub authorization-rule list

List the authorization rules for a NotificationHub.

az notification-hub authorization-rule list-keys

List the Primary and Secondary ConnectionStrings to the NotificationHub.

az notification-hub authorization-rule regenerate-keys

Regenerate the Primary/Secondary Keys to the NotificationHub Authorization Rule.

az notification-hub authorization-rule show

Show an authorization rule for a NotificationHub by name.

az notification-hub check-availability

Check the availability of the given notificationHub in a namespace.

az notification-hub create

Create a NotificationHub in a namespace.

az notification-hub credential

Commands to manage notification hub credential.

az notification-hub credential adm

Commands to manage notification hub credential for Amazon(ADM).

az notification-hub credential adm update

Update credential for Amazon(ADM).

az notification-hub credential apns

Commands to manage notification hub credential for Apple(APNS).

az notification-hub credential apns update

Update credential for Apple(APNS).

az notification-hub credential baidu

Commands to manage notification hub credential for Baidu(Andrioid China).

az notification-hub credential baidu update

Update credential for Baidu(Andrioid China).

az notification-hub credential gcm

Commands to manage notification hub credential for Google(GCM/FCM).

az notification-hub credential gcm update

Update the Google GCM/FCM API key.

az notification-hub credential list

List the PNS Credentials associated with a notification hub .

az notification-hub credential mpns

Commands to manage notification hub credential for Windows Phone(MPNS).

az notification-hub credential mpns update

Update credential for Windows Phone(MPNS).

az notification-hub credential wns

Commands to manage notification hub credential for Windows(WNS).

az notification-hub credential wns update

Update credential for Windows(WNS).

az notification-hub delete

Delete a notification hub associated with a namespace.

az notification-hub list

List the notification hubs associated with a namespace.

az notification-hub namespace

Commands to manage notification hub namespace.

az notification-hub namespace authorization-rule

Commands to manage notification hubs namespace authorization rule.

az notification-hub namespace authorization-rule create

Create an authorization rule for a namespace.

az notification-hub namespace authorization-rule delete

Delete a namespace authorization rule.

az notification-hub namespace authorization-rule list

List the authorization rules for a namespace.

az notification-hub namespace authorization-rule list-keys

List the Primary and Secondary ConnectionStrings to the namespace.

az notification-hub namespace authorization-rule regenerate-keys

Regenerate the Primary/Secondary Keys to the Namespace Authorization Rule.

az notification-hub namespace authorization-rule show

Show an authorization rule for a namespace by name.

az notification-hub namespace check-availability

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

az notification-hub namespace create

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

az notification-hub namespace delete

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

az notification-hub namespace list

List available namespaces.

az notification-hub namespace show

Return the description for the specified namespace.

az notification-hub namespace update

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

az notification-hub namespace wait

Place the CLI in a waiting state until a condition of the Notification Hub Namesapce is met.

az notification-hub show

Show the notification hub information.

az notification-hub test-send

Test send a push notification.

az notification-hub update

Update a Notification Hub in a namespace.

az notification-hub check-availability

Check the availability of the given notificationHub in a namespace.

az notification-hub check-availability --name
                                       --namespace-name
                                       --resource-group

Examples

Check the availability of the given notificationHub name

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

Required Parameters

--name -n

The notification hub name to check.

--namespace-name

The namespace name.

--resource-group -g

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

az notification-hub create

Create a NotificationHub in a namespace.

az notification-hub create --location
                           --name
                           --namespace-name
                           --resource-group
                           [--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

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

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

--registration-ttl

The RegistrationTtl of the created NotificationHub.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az notification-hub delete

Delete a notification hub associated with a namespace.

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

Examples

Delete a notification hub

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

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

--yes -y

Do not prompt for confirmation.

az notification-hub list

List the notification hubs associated with a namespace.

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

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

az notification-hub show

Show the notification hub information.

az notification-hub show --name
                         --namespace-name
                         --resource-group

Examples

Show the Notification Hub info

az notification-hub show --resource-group MyResourceGroup --namespace-name my-namespace \
--name my-hub

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

az notification-hub test-send

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.

az notification-hub update

Update a Notification Hub in a namespace.

az notification-hub update --name
                           --namespace-name
                           --resource-group
                           [--tags]

Examples

Update the Notification Hub

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

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

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.