Edit

Share via


Remove-AzNotificationHubsNamespaceAuthorizationRule

Removes an authorization rule from a notification hub namespace.

Syntax

Default (Default)

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Do not ask for confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Namespace

Specifies the namespace to which the authorization rules are assigned. Namespaces provide a way to group and categorize notification hubs.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

Boolean