New-AzNotificationHubAuthorizationRule
Hiermee maakt u een autorisatieregel en wijst u de regel toe aan een Notification Hub.
Syntaxis
New-AzNotificationHubAuthorizationRule
[-ResourceGroup] <String>
[-Namespace] <String>
[-NotificationHub] <String>
[-InputFile] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNotificationHubAuthorizationRule
[-ResourceGroup] <String>
[-Namespace] <String>
[-NotificationHub] <String>
[-SASRule] <SharedAccessAuthorizationRuleAttributes>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
De New-AzNotificationHubAuthorizationRule cmdlet maakt een SAS-autorisatieregel (Shared Access Signature) voor notification hubs. Autorisatieregels worden gebruikt om de toegang tot uw Notification Hubs te beheren. Dit wordt gedaan door het maken van koppelingen, als URI's, op basis van verschillende machtigingsniveaus. Clients worden omgeleid naar een van deze URI's op basis van het juiste machtigingsniveau. Een client met de listen-machtiging wordt bijvoorbeeld omgeleid naar de URI voor die machtiging.
Voorbeelden
Voorbeeld 1: Een autorisatieregel voor de Notification Hub maken
New-AzNotificationHubAuthorizationRule -Namespace "ContosoNamespace" -NotificationHub "ContosoInternalHub" -ResourceGroup "ContosoNotificationsGroup" -InputFile "C:\Configuration\ExternalAccessRule.json"
Met deze opdracht maakt u een nieuwe autorisatieregel en wijst u deze toe aan de Notification Hub met de naam ContosoInternalHub. Deze hub bevindt zich in de naamruimte ContosoNamespace en wordt toegewezen aan de resourcegroep ContosoNotificationsGroup. Houd er rekening mee dat alle configuratiegegevens voor de regel, inclusief de regelnaam, worden opgehaald uit het invoerbestand C:\Configuration\ExternalAccessRule.jsingeschakeld.
Parameters
-Confirm
U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
De referenties, het account, de tenant en het abonnement dat wordt gebruikt voor communicatie met Azure
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-InputFile
Hiermee geeft u het invoerbestand voor de autorisatieregel die door deze cmdlet wordt gemaakt.
Type: | String |
Position: | 3 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Namespace
Hiermee geeft u de naamruimte waaraan de autorisatieregels zijn toegewezen. Naamruimten bieden een manier om Notification Hubs te groeperen en te categoriseren.
Type: | String |
Position: | 1 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-NotificationHub
Hiermee geeft u de Notification Hub op waaraan de autorisatieregels worden toegewezen. Notification Hubs worden gebruikt voor het verzenden van pushmeldingen naar meerdere clients, ongeacht het platform dat door deze clients wordt gebruikt. Houd er rekening mee dat u de naam van een bestaande Notification Hub moet opgeven. De cmdlet New-AzNotificationHubAuthorizationRule kan geen nieuwe Notification Hubs maken.
Type: | String |
Position: | 2 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-ResourceGroup
Hiermee geeft u de resourcegroep aan waaraan de Notification Hub is toegewezen.
Type: | String |
Position: | 0 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-SASRule
Hiermee geeft u de SharedAccessAuthorizationRuleAttributes object met configuratiegegevens voor de nieuwe regels.
Type: | SharedAccessAuthorizationRuleAttributes |
Position: | 3 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-WhatIf
Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |