external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.Commands.NotificationHubs.dll-Help.xml |
AzureRM.NotificationHubs |
7E9CBEE9-DD5F-4552-9187-ECBBEF6174B0 |
2.0.0 |
Creates an authorization rule and assigns the rule to a notification hub.
New-AzureRmNotificationHubAuthorizationRules [-ResourceGroup] <String> [-Namespace] <String>
[-NotificationHub] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-AzureRmNotificationHubAuthorizationRules [-ResourceGroup] <String> [-Namespace] <String>
[-NotificationHub] <String> [-SASRule] <SharedAccessAuthorizationRuleAttributes>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
The New-AzureRmNotificationHubAuthorizationRules cmdlet creates a notification hub Shared Access Signature (SAS) authorization rule. Authorization rules are used to manage access to your notification hubs. This is done by the creation of links, as URIs, based on different permission levels. Clients are directed to one of these URIs based on the appropriate permission level. For example, a client given the Listen permission will be directed to the URI for that permission.
PS C:\>New-AzureRmNotificationHubAuthorizationRules -Namespace "ContosoNamespace" -NotificationHub "ContosoInternalHub" -ResourceGroup "ContosoNotificationsGroup" -InputFile "C:\Configuration\ExternalAccessRule.json"
This command creates a new authorization rule and assigns it to the notification hub named ContosoInternalHub. This hub is located in the ContosoNamespace namespace and is assigned to the ContosoNotificationsGroup resource group. Note that all the configuration information for the rule, including the rule name, will be taken from the input file C:\Configuration\ExternalAccessRule.json.
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the input file for the authorization rule that this cmdlet creates.
Type: System.String
Parameter Sets: InputFileParameterSet
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the namespace to which the authorization rules are assigned. Namespaces provide a way to group and categorize notification hubs.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the notification hub that the authorization rules will be assigned to. Notification hubs are used to send push notifications to multiple clients regardless of the platform used by those clients. Note that you must specify the name of an existing notification hub. The New-AzureRmNotificationHubAuthorizationRules cmdlet cannot create new notification hubs.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the resource group that the notification hub is assigned to.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the SharedAccessAuthorizationRuleAttributes object containing configuration information for the new rules.
Type: Microsoft.Azure.Commands.NotificationHubs.Models.SharedAccessAuthorizationRuleAttributes
Parameter Sets: SASRuleParameterSet
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Get-AzureRmNotificationHubAuthorizationRules