external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.NotificationHubs.dll-Help.xml |
Az.NotificationHubs |
F0981A7A-1B17-4141-A267-927E5B78BE5F |
2.0.0 |
Sets authorization rules for a notification hub namespace.
Set-AzNotificationHubsNamespaceAuthorizationRule [-ResourceGroup] <String> [-Namespace] <String>
[-InputFile] <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Set-AzNotificationHubsNamespaceAuthorizationRule [-ResourceGroup] <String> [-Namespace] <String>
[-SASRule] <SharedAccessAuthorizationRuleAttributes> [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
The Set-AzNotificationHubsNamespaceAuthorizationRule cmdlet modifies a Shared Access Signature (SAS) authorization rule assigned to a notification hub namespace.
Authorization rules manage user rights to the namespace and to the notification hubs contained in that namespace.
This cmdlet provides two ways to modify an authorization rule assigned to a namespace.
For one, you can create an instance of the SharedAccessAuthorizationRuleAttributes object and then configure that object with the property values you want the rule to possess.
You can use the .NET Framework to accomplish this.
You can then copy those property values to the rule through the SASRule parameter.
Alternatively, you can create a JSON (JavaScript Object Notation) file containing the relevant configuration values and then apply those values through the InputFile parameter.
A JSON file is a text file that uses syntax similar to this:
{
"Name": "ContosoAuthorizationRule",
"PrimaryKey": "WE4qH0398AyXjlekt56gg1gMR3NHoMs29KkUnnpUk01Y=",
"Rights": [
"Listen",
"Send"
]
}
When used in conjunction with the Set-AzNotificationHubsNamespaceAuthorizationRule cmdlet, the preceding JSON sample modifies an authorization rule named ContosoAuthorizationRule to give users Listen and Send rights to the namespace.
Set-AzNotificationHubsNamespaceAuthorizationRule -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationGroup" -InputFile "C:\Configuration\AuthorizationRules.json"
This command modifies an authorization rule assigned to the namespace named ContosoNamespace. You must specify the resource group that the namespace is assigned to. Information about the authorization rule is not included in the command itself. Instead, that information is obtained from the input file C:\Configuration\AuthorizationRules.json.
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Do not ask for confirmation.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the path to a JSON file containing configuration information for the new rule.
Type: System.String
Parameter Sets: InputFileParameterSet
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the namespace that contains the authorization rules that this cmdlet modifies. 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 resource group to which the namespace is assigned. Resource groups organize items such as namespaces, notification hubs, and authorization rules in ways that help simply inventory management and Azure administration.
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 that contains configuration information for the authorization rules that this cmdlet modifies.
Type: Microsoft.Azure.Commands.NotificationHubs.Models.SharedAccessAuthorizationRuleAttributes
Parameter Sets: SASRuleParameterSet
Aliases:
Required: True
Position: 2
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-AzNotificationHubsNamespaceAuthorizationRule