Delen via


New-AzNotificationHub

Hiermee maakt u een Notification Hub.

Syntax

New-AzNotificationHub
   [-ResourceGroup] <String>
   [-Namespace] <String>
   [-InputFile] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzNotificationHub
   [-ResourceGroup] <String>
   [-Namespace] <String>
   [-NotificationHubObj] <NotificationHubAttributes>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Met de cmdlet New-AzNotificationHub wordt een Notification Hub gemaakt. Notification Hubs worden gebruikt voor het verzenden van pushmeldingen naar meerdere clients, ongeacht het platform dat door deze clients wordt gebruikt. Notification Hubs zijn ongeveer gelijk aan afzonderlijke apps: elk van uw apps heeft doorgaans een eigen Notification Hub. De cmdlet New-AzNotificationHub biedt twee manieren om een nieuwe Notification Hub te maken. U kunt een exemplaar van het NotificationHubAttributes-object maken en dat object vervolgens configureren. U kunt deze eigenschapswaarden vervolgens naar uw nieuwe hub kopiëren via de parameter NotificationHubObj . U kunt ook een JSON-bestand (JavaScript Object Notation) maken met de relevante configuratiewaarden en deze waarden vervolgens toepassen met behulp van de parameter InputFile . Wanneer het wordt gebruikt in combinatie met de cmdlet New-AzNotificationHub , maakt het voorgaande JSON-voorbeeld een notification hub met de naam ContosoNotificationHub in het datacenter VS - west.

Voorbeelden

Voorbeeld 1: Een Notification Hub maken

New-AzNotificationHub -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -InputFile "C:\Configurations\InternalHub.json"

Met deze opdracht maakt u een Notification Hub in de naamruimte ContosoNamespace. De nieuwe hub wordt toegewezen aan de ContosoNotificationsGroup. U hoeft geen naam of andere configuratiegegevens voor de hub op te geven; die informatie wordt opgehaald uit het invoerbestand C:\Configurations\InternalHub.json.

Parameters

-Confirm

Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.

Type:SwitchParameter
Aliases:cf
Position:Named
standaardwaarde:None
Vereist:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

De referenties, het account, de tenant en het abonnement dat wordt gebruikt voor communicatie met Azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
standaardwaarde:None
Vereist:False
Accept pipeline input:False
Accept wildcard characters:False

-InputFile

Hiermee geeft u het pad naar een JSON-bestand met configuratiewaarden voor de nieuwe Notification Hub.

Type:String
Position:2
standaardwaarde:None
Vereist:True
Accept pipeline input:False
Accept wildcard characters:False

-Namespace

Hiermee geeft u de naamruimte aan waaraan de Notification Hub wordt toegewezen. Naamruimten bieden een manier om Notification Hubs te groeperen en te categoriseren. Notification Hubs moeten worden toegewezen aan een bestaande naamruimte. De cmdlet New-AzNotificationHub kan geen nieuwe naamruimte maken.

Type:String
Position:1
standaardwaarde:None
Vereist:True
Accept pipeline input:True
Accept wildcard characters:False

-NotificationHubObj

Hiermee geeft u het NotificationHubAttributes-object op dat configuratiegegevens voor de nieuwe hub bevat.

Type:NotificationHubAttributes
Position:2
standaardwaarde:None
Vereist:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroup

Hiermee geeft u de resourcegroep aan waaraan de Notification Hub wordt toegewezen. Resourcegroepen organiseren items zoals naamruimten, notification hubs en autorisatieregels op manieren die eenvoudig voorraadbeheer en Azure-beheer helpen. U moet een bestaande resourcegroep gebruiken. De cmdlet New-AzNotificationHub kan geen nieuwe resourcegroep maken.

Type:String
Position:0
standaardwaarde:None
Vereist:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.

Type:SwitchParameter
Aliases:wi
Position:Named
standaardwaarde:None
Vereist:False
Accept pipeline input:False
Accept wildcard characters:False

Invoerwaarden

String

Uitvoerwaarden

NotificationHubAttributes