你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-AzNotificationHubsNamespaceAuthorizationRule
Removes an authorization rule from a notification hub namespace.
Syntax
Remove-AzNotificationHubsNamespaceAuthorizationRule
[-ResourceGroup] <String>
[-Namespace] <String>
[-AuthorizationRule] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzNotificationHubsNamespaceAuthorizationRule cmdlet removes a Shared Access Signature (SAS) authorization rule from a notification hub namespace. Authorization rules manage access to a namespace. This is done by through the creation of links, as URIs, based on different permission levels. Permission levels can be of the following:
- Listen
- Send
- Manage Clients are directed to one of these URIs based on the appropriate permission level. For instance, a client given the Listen permission is directed to the URI for that permission. Removing an authorization rule also removes the corresponding user permission.
Examples
Example 1: Remove an authorization rule from a namespace
Remove-AzNotificationHubsNamespaceAuthorizationRule -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -AuthorizationRule "ListenRule"
This command removes the authorization rule named ListenRule from the namespace named ContosoNamespace. When you run this command you must specify the resource group that the namespace is assigned to.
Parameters
-AuthorizationRule
Specifies the name of the SAS authentication rule to be removed.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Do not ask for confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Namespace
Specifies the namespace to which the authorization rules are assigned. Namespaces provide a way to group and categorize notification hubs.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroup
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: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |